From 597a3ee69ca31e7707f6237799a022ac79ffa908 Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Mon, 5 Oct 2026 18:20:02 -0700 Subject: [PATCH 1/8] Install Git and OpenCode reliably on Windows Re-read the registry PATH so a Git installed while orx runs is found, offer an orx-installed PortableGit in onboarding, download OpenCode via the system proxy with an npm fallback, and keep the install script's own text out of setup telemetry. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 6 +- README.md | 4 +- docs/windows.md | 12 +- src/commands/up.rs | 8 ++ src/commands/up/harness_setup.rs | 31 ++++- src/commands/up/install_opencode.ps1 | 48 ++++++-- src/local/bash.rs | 2 +- src/local/mod.rs | 1 + src/local/portable_git.rs | 178 +++++++++++++++++++++++++++ src/local/shell_env.rs | 95 ++++++++++++++ src/telemetry/harness.rs | 11 ++ ui/messages/ar.json | 3 + ui/messages/en.json | 3 + ui/messages/es.json | 3 + ui/messages/fa.json | 3 + ui/messages/hi.json | 3 + ui/messages/zh-CN.json | 3 + ui/src/api.ts | 4 + ui/src/components/Onboarding.tsx | 14 +++ 19 files changed, 413 insertions(+), 19 deletions(-) create mode 100644 src/local/portable_git.rs diff --git a/Cargo.toml b/Cargo.toml index ec15a2409..40261415c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,9 +82,9 @@ libc = "0.2" # Win32 calls std lacks: run liveness, console ownership, the error dialog, PE # version-resource reads (GetFileVersionInfoW / VerQueryValueW — the spawn-free # `--version` fast path in harness detection), total RAM for the agent idle -# policy, and the desktop app's single instance and taskbar identity. Already in -# the tree. -windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Credentials", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Console", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] } +# policy, the desktop app's single instance and taskbar identity, and the +# registry PATH a running orx re-reads. Already in the tree. +windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Credentials", "Win32_Storage_FileSystem", "Win32_System_Diagnostics_ToolHelp", "Win32_System_JobObjects", "Win32_System_Registry", "Win32_System_SystemInformation", "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Console", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] } [target.'cfg(any(target_os = "macos", windows))'.dependencies] # Desktop app mode (src/commands/app.rs): the dashboard in its own window. tao diff --git a/README.md b/README.md index ac7c540f7..3741346be 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,8 @@ Either way, `orx` is linked into `~/.local/bin`, with a hint to add it to your `PATH` if needed. If you already ran `install.sh`, remove `~/.cargo/bin/orx` first and open a new terminal. -On Windows, use the beta download above after installing -[Git for Windows](docs/windows.md). It installs for your account, with no +On Windows, use the beta download above. It needs +[Git for Windows](docs/windows.md), which onboarding can install for you. It installs for your account, with no administrator prompt. The installer isn't signed yet, so Windows may say "Windows protected your PC": choose **More info** → **Run anyway**. diff --git a/docs/windows.md b/docs/windows.md index 5a9800197..e472645ad 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -9,9 +9,17 @@ experiment runs and the nanochat demo. The gaps are listed at the bottom. the `bash` and coreutils that orx uses to run experiments — the `bash.exe` in `System32` is the WSL launcher, which cannot see your files, and orx rejects it. Install it with the standard installer so `git.exe` lands on `PATH`; orx finds -the shell by walking up from there. +the shell by walking up from there. orx notices a Git installed while it runs, +so **Re-check** in onboarding is enough; there is no need to restart. -You also need a coding agent. Claude Code is the default: +If you have no Git, onboarding offers **Install Git**. orx downloads the latest +PortableGit from Git for Windows' GitHub releases, checks it against the SHA-256 +GitHub publishes, and unpacks it into `%LOCALAPPDATA%\OpenResearch\PortableGit` +with no administrator prompt. orx, its agents, and its terminals use it; your +own `PATH` is unchanged, and a Git you install later takes precedence. + +You also need a coding agent. Claude Code is the default. To install Git, Node, +and Claude Code yourself: ```powershell winget install --id Git.Git -e diff --git a/src/commands/up.rs b/src/commands/up.rs index f0380c87e..580f8d50b 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -490,6 +490,7 @@ fn router(state: AppState, remote_auth: Option) -> Router { .route("/api/onboarding/complete", post(complete_onboarding)) .route("/api/project-path/status", get(project_path_status)) .route("/api/project-path/pick", post(pick_project_folder)) + .route("/api/git/install", post(install_git)) .route("/api/projects", get(list_projects).post(create_project)) .route( "/api/projects/starter-prompts/prewarm", @@ -830,6 +831,7 @@ fn remote_route_forbidden(path: &str) -> bool { matches!( path, "/api/project-path/pick" + | "/api/git/install" | "/api/update" | "/api/update/apply" | "/api/update/restart" @@ -1350,12 +1352,18 @@ struct ProjectPathStatusQ { path: Option, } +async fn install_git() -> ApiResult { + local::portable_git::install().await?; + Ok(Json(json!({}))) +} + async fn project_path_status(Query(q): Query) -> ApiResult { tokio::task::spawn_blocking(move || -> Result> { let git_version = local::git::version(); let Some(path) = q.path.filter(|path| !path.trim().is_empty()) else { return Ok(Json(json!({ "gitVersion": git_version, + "gitInstallable": cfg!(windows) && git_version.is_none(), "resolvedPath": null, "exists": null, "directory": null, diff --git a/src/commands/up/harness_setup.rs b/src/commands/up/harness_setup.rs index a435eb702..193598b52 100644 --- a/src/commands/up/harness_setup.rs +++ b/src/commands/up/harness_setup.rs @@ -82,6 +82,14 @@ fn windows_powershell() -> String { "powershell.exe".into() } +/// PowerShell's `-EncodedCommand` form: base64 of the script's UTF-16LE. +#[cfg(any(windows, test))] +fn encoded_command(script: &str) -> String { + use base64::Engine; + let bytes: Vec = script.encode_utf16().flat_map(u16::to_le_bytes).collect(); + base64::engine::general_purpose::STANDARD.encode(bytes) +} + fn login_command(harness: &str) -> Option<(&'static str, Vec)> { match harness { "claude-code" => Some(("claude auth login", vec!["auth".into(), "login".into()])), @@ -278,12 +286,14 @@ async fn run( windows_powershell(), vec![ "-NoProfile".into(), - "-Command".into(), + // Encoded: the console title echoes the command line into + // the output, where the script's own phrases would be excerpted. + "-EncodedCommand".into(), // `$LASTEXITCODE` persists from an earlier native call, // so reset it or a failing cmdlet exits with its code. - format!( + encoded_command(&format!( "$LASTEXITCODE = 0\n{install}\nif (-not $?) {{ if ($LASTEXITCODE) {{ exit $LASTEXITCODE }} else {{ exit 1 }} }}" - ), + )), ], ) } @@ -778,6 +788,21 @@ mod tests { assert!(!fresh_install(Action::Install, false, None)); } + #[test] + fn the_windows_install_command_line_carries_none_of_its_phrases() { + let script = windows_install_command("opencode").unwrap(); + assert!(script.contains("Unsupported architecture")); + let encoded = encoded_command(script); + assert_eq!(crate::telemetry::harness::excerpt_for_test(&encoded), None); + assert_eq!( + encoded_command("exit 1"), + base64::Engine::encode( + &base64::engine::general_purpose::STANDARD, + b"e\0x\0i\0t\0 \x001\0" + ) + ); + } + #[test] fn spawn_failure_keeps_the_os_cause_and_drops_the_script() { // The whole install script is in the error; its unexecuted diff --git a/src/commands/up/install_opencode.ps1 b/src/commands/up/install_opencode.ps1 index 51a5f0f73..e741770e8 100644 --- a/src/commands/up/install_opencode.ps1 +++ b/src/commands/up/install_opencode.ps1 @@ -1,4 +1,8 @@ $ErrorActionPreference = 'Stop' +# Windows PowerShell's progress bar slows Invoke-WebRequest to a crawl. +$ProgressPreference = 'SilentlyContinue' +# Windows PowerShell 5.1 can default to TLS 1.0, which GitHub and npm refuse. +[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString() # ponytail: baseline supports all x64 CPUs; select AVX2 builds if performance requires it. $asset = switch ($arch) { @@ -9,19 +13,47 @@ $asset = switch ($arch) { $temp = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName()) $destination = Join-Path $env:USERPROFILE '.opencode\bin' $installed = Join-Path $destination 'opencode.exe' +$release = "https://github.com/anomalyco/opencode/releases/latest/download/opencode-windows-$asset.zip" New-Item -ItemType Directory -Path $temp -Force | Out-Null try { Write-Output 'Downloading OpenCode...' $archive = Join-Path $temp 'opencode.zip' - curl.exe -fL --retry 2 --connect-timeout 15 --max-time 300 "https://github.com/anomalyco/opencode/releases/latest/download/opencode-windows-$asset.zip" -o $archive - # Keep curl's own exit code so distinct network faults stay apart; the - # throws below surface as exit 1 with their message. - if ($LASTEXITCODE -ne 0) { - Write-Error "OpenCode download failed (curl exit $LASTEXITCODE)." -ErrorAction Continue - exit $LASTEXITCODE + $binary = $null + # Unlike curl.exe, Invoke-WebRequest uses the system proxy and tolerates + # revocation servers a filtered network cannot reach. + try { + Invoke-WebRequest -UseBasicParsing -Uri $release -OutFile $archive -TimeoutSec 300 + Expand-Archive -Path $archive -DestinationPath $temp -Force + $binary = Join-Path $temp 'opencode.exe' + } catch { + Write-Output "GitHub download failed: $($_.Exception.Message)" + } + # The same build is published to npm, which networks that block GitHub's downloads often allow. + if (-not $binary) { + try { + $package = Invoke-RestMethod -UseBasicParsing -Uri "https://registry.npmjs.org/opencode-windows-$asset/latest" -TimeoutSec 60 + $tarball = Join-Path $temp 'opencode.tgz' + Invoke-WebRequest -UseBasicParsing -Uri $package.dist.tarball -OutFile $tarball -TimeoutSec 300 + $expected = -join ([Convert]::FromBase64String(($package.dist.integrity -replace '^sha512-', '')) | ForEach-Object { $_.ToString('x2') }) + if ((Get-FileHash -LiteralPath $tarball -Algorithm SHA512).Hash -ne $expected) { throw 'npm package checksum mismatch.' } + & (Join-Path $env:SystemRoot 'System32\tar.exe') -xzf $tarball -C $temp + if ($LASTEXITCODE -ne 0) { throw "tar exited with $LASTEXITCODE." } + $binary = Join-Path $temp 'package\bin\opencode.exe' + } catch { + Write-Output "npm download failed: $($_.Exception.Message)" + } + } + if (-not $binary) { + curl.exe -fL --retry 2 --connect-timeout 15 --max-time 300 $release -o $archive + # Keep curl's own exit code so distinct network faults stay apart; the + # throws below surface as exit 1 with their message. + if ($LASTEXITCODE -ne 0) { + Write-Error "OpenCode download failed (curl exit $LASTEXITCODE)." -ErrorAction Continue + exit $LASTEXITCODE + } + Expand-Archive -Path $archive -DestinationPath $temp -Force + $binary = Join-Path $temp 'opencode.exe' } - Expand-Archive -Path $archive -DestinationPath $temp - $binary = Join-Path $temp 'opencode.exe' & $binary --version if ($LASTEXITCODE -ne 0) { throw 'OpenCode failed to run after extraction.' } New-Item -ItemType Directory -Path $destination -Force | Out-Null diff --git a/src/local/bash.rs b/src/local/bash.rs index 5ec21c0c5..373db4651 100644 --- a/src/local/bash.rs +++ b/src/local/bash.rs @@ -31,7 +31,7 @@ fn usable_bash() -> Option { pub fn missing_toolchain() -> Option<&'static str> { usable_bash().is_none().then_some( "Git for Windows not found — orx needs the bash it ships to run experiments. \ - Install it from https://git-scm.com/download/win, then restart orx.", + Install it from the dashboard or from https://git-scm.com/download/win.", ) } diff --git a/src/local/mod.rs b/src/local/mod.rs index 1c62d0d8f..b1a7bd85a 100644 --- a/src/local/mod.rs +++ b/src/local/mod.rs @@ -36,6 +36,7 @@ pub mod opencode; pub mod openresearch; pub mod overleaf; pub mod overleaf_live; +pub mod portable_git; pub mod projects; pub mod ray; pub mod resolve; diff --git a/src/local/portable_git.rs b/src/local/portable_git.rs new file mode 100644 index 000000000..b6c0520d8 --- /dev/null +++ b/src/local/portable_git.rs @@ -0,0 +1,178 @@ +//! The Git for Windows orx installs for a user who has none: PortableGit, unpacked +//! into `%LOCALAPPDATA%\OpenResearch\PortableGit` with no administrator prompt and +//! no PATH change. [`super::shell_env::search_path`] appends its `cmd` directory, +//! which is also how [`super::bash`] finds the bash it ships. + +use anyhow::Result; +#[cfg(windows)] +use anyhow::{anyhow, Context}; +#[cfg(windows)] +use std::path::{Path, PathBuf}; + +#[cfg(windows)] +fn root() -> Option { + dirs::data_local_dir().map(|dir| dir.join("OpenResearch").join("PortableGit")) +} + +/// The installed copy's `cmd` directory, the one Git's own installer puts on PATH. +#[cfg(windows)] +pub fn cmd_dir() -> Option { + let dir = root()?.join("cmd"); + dir.join("git.exe").is_file().then_some(dir) +} + +#[cfg(not(windows))] +pub async fn install() -> Result<()> { + anyhow::bail!("orx installs Git only on Windows.") +} + +/// Download the latest PortableGit, check it against GitHub's digest, and unpack it. +#[cfg(windows)] +pub async fn install() -> Result<()> { + static INSTALLING: tokio::sync::Mutex<()> = tokio::sync::Mutex::const_new(()); + let _guard = INSTALLING.lock().await; + if cmd_dir().is_some() { + return Ok(()); + } + let root = root().ok_or_else(|| anyhow!("Could not find %LOCALAPPDATA%."))?; + let parent = root.parent().expect("root has a parent"); + tokio::fs::create_dir_all(parent) + .await + .with_context(|| format!("Could not create {}", parent.display()))?; + let (url, sha256) = latest_asset().await?; + let token = uuid::Uuid::new_v4().simple().to_string(); + let archive = parent.join(format!("PortableGit-{token}.7z.exe")); + let staging = parent.join(format!("PortableGit-{token}")); + let result = async { + download(&url, &sha256, &archive).await?; + unpack(&archive, &staging).await?; + tokio::fs::rename(&staging, &root) + .await + .with_context(|| format!("Could not move Git into {}", root.display())) + } + .await; + let _ = tokio::fs::remove_file(&archive).await; + if result.is_err() { + let _ = tokio::fs::remove_dir_all(&staging).await; + } + result?; + if super::git::version().is_none() { + anyhow::bail!("Git was installed in {} but does not run.", root.display()); + } + Ok(()) +} + +/// The release asset for this machine and its SHA-256, from GitHub's own digest. +#[cfg(windows)] +async fn latest_asset() -> Result<(String, String)> { + let suffix = if cfg!(target_arch = "aarch64") { + "-arm64.7z.exe" + } else { + "-64-bit.7z.exe" + }; + let release: serde_json::Value = client()? + .get("https://api.github.com/repos/git-for-windows/git/releases/latest") + .header("accept", "application/vnd.github+json") + .header("x-github-api-version", "2022-11-28") + .send() + .await + .and_then(reqwest::Response::error_for_status) + .context("Could not look up the latest Git for Windows release")? + .json() + .await + .context("Could not read the latest Git for Windows release")?; + let asset = release["assets"] + .as_array() + .into_iter() + .flatten() + .find(|asset| { + asset["name"] + .as_str() + .is_some_and(|name| name.starts_with("PortableGit-") && name.ends_with(suffix)) + }) + .ok_or_else(|| anyhow!("The latest Git for Windows release has no PortableGit{suffix}."))?; + let url = asset["browser_download_url"] + .as_str() + .ok_or_else(|| anyhow!("The PortableGit asset has no download URL."))?; + let sha256 = asset["digest"] + .as_str() + .and_then(|digest| digest.strip_prefix("sha256:")) + .ok_or_else(|| anyhow!("GitHub reports no SHA-256 for the PortableGit download."))?; + Ok((url.to_string(), sha256.to_ascii_lowercase())) +} + +#[cfg(windows)] +async fn download(url: &str, sha256: &str, archive: &Path) -> Result<()> { + use futures::StreamExt; + use sha2::{Digest, Sha256}; + use tokio::io::AsyncWriteExt; + + let response = client()? + .get(url) + .send() + .await + .and_then(reqwest::Response::error_for_status) + .context("Could not download Git for Windows")?; + let mut file = tokio::fs::File::create(archive) + .await + .with_context(|| format!("Could not create {}", archive.display()))?; + let mut hasher = Sha256::new(); + let mut body = response.bytes_stream(); + while let Some(chunk) = body.next().await { + let chunk = chunk.context("The Git for Windows download was interrupted")?; + hasher.update(&chunk); + file.write_all(&chunk).await?; + } + file.flush().await?; + if format!("{:x}", hasher.finalize()) != sha256 { + anyhow::bail!("The Git for Windows download does not match GitHub's checksum."); + } + Ok(()) +} + +/// PortableGit is a 7-Zip self-extractor; `post-install.bat` finishes its `/etc` +/// setup, run the way Git's own installer runs it. The copy stays relocatable. +#[cfg(windows)] +async fn unpack(archive: &Path, staging: &Path) -> Result<()> { + let mut output = std::ffi::OsString::from("-o"); + output.push(staging); + let status = tokio::process::Command::new(archive) + .arg("-y") + .arg(output) + .status() + .await + .context("Could not start the Git for Windows extractor")?; + if !status.success() { + anyhow::bail!("Extracting Git for Windows failed ({status})."); + } + if staging.join("post-install.bat").is_file() { + let status = tokio::process::Command::new(staging.join("git-bash.exe")) + .args([ + "--no-needs-console", + "--hide", + "--no-cd", + "--command=post-install.bat", + ]) + .current_dir(staging) + .status() + .await + .context("Could not run Git for Windows' post-install step")?; + if !status.success() { + anyhow::bail!("Git for Windows' post-install step failed ({status})."); + } + } + if !staging.join(r"cmd\git.exe").is_file() || !staging.join(r"bin\bash.exe").is_file() { + anyhow::bail!("The Git for Windows download is missing git.exe or bash.exe."); + } + Ok(()) +} + +#[cfg(windows)] +fn client() -> Result { + reqwest::Client::builder() + .user_agent(concat!("orx/", env!("CARGO_PKG_VERSION"))) + .connect_timeout(std::time::Duration::from_secs(20)) + .timeout(std::time::Duration::from_secs(600)) + .build() + .context("Could not create an HTTP client") +} diff --git a/src/local/shell_env.rs b/src/local/shell_env.rs index bb6bc6a51..e220dcd17 100644 --- a/src/local/shell_env.rs +++ b/src/local/shell_env.rs @@ -51,10 +51,105 @@ pub fn var(key: &str) -> Option { } /// The PATH to search for the binaries orx spawns, and to hand its children. +#[cfg(not(windows))] pub fn search_path() -> Option { var("PATH") } +/// Extended by the registry's current PATH, so a tool installed while orx runs +/// is found without a restart, then by the Git orx installs, so the user's own wins. +#[cfg(windows)] +pub fn search_path() -> Option { + let base = var("PATH"); + let mut path = base.clone().unwrap_or_default(); + let mut seen: Vec = std::env::split_paths(&path) + .map(|dir| path_key(&dir)) + .collect(); + let added = registry_path() + .into_iter() + .chain(super::portable_git::cmd_dir()) + .filter(|dir| dir.is_absolute()); + for dir in added { + let key = path_key(&dir); + if seen.contains(&key) { + continue; + } + seen.push(key); + if !path.is_empty() { + path.push(PATH_LIST_SEPARATOR); + } + path.push(dir); + } + (base.is_some() || !path.is_empty()).then_some(path) +} + +/// Windows paths compare case-insensitively, with or without a trailing separator. +#[cfg(windows)] +fn path_key(dir: &std::path::Path) -> String { + dir.to_string_lossy() + .trim_end_matches(['\\', '/']) + .to_lowercase() +} + +/// The machine then user `Path`, as a new process would compose them, expanded. +#[cfg(windows)] +fn registry_path() -> Vec { + use std::os::windows::ffi::OsStringExt; + use windows_sys::Win32::Foundation::{ERROR_MORE_DATA, ERROR_SUCCESS}; + use windows_sys::Win32::System::Registry::{ + RegGetValueW, HKEY, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, RRF_RT_REG_EXPAND_SZ, + RRF_RT_REG_SZ, + }; + + fn wide(text: &str) -> Vec { + text.encode_utf16().chain(Some(0)).collect() + } + fn read(root: HKEY, key: &str) -> Option { + let (key, value) = (wide(key), wide("Path")); + let mut buffer = vec![0u16; 4096]; + // Expansion can outgrow the size a first call reports, so retry on ERROR_MORE_DATA. + for _ in 0..3 { + let mut bytes = u32::try_from(buffer.len() * 2).ok()?; + // SAFETY: both names are NUL-terminated and `bytes` is the buffer's size. + let status = unsafe { + RegGetValueW( + root, + key.as_ptr(), + value.as_ptr(), + RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ, + std::ptr::null_mut(), + buffer.as_mut_ptr().cast(), + &mut bytes, + ) + }; + match status { + ERROR_SUCCESS => { + buffer.truncate(bytes as usize / 2); + while buffer.last() == Some(&0) { + buffer.pop(); + } + return Some(OsString::from_wide(&buffer)); + } + ERROR_MORE_DATA => buffer.resize((bytes as usize).div_ceil(2) + 1, 0), + _ => return None, + } + } + None + } + + [ + ( + HKEY_LOCAL_MACHINE, + r"SYSTEM\CurrentControlSet\Control\Session Manager\Environment", + ), + (HKEY_CURRENT_USER, "Environment"), + ] + .into_iter() + .filter_map(|(root, key)| read(root, key)) + .flat_map(|path| std::env::split_paths(&path).collect::>()) + .collect() +} + /// What separates PATH entries when composing one for a child. #[cfg(not(windows))] pub const PATH_LIST_SEPARATOR: &str = ":"; diff --git a/src/telemetry/harness.rs b/src/telemetry/harness.rs index 3dce67daa..02dd42234 100644 --- a/src/telemetry/harness.rs +++ b/src/telemetry/harness.rs @@ -336,6 +336,17 @@ const PHRASES: &[&str] = &[ "running scripts is disabled on this system", "Unsupported platform", "Unsupported architecture", + // The OpenCode Windows installer's sources, then .NET's network faults. + "GitHub download failed", + "npm download failed", + "npm package checksum mismatch", + "The remote name could not be resolved", + "The operation has timed out", + "The underlying connection was closed", + "Could not create SSL/TLS secure channel", + "Could not establish trust relationship", + "Proxy Authentication Required", + "The revocation function was unable to check revocation", // Real failures the previous list discarded, leaving a NULL excerpt on // an exit that had a perfectly specific cause. "stdin is not a terminal", diff --git a/ui/messages/ar.json b/ui/messages/ar.json index c38d2e89b..df388604c 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -892,6 +892,9 @@ "onboarding_recheck_git_to_continue": "أعد فحص Git قبل المتابعة", "onboarding_waiting_git_check": "في انتظار فحص Git", "onboarding_install_git_to_continue": "ثبّت Git للمتابعة", + "onboarding_install_git": "ثبّت Git", + "onboarding_installing_git": "جارٍ تثبيت Git…", + "onboarding_install_git_for_windows": "يمكن لـ OpenResearch تثبيت Git for Windows لحسابك دون طلب صلاحيات المسؤول. Git مطلوب للتجارب المحلية.", "onboarding_choose_area_to_continue": "اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.", "onboarding_describe_area_to_continue": "صِف مجالك البحثي للمتابعة.", "onboarding_api_key": "مفتاح API", diff --git a/ui/messages/en.json b/ui/messages/en.json index 4dd7dbe37..f56cc7e77 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -893,6 +893,9 @@ "onboarding_recheck_git_to_continue": "Re-check Git before continuing", "onboarding_waiting_git_check": "Waiting for the Git check", "onboarding_install_git_to_continue": "Install Git to continue", + "onboarding_install_git": "Install Git", + "onboarding_installing_git": "Installing Git…", + "onboarding_install_git_for_windows": "OpenResearch can install Git for Windows for your account, with no administrator prompt. Git is required for local experiments.", "onboarding_choose_area_to_continue": "Choose at least one research area to continue.", "onboarding_describe_area_to_continue": "Describe your research area to continue.", "onboarding_api_key": "API key", diff --git a/ui/messages/es.json b/ui/messages/es.json index 1dbd64649..b45c53c67 100644 --- a/ui/messages/es.json +++ b/ui/messages/es.json @@ -893,6 +893,9 @@ "onboarding_recheck_git_to_continue": "Vuelve a comprobar Git antes de continuar", "onboarding_waiting_git_check": "Esperando la comprobación de Git", "onboarding_install_git_to_continue": "Instala Git para continuar", + "onboarding_install_git": "Instalar Git", + "onboarding_installing_git": "Instalando Git…", + "onboarding_install_git_for_windows": "OpenResearch puede instalar Git for Windows para tu cuenta, sin pedir permisos de administrador. Git es necesario para los experimentos locales.", "onboarding_choose_area_to_continue": "Elige al menos un área de investigación para continuar.", "onboarding_describe_area_to_continue": "Describe tu área de investigación para continuar.", "onboarding_api_key": "Clave de API", diff --git a/ui/messages/fa.json b/ui/messages/fa.json index f5e86e763..73a809808 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -887,6 +887,9 @@ "onboarding_recheck_git_to_continue": "پیش از ادامه Git را دوباره بررسی کنید", "onboarding_waiting_git_check": "در انتظار بررسی Git", "onboarding_install_git_to_continue": "برای ادامه Git را نصب کنید", + "onboarding_install_git": "نصب Git", + "onboarding_installing_git": "در حال نصب Git…", + "onboarding_install_git_for_windows": "OpenResearch می‌تواند Git for Windows را بدون نیاز به دسترسی مدیر برای حساب شما نصب کند. Git برای آزمایش‌های محلی لازم است.", "onboarding_choose_area_to_continue": "برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.", "onboarding_describe_area_to_continue": "برای ادامه حوزهٔ پژوهشی خود را شرح دهید.", "onboarding_api_key": "کلید API", diff --git a/ui/messages/hi.json b/ui/messages/hi.json index 187cae64d..2a3ba1c22 100644 --- a/ui/messages/hi.json +++ b/ui/messages/hi.json @@ -893,6 +893,9 @@ "onboarding_recheck_git_to_continue": "जारी रखने से पहले Git फिर से जाँचें", "onboarding_waiting_git_check": "Git जाँच का इंतज़ार है", "onboarding_install_git_to_continue": "जारी रखने के लिए Git इंस्टॉल करें", + "onboarding_install_git": "Git इंस्टॉल करें", + "onboarding_installing_git": "Git इंस्टॉल हो रहा है…", + "onboarding_install_git_for_windows": "OpenResearch आपके खाते के लिए Git for Windows इंस्टॉल कर सकता है, बिना एडमिनिस्ट्रेटर अनुमति के। स्थानीय प्रयोगों के लिए Git आवश्यक है।", "onboarding_choose_area_to_continue": "जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।", "onboarding_describe_area_to_continue": "जारी रखने के लिए अपना शोध क्षेत्र बताएं।", "onboarding_api_key": "API की", diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index 3647ca9b2..2e595422b 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -887,6 +887,9 @@ "onboarding_recheck_git_to_continue": "请重新检查 Git 后再继续", "onboarding_waiting_git_check": "正在等待 Git 检查", "onboarding_install_git_to_continue": "请安装 Git 后再继续", + "onboarding_install_git": "安装 Git", + "onboarding_installing_git": "正在安装 Git…", + "onboarding_install_git_for_windows": "OpenResearch 可以为你的账户安装 Git for Windows,无需管理员权限。本地实验需要 Git。", "onboarding_choose_area_to_continue": "请至少选择一个研究领域后再继续。", "onboarding_describe_area_to_continue": "请描述你的研究领域后再继续。", "onboarding_api_key": "API 密钥", diff --git a/ui/src/api.ts b/ui/src/api.ts index a9a6cb4b2..4500be903 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -255,6 +255,8 @@ export const completeOnboarding = (selection: OnboardingSelection, profile: Prof export interface ProjectPathStatus { gitVersion: string | null; + /** Only without a path: Windows with no Git, which `installGit` can fix. */ + gitInstallable?: boolean; resolvedPath: string | null; exists: boolean | null; directory: boolean | null; @@ -270,6 +272,8 @@ export const getProjectPathStatus = (path = "", signal?: AbortSignal) => { return get(`/api/project-path/status${query}`, signal); }; +export const installGit = () => post>("/api/git/install"); + export const pickProjectFolder = () => post<{ path: string | null }>("/api/project-path/pick").then((result) => result.path); diff --git a/ui/src/components/Onboarding.tsx b/ui/src/components/Onboarding.tsx index 050d91c11..3d74f19e5 100644 --- a/ui/src/components/Onboarding.tsx +++ b/ui/src/components/Onboarding.tsx @@ -18,6 +18,7 @@ import { captureUiEvent, type HarnessSetupCommands, completeOnboarding, + installGit, reasoningFor, type AgentSelection, type Harness, @@ -107,6 +108,7 @@ export function Onboarding({ useEffect(() => () => installSocket.current?.close(), []); const harnesses = harnessQuery.data ?? null; const gitVersion = pathQuery.data?.gitVersion; + const gitInstallable = !remote && pathQuery.data?.gitInstallable === true; const [finishing, setFinishing] = useState(false); const [finishError, setFinishError] = useState(null); const [finishErrorDetails, setFinishErrorDetails] = useState(""); @@ -157,6 +159,7 @@ export function Onboarding({ .finally(() => fresh() && setChecking(false)); }; useEffect(() => load(false), []); + const installGitMutation = useMutation({ mutationFn: installGit, onSuccess: () => load(true) }); useEffect(() => { if (harnesses === null) return; const ready = harnesses.filter((h) => h.agentReady && !h.catalogPending); @@ -435,6 +438,17 @@ export function Onboarding({ {gitError ? (

{m.onboarding_retry_connection()}

+ ) : gitInstallable ? ( +
+

{m.onboarding_install_git_for_windows()}

+ + {installGitMutation.isError && ( +

{installGitMutation.error.message}

+ )} +
) : (

{m.onboarding_git_is_required_for_local_experiments_install_git()} From 4f7e4f4d1e665e62ce6c2be2bd99a5b561bd8cc9 Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Mon, 5 Oct 2026 18:26:47 -0700 Subject: [PATCH 2/8] Address review: registry flags, 7z output path, install prompt on both steps Co-Authored-By: Claude Opus 5.5 --- README.md | 6 ++-- src/commands/up/harness_setup.rs | 21 +++++++---- src/commands/up/install_opencode.ps1 | 9 ++--- src/local/github.rs | 2 +- src/local/portable_git.rs | 54 +++++++++++++++++++++------- src/local/shell_env.rs | 7 ++-- ui/messages/ar.json | 2 +- ui/messages/en.json | 2 +- ui/messages/es.json | 2 +- ui/messages/fa.json | 2 +- ui/messages/hi.json | 2 +- ui/messages/zh-CN.json | 2 +- ui/src/components/Onboarding.tsx | 46 ++++++++++++++++++------ 13 files changed, 110 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 3741346be..e2b8521b4 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,9 @@ Either way, `orx` is linked into `~/.local/bin`, with a hint to add it to your `PATH` if needed. If you already ran `install.sh`, remove `~/.cargo/bin/orx` first and open a new terminal. -On Windows, use the beta download above. It needs -[Git for Windows](docs/windows.md), which onboarding can install for you. It installs for your account, with no -administrator prompt. The installer isn't signed yet, so Windows may say +On Windows, use the beta download above. It installs for your account, with no +administrator prompt, and onboarding can install [Git for Windows](docs/windows.md) +if you need it. The installer isn't signed yet, so Windows may say "Windows protected your PC": choose **More info** → **Run anyway**. On Linux, the desktop app is an AppImage for diff --git a/src/commands/up/harness_setup.rs b/src/commands/up/harness_setup.rs index 193598b52..fc0242e31 100644 --- a/src/commands/up/harness_setup.rs +++ b/src/commands/up/harness_setup.rs @@ -82,6 +82,15 @@ fn windows_powershell() -> String { "powershell.exe".into() } +/// `$LASTEXITCODE` persists from an earlier native call, so reset it or a +/// failing cmdlet exits with its code. +#[cfg(any(windows, test))] +fn windows_install_script(install: &str) -> String { + format!( + "$LASTEXITCODE = 0\n{install}\nif (-not $?) {{ if ($LASTEXITCODE) {{ exit $LASTEXITCODE }} else {{ exit 1 }} }}" + ) +} + /// PowerShell's `-EncodedCommand` form: base64 of the script's UTF-16LE. #[cfg(any(windows, test))] fn encoded_command(script: &str) -> String { @@ -289,11 +298,7 @@ async fn run( // Encoded: the console title echoes the command line into // the output, where the script's own phrases would be excerpted. "-EncodedCommand".into(), - // `$LASTEXITCODE` persists from an earlier native call, - // so reset it or a failing cmdlet exits with its code. - encoded_command(&format!( - "$LASTEXITCODE = 0\n{install}\nif (-not $?) {{ if ($LASTEXITCODE) {{ exit $LASTEXITCODE }} else {{ exit 1 }} }}" - )), + encoded_command(&windows_install_script(install)), ], ) } @@ -790,9 +795,11 @@ mod tests { #[test] fn the_windows_install_command_line_carries_none_of_its_phrases() { - let script = windows_install_command("opencode").unwrap(); + let script = windows_install_script(windows_install_command("opencode").unwrap()); assert!(script.contains("Unsupported architecture")); - let encoded = encoded_command(script); + // Nothing the script prints on failure may quote its own text either. + assert!(!script.contains("Write-Error")); + let encoded = encoded_command(&script); assert_eq!(crate::telemetry::harness::excerpt_for_test(&encoded), None); assert_eq!( encoded_command("exit 1"), diff --git a/src/commands/up/install_opencode.ps1 b/src/commands/up/install_opencode.ps1 index e741770e8..54182e130 100644 --- a/src/commands/up/install_opencode.ps1 +++ b/src/commands/up/install_opencode.ps1 @@ -22,7 +22,7 @@ try { # Unlike curl.exe, Invoke-WebRequest uses the system proxy and tolerates # revocation servers a filtered network cannot reach. try { - Invoke-WebRequest -UseBasicParsing -Uri $release -OutFile $archive -TimeoutSec 300 + Invoke-WebRequest -UseBasicParsing -Uri $release -OutFile $archive -TimeoutSec 30 Expand-Archive -Path $archive -DestinationPath $temp -Force $binary = Join-Path $temp 'opencode.exe' } catch { @@ -31,9 +31,9 @@ try { # The same build is published to npm, which networks that block GitHub's downloads often allow. if (-not $binary) { try { - $package = Invoke-RestMethod -UseBasicParsing -Uri "https://registry.npmjs.org/opencode-windows-$asset/latest" -TimeoutSec 60 + $package = Invoke-RestMethod -UseBasicParsing -Uri "https://registry.npmjs.org/opencode-windows-$asset/latest" -TimeoutSec 30 $tarball = Join-Path $temp 'opencode.tgz' - Invoke-WebRequest -UseBasicParsing -Uri $package.dist.tarball -OutFile $tarball -TimeoutSec 300 + Invoke-WebRequest -UseBasicParsing -Uri $package.dist.tarball -OutFile $tarball -TimeoutSec 30 $expected = -join ([Convert]::FromBase64String(($package.dist.integrity -replace '^sha512-', '')) | ForEach-Object { $_.ToString('x2') }) if ((Get-FileHash -LiteralPath $tarball -Algorithm SHA512).Hash -ne $expected) { throw 'npm package checksum mismatch.' } & (Join-Path $env:SystemRoot 'System32\tar.exe') -xzf $tarball -C $temp @@ -48,7 +48,8 @@ try { # Keep curl's own exit code so distinct network faults stay apart; the # throws below surface as exit 1 with their message. if ($LASTEXITCODE -ne 0) { - Write-Error "OpenCode download failed (curl exit $LASTEXITCODE)." -ErrorAction Continue + # Straight to stderr: an error record raised here prints this whole script as its source. + [Console]::Error.WriteLine("OpenCode download failed (curl exit $LASTEXITCODE).") exit $LASTEXITCODE } Expand-Archive -Path $archive -DestinationPath $temp -Force diff --git a/src/local/github.rs b/src/local/github.rs index 6c6daddf2..cf8931ab8 100644 --- a/src/local/github.rs +++ b/src/local/github.rs @@ -7,7 +7,7 @@ use tokio::process::Command; use crate::error::{anyhow, Result}; -const UA: &str = concat!("orx/", env!("CARGO_PKG_VERSION")); +pub(crate) const UA: &str = concat!("orx/", env!("CARGO_PKG_VERSION")); pub const SHALLOW_CLONE_THRESHOLD_KB: u64 = 250 * 1024; #[derive(Clone, Copy)] diff --git a/src/local/portable_git.rs b/src/local/portable_git.rs index b6c0520d8..683cd5b09 100644 --- a/src/local/portable_git.rs +++ b/src/local/portable_git.rs @@ -10,14 +10,14 @@ use anyhow::{anyhow, Context}; use std::path::{Path, PathBuf}; #[cfg(windows)] -fn root() -> Option { - dirs::data_local_dir().map(|dir| dir.join("OpenResearch").join("PortableGit")) +fn base() -> Option { + dirs::data_local_dir().map(|dir| dir.join("OpenResearch")) } /// The installed copy's `cmd` directory, the one Git's own installer puts on PATH. #[cfg(windows)] pub fn cmd_dir() -> Option { - let dir = root()?.join("cmd"); + let dir = base()?.join("PortableGit").join("cmd"); dir.join("git.exe").is_file().then_some(dir) } @@ -34,11 +34,12 @@ pub async fn install() -> Result<()> { if cmd_dir().is_some() { return Ok(()); } - let root = root().ok_or_else(|| anyhow!("Could not find %LOCALAPPDATA%."))?; - let parent = root.parent().expect("root has a parent"); - tokio::fs::create_dir_all(parent) + let parent = base().ok_or_else(|| anyhow!("Could not find %LOCALAPPDATA%."))?; + let root = parent.join("PortableGit"); + tokio::fs::create_dir_all(&parent) .await .with_context(|| format!("Could not create {}", parent.display()))?; + sweep_stale(&parent).await; let (url, sha256) = latest_asset().await?; let token = uuid::Uuid::new_v4().simple().to_string(); let archive = parent.join(format!("PortableGit-{token}.7z.exe")); @@ -56,12 +57,40 @@ pub async fn install() -> Result<()> { let _ = tokio::fs::remove_dir_all(&staging).await; } result?; - if super::git::version().is_none() { + if tokio::task::spawn_blocking(super::git::version) + .await? + .is_none() + { + // Removed, so the next attempt reinstalls rather than trusting this copy. + let _ = tokio::fs::remove_dir_all(&root).await; anyhow::bail!("Git was installed in {} but does not run.", root.display()); } Ok(()) } +/// Downloads and staging folders an interrupted install left beside `PortableGit`. +#[cfg(windows)] +async fn sweep_stale(parent: &Path) { + let Ok(mut entries) = tokio::fs::read_dir(parent).await else { + return; + }; + while let Ok(Some(entry)) = entries.next_entry().await { + if !entry + .file_name() + .to_string_lossy() + .starts_with("PortableGit-") + { + continue; + } + let path = entry.path(); + let _ = if path.is_dir() { + tokio::fs::remove_dir_all(&path).await + } else { + tokio::fs::remove_file(&path).await + }; + } +} + /// The release asset for this machine and its SHA-256, from GitHub's own digest. #[cfg(windows)] async fn latest_asset() -> Result<(String, String)> { @@ -72,6 +101,7 @@ async fn latest_asset() -> Result<(String, String)> { }; let release: serde_json::Value = client()? .get("https://api.github.com/repos/git-for-windows/git/releases/latest") + .timeout(std::time::Duration::from_secs(60)) .header("accept", "application/vnd.github+json") .header("x-github-api-version", "2022-11-28") .send() @@ -134,11 +164,10 @@ async fn download(url: &str, sha256: &str, archive: &Path) -> Result<()> { /// setup, run the way Git's own installer runs it. The copy stays relocatable. #[cfg(windows)] async fn unpack(archive: &Path, staging: &Path) -> Result<()> { - let mut output = std::ffi::OsString::from("-o"); - output.push(staging); + // Quoted by hand: 7-Zip's extractor reads `-o"

"`, not an argument quoted whole. let status = tokio::process::Command::new(archive) .arg("-y") - .arg(output) + .raw_arg(format!("-o\"{}\"", staging.display())) .status() .await .context("Could not start the Git for Windows extractor")?; @@ -170,9 +199,10 @@ async fn unpack(archive: &Path, staging: &Path) -> Result<()> { #[cfg(windows)] fn client() -> Result { reqwest::Client::builder() - .user_agent(concat!("orx/", env!("CARGO_PKG_VERSION"))) + .user_agent(super::github::UA) .connect_timeout(std::time::Duration::from_secs(20)) - .timeout(std::time::Duration::from_secs(600)) + // Per read, not total: a slow link must still finish the 60 MB download. + .read_timeout(std::time::Duration::from_secs(60)) .build() .context("Could not create an HTTP client") } diff --git a/src/local/shell_env.rs b/src/local/shell_env.rs index e220dcd17..0c06ff4ca 100644 --- a/src/local/shell_env.rs +++ b/src/local/shell_env.rs @@ -97,8 +97,7 @@ fn registry_path() -> Vec { use std::os::windows::ffi::OsStringExt; use windows_sys::Win32::Foundation::{ERROR_MORE_DATA, ERROR_SUCCESS}; use windows_sys::Win32::System::Registry::{ - RegGetValueW, HKEY, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, RRF_RT_REG_EXPAND_SZ, - RRF_RT_REG_SZ, + RegGetValueW, HKEY, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, RRF_RT_REG_SZ, }; fn wide(text: &str) -> Vec { @@ -116,7 +115,9 @@ fn registry_path() -> Vec { root, key.as_ptr(), value.as_ptr(), - RRF_RT_REG_SZ | RRF_RT_REG_EXPAND_SZ, + // Expanding (no RRF_NOEXPAND) returns REG_EXPAND_SZ as REG_SZ; + // naming RRF_RT_REG_EXPAND_SZ here fails with ERROR_INVALID_PARAMETER. + RRF_RT_REG_SZ, std::ptr::null_mut(), buffer.as_mut_ptr().cast(), &mut bytes, diff --git a/ui/messages/ar.json b/ui/messages/ar.json index 82958fe3b..9198bc981 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -897,7 +897,7 @@ "onboarding_install_git_to_continue": "ثبّت Git للمتابعة", "onboarding_install_git": "ثبّت Git", "onboarding_installing_git": "جارٍ تثبيت Git…", - "onboarding_install_git_for_windows": "يمكن لـ OpenResearch تثبيت Git for Windows لحسابك دون طلب صلاحيات المسؤول. Git مطلوب للتجارب المحلية.", + "onboarding_install_git_for_windows": "Git مطلوب للتجارب المحلية. يمكن لـ OpenResearch تثبيت Git for Windows لحسابك دون طلب صلاحيات المسؤول.", "onboarding_choose_area_to_continue": "اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.", "onboarding_describe_area_to_continue": "صِف مجالك البحثي للمتابعة.", "onboarding_api_key": "مفتاح API", diff --git a/ui/messages/en.json b/ui/messages/en.json index 9b1ce3960..a25681700 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -898,7 +898,7 @@ "onboarding_install_git_to_continue": "Install Git to continue", "onboarding_install_git": "Install Git", "onboarding_installing_git": "Installing Git…", - "onboarding_install_git_for_windows": "OpenResearch can install Git for Windows for your account, with no administrator prompt. Git is required for local experiments.", + "onboarding_install_git_for_windows": "Git is required for local experiments. OpenResearch can install Git for Windows for your account, with no administrator prompt.", "onboarding_choose_area_to_continue": "Choose at least one research area to continue.", "onboarding_describe_area_to_continue": "Describe your research area to continue.", "onboarding_api_key": "API key", diff --git a/ui/messages/es.json b/ui/messages/es.json index 43daab40e..c2187071f 100644 --- a/ui/messages/es.json +++ b/ui/messages/es.json @@ -898,7 +898,7 @@ "onboarding_install_git_to_continue": "Instala Git para continuar", "onboarding_install_git": "Instalar Git", "onboarding_installing_git": "Instalando Git…", - "onboarding_install_git_for_windows": "OpenResearch puede instalar Git for Windows para tu cuenta, sin pedir permisos de administrador. Git es necesario para los experimentos locales.", + "onboarding_install_git_for_windows": "Git es necesario para los experimentos locales. OpenResearch puede instalar Git for Windows para tu cuenta, sin pedir permisos de administrador.", "onboarding_choose_area_to_continue": "Elige al menos un área de investigación para continuar.", "onboarding_describe_area_to_continue": "Describe tu área de investigación para continuar.", "onboarding_api_key": "Clave de API", diff --git a/ui/messages/fa.json b/ui/messages/fa.json index 6997f391b..0f992f6be 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -892,7 +892,7 @@ "onboarding_install_git_to_continue": "برای ادامه Git را نصب کنید", "onboarding_install_git": "نصب Git", "onboarding_installing_git": "در حال نصب Git…", - "onboarding_install_git_for_windows": "OpenResearch می‌تواند Git for Windows را بدون نیاز به دسترسی مدیر برای حساب شما نصب کند. Git برای آزمایش‌های محلی لازم است.", + "onboarding_install_git_for_windows": "Git برای آزمایش‌های محلی لازم است. OpenResearch می‌تواند Git for Windows را بدون نیاز به دسترسی مدیر برای حساب شما نصب کند.", "onboarding_choose_area_to_continue": "برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.", "onboarding_describe_area_to_continue": "برای ادامه حوزهٔ پژوهشی خود را شرح دهید.", "onboarding_api_key": "کلید API", diff --git a/ui/messages/hi.json b/ui/messages/hi.json index e46ba03a6..58208f0b7 100644 --- a/ui/messages/hi.json +++ b/ui/messages/hi.json @@ -898,7 +898,7 @@ "onboarding_install_git_to_continue": "जारी रखने के लिए Git इंस्टॉल करें", "onboarding_install_git": "Git इंस्टॉल करें", "onboarding_installing_git": "Git इंस्टॉल हो रहा है…", - "onboarding_install_git_for_windows": "OpenResearch आपके खाते के लिए Git for Windows इंस्टॉल कर सकता है, बिना एडमिनिस्ट्रेटर अनुमति के। स्थानीय प्रयोगों के लिए Git आवश्यक है।", + "onboarding_install_git_for_windows": "स्थानीय प्रयोगों के लिए Git ज़रूरी है। OpenResearch बिना एडमिनिस्ट्रेटर अनुमति के आपके खाते के लिए Git for Windows इंस्टॉल कर सकता है।", "onboarding_choose_area_to_continue": "जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।", "onboarding_describe_area_to_continue": "जारी रखने के लिए अपना शोध क्षेत्र बताएं।", "onboarding_api_key": "API की", diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index 14ce2e338..909a7afbf 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -892,7 +892,7 @@ "onboarding_install_git_to_continue": "请安装 Git 后再继续", "onboarding_install_git": "安装 Git", "onboarding_installing_git": "正在安装 Git…", - "onboarding_install_git_for_windows": "OpenResearch 可以为你的账户安装 Git for Windows,无需管理员权限。本地实验需要 Git。", + "onboarding_install_git_for_windows": "本地实验需要 Git。OpenResearch 可以为你的账户安装 Git for Windows,无需管理员权限。", "onboarding_choose_area_to_continue": "请至少选择一个研究领域后再继续。", "onboarding_describe_area_to_continue": "请描述你的研究领域后再继续。", "onboarding_api_key": "API 密钥", diff --git a/ui/src/components/Onboarding.tsx b/ui/src/components/Onboarding.tsx index 3d74f19e5..e3e4e645c 100644 --- a/ui/src/components/Onboarding.tsx +++ b/ui/src/components/Onboarding.tsx @@ -160,6 +160,14 @@ export function Onboarding({ }; useEffect(() => load(false), []); const installGitMutation = useMutation({ mutationFn: installGit, onSuccess: () => load(true) }); + const gitInstallPrompt = ( + installGitMutation.mutate()} + /> + ); useEffect(() => { if (harnesses === null) return; const ready = harnesses.filter((h) => h.agentReady && !h.catalogPending); @@ -439,16 +447,7 @@ export function Onboarding({ {gitError ? (

{m.onboarding_retry_connection()}

) : gitInstallable ? ( -
-

{m.onboarding_install_git_for_windows()}

- - {installGitMutation.isError && ( -

{installGitMutation.error.message}

- )} -
+ gitInstallPrompt ) : (

{m.onboarding_git_is_required_for_local_experiments_install_git()} @@ -622,7 +621,9 @@ export function Onboarding({ {automaticSetup && !gitReady && (

-

{gitError ? m.onboarding_retry_connection() : m.onboarding_git_is_required_for_local_experiments_install_git()}

+ {gitInstallable && !gitError ? gitInstallPrompt : ( +

{gitError ? m.onboarding_retry_connection() : m.onboarding_git_is_required_for_local_experiments_install_git()}

+ )}
)} @@ -814,6 +815,29 @@ function AgentCard({ ); } +function GitInstallPrompt({ + pending, + error, + disabled, + onInstall, +}: { + pending: boolean; + error: Error | null; + disabled: boolean; + onInstall: () => void; +}) { + return ( +
+

{m.onboarding_install_git_for_windows()}

+ + {error &&

{error.message}

} +
+ ); +} + function LocalGitCard({ gitVersion, error, From 10ff92a677bd25bd6e62c4f26d0eedbade5b0ecb Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Mon, 5 Oct 2026 18:35:42 -0700 Subject: [PATCH 3/8] Address review round two; reword the OpenCode architecture error Co-Authored-By: Claude Opus 5.5 --- docs/windows.md | 7 +- src/commands/up.rs | 5 +- src/commands/up/harness_setup.rs | 2 +- src/commands/up/install_opencode.ps1 | 2 +- src/local/portable_git.rs | 82 +++- ...iew-CUNM1AGl.js => PdfPreview-DTe4mY-0.js} | 2 +- .../{index-G7UvmvQl.js => index-n2QHfWHn.js} | 452 +++++++++--------- ui/dist/index.html | 2 +- ui/messages/ar.json | 2 +- ui/src/components/Onboarding.tsx | 12 +- 10 files changed, 303 insertions(+), 265 deletions(-) rename ui/dist/assets/{PdfPreview-CUNM1AGl.js => PdfPreview-DTe4mY-0.js} (99%) rename ui/dist/assets/{index-G7UvmvQl.js => index-n2QHfWHn.js} (65%) diff --git a/docs/windows.md b/docs/windows.md index e472645ad..c0daa06aa 100644 --- a/docs/windows.md +++ b/docs/windows.md @@ -8,9 +8,10 @@ experiment runs and the nanochat demo. The gaps are listed at the bottom. **Git for Windows is required**, and for more than git. It is the only source of the `bash` and coreutils that orx uses to run experiments — the `bash.exe` in `System32` is the WSL launcher, which cannot see your files, and orx rejects it. -Install it with the standard installer so `git.exe` lands on `PATH`; orx finds -the shell by walking up from there. orx notices a Git installed while it runs, -so **Re-check** in onboarding is enough; there is no need to restart. +Install it with the standard installer so `git.exe` lands on `PATH`, or let +onboarding install it (below); orx finds the shell by walking up from `git.exe`. +orx notices a Git installed while it runs, so **Re-check** in onboarding is +enough; there is no need to restart. If you have no Git, onboarding offers **Install Git**. orx downloads the latest PortableGit from Git for Windows' GitHub releases, checks it against the SHA-256 diff --git a/src/commands/up.rs b/src/commands/up.rs index ab14545ae..c4a2ce9a4 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -1360,7 +1360,10 @@ struct ProjectPathStatusQ { } async fn install_git() -> ApiResult { - local::portable_git::install().await?; + // Spawned, so a page reload mid-install cannot orphan the extractor. + tokio::spawn(local::portable_git::install()) + .await + .map_err(|error| ApiError::from(anyhow!("Git install task failed: {error}")))??; Ok(Json(json!({}))) } diff --git a/src/commands/up/harness_setup.rs b/src/commands/up/harness_setup.rs index fc0242e31..510c522d8 100644 --- a/src/commands/up/harness_setup.rs +++ b/src/commands/up/harness_setup.rs @@ -796,7 +796,7 @@ mod tests { #[test] fn the_windows_install_command_line_carries_none_of_its_phrases() { let script = windows_install_script(windows_install_command("opencode").unwrap()); - assert!(script.contains("Unsupported architecture")); + assert!(script.contains("GitHub download failed")); // Nothing the script prints on failure may quote its own text either. assert!(!script.contains("Write-Error")); let encoded = encoded_command(&script); diff --git a/src/commands/up/install_opencode.ps1 b/src/commands/up/install_opencode.ps1 index 54182e130..d6f5e3214 100644 --- a/src/commands/up/install_opencode.ps1 +++ b/src/commands/up/install_opencode.ps1 @@ -8,7 +8,7 @@ $arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToSt $asset = switch ($arch) { 'X64' { 'x64-baseline' } 'Arm64' { 'arm64' } - default { throw "Unsupported architecture: $arch" } + default { throw "OpenCode has no Windows build for $arch processors." } } $temp = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName()) $destination = Join-Path $env:USERPROFILE '.opencode\bin' diff --git a/src/local/portable_git.rs b/src/local/portable_git.rs index 683cd5b09..cc4bb1270 100644 --- a/src/local/portable_git.rs +++ b/src/local/portable_git.rs @@ -3,9 +3,9 @@ //! no PATH change. [`super::shell_env::search_path`] appends its `cmd` directory, //! which is also how [`super::bash`] finds the bash it ships. -use anyhow::Result; +use crate::error::Result; #[cfg(windows)] -use anyhow::{anyhow, Context}; +use crate::error::{anyhow, bail, Context}; #[cfg(windows)] use std::path::{Path, PathBuf}; @@ -23,7 +23,7 @@ pub fn cmd_dir() -> Option { #[cfg(not(windows))] pub async fn install() -> Result<()> { - anyhow::bail!("orx installs Git only on Windows.") + crate::error::bail!("orx installs Git only on Windows.") } /// Download the latest PortableGit, check it against GitHub's digest, and unpack it. @@ -40,6 +40,12 @@ pub async fn install() -> Result<()> { .await .with_context(|| format!("Could not create {}", parent.display()))?; sweep_stale(&parent).await; + // A copy without `cmd\git.exe` is a damaged leftover the rename cannot replace. + if root.exists() { + tokio::fs::remove_dir_all(&root) + .await + .with_context(|| format!("Could not remove {}", root.display()))?; + } let (url, sha256) = latest_asset().await?; let token = uuid::Uuid::new_v4().simple().to_string(); let archive = parent.join(format!("PortableGit-{token}.7z.exe")); @@ -47,27 +53,50 @@ pub async fn install() -> Result<()> { let result = async { download(&url, &sha256, &archive).await?; unpack(&archive, &staging).await?; - tokio::fs::rename(&staging, &root) - .await - .with_context(|| format!("Could not move Git into {}", root.display())) + verify(&staging).await?; + rename_into_place(&staging, &root).await } .await; let _ = tokio::fs::remove_file(&archive).await; if result.is_err() { let _ = tokio::fs::remove_dir_all(&staging).await; } - result?; - if tokio::task::spawn_blocking(super::git::version) - .await? - .is_none() - { - // Removed, so the next attempt reinstalls rather than trusting this copy. - let _ = tokio::fs::remove_dir_all(&root).await; - anyhow::bail!("Git was installed in {} but does not run.", root.display()); + result +} + +/// Runs the unpacked `git.exe` itself: whatever `git` PATH finds first may not be this one. +#[cfg(windows)] +async fn verify(staging: &Path) -> Result<()> { + let output = tokio::process::Command::new(staging.join(r"cmd\git.exe")) + .arg("--version") + .output() + .await + .context("Could not run the downloaded Git")?; + if !output.status.success() { + bail!("The downloaded Git does not run ({}).", output.status); } Ok(()) } +/// Retried: antivirus and the search indexer briefly hold files that were just unpacked. +#[cfg(windows)] +async fn rename_into_place(staging: &Path, root: &Path) -> Result<()> { + let mut attempt = 0; + loop { + match tokio::fs::rename(staging, root).await { + Ok(()) => return Ok(()), + Err(_) if attempt < 4 => { + attempt += 1; + tokio::time::sleep(std::time::Duration::from_millis(500 * attempt)).await; + } + Err(error) => { + return Err(error) + .with_context(|| format!("Could not move Git into {}", root.display())) + } + } + } +} + /// Downloads and staging folders an interrupted install left beside `PortableGit`. #[cfg(windows)] async fn sweep_stale(parent: &Path) { @@ -91,14 +120,11 @@ async fn sweep_stale(parent: &Path) { } } -/// The release asset for this machine and its SHA-256, from GitHub's own digest. +/// The x64 release asset and its SHA-256, from GitHub's own digest. orx ships +/// Windows for x64 only, which Arm machines run emulated. #[cfg(windows)] async fn latest_asset() -> Result<(String, String)> { - let suffix = if cfg!(target_arch = "aarch64") { - "-arm64.7z.exe" - } else { - "-64-bit.7z.exe" - }; + let suffix = "-64-bit.7z.exe"; let release: serde_json::Value = client()? .get("https://api.github.com/repos/git-for-windows/git/releases/latest") .timeout(std::time::Duration::from_secs(60)) @@ -155,25 +181,29 @@ async fn download(url: &str, sha256: &str, archive: &Path) -> Result<()> { } file.flush().await?; if format!("{:x}", hasher.finalize()) != sha256 { - anyhow::bail!("The Git for Windows download does not match GitHub's checksum."); + bail!("The Git for Windows download does not match GitHub's checksum."); } Ok(()) } /// PortableGit is a 7-Zip self-extractor; `post-install.bat` finishes its `/etc` -/// setup, run the way Git's own installer runs it. The copy stays relocatable. +/// setup. The copy stays relocatable, so it is set up in staging and then moved. #[cfg(windows)] async fn unpack(archive: &Path, staging: &Path) -> Result<()> { // Quoted by hand: 7-Zip's extractor reads `-o""`, not an argument quoted whole. + let mut output = std::ffi::OsString::from("-o\""); + output.push(staging); + output.push("\""); let status = tokio::process::Command::new(archive) .arg("-y") - .raw_arg(format!("-o\"{}\"", staging.display())) + .raw_arg(output) .status() .await .context("Could not start the Git for Windows extractor")?; if !status.success() { - anyhow::bail!("Extracting Git for Windows failed ({status})."); + bail!("Extracting Git for Windows failed ({status})."); } + // The extractor normally runs and deletes it; run it here only if it remains. if staging.join("post-install.bat").is_file() { let status = tokio::process::Command::new(staging.join("git-bash.exe")) .args([ @@ -187,11 +217,11 @@ async fn unpack(archive: &Path, staging: &Path) -> Result<()> { .await .context("Could not run Git for Windows' post-install step")?; if !status.success() { - anyhow::bail!("Git for Windows' post-install step failed ({status})."); + bail!("Git for Windows' post-install step failed ({status})."); } } if !staging.join(r"cmd\git.exe").is_file() || !staging.join(r"bin\bash.exe").is_file() { - anyhow::bail!("The Git for Windows download is missing git.exe or bash.exe."); + bail!("The Git for Windows download is missing git.exe or bash.exe."); } Ok(()) } diff --git a/ui/dist/assets/PdfPreview-CUNM1AGl.js b/ui/dist/assets/PdfPreview-DTe4mY-0.js similarity index 99% rename from ui/dist/assets/PdfPreview-CUNM1AGl.js rename to ui/dist/assets/PdfPreview-DTe4mY-0.js index 5fe09c621..e7849edcf 100644 --- a/ui/dist/assets/PdfPreview-CUNM1AGl.js +++ b/ui/dist/assets/PdfPreview-DTe4mY-0.js @@ -1,4 +1,4 @@ -var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-G7UvmvQl.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():m1()}),A1=()=>"Fit to width",x1=()=>"适应宽度",S1=()=>"متناسب با عرض",T1=()=>"ملاءمة العرض",C1=()=>"Ajustar al ancho",P1=()=>"चौड़ाई में फ़िट करें",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?x1():t==="fa"?S1():t==="ar"?T1():t==="es"?C1():t==="hi"?P1():A1()}),I1=()=>"Next match",R1=()=>"下一个匹配项",O1=()=>"مورد بعدی",M1=()=>"التطابق التالي",D1=()=>"Coincidencia siguiente",L1=()=>"अगला मिलान",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?R1():t==="fa"?O1():t==="ar"?M1():t==="es"?D1():t==="hi"?L1():I1()}),N1=()=>"Previous match",F1=()=>"上一个匹配项",k1=()=>"مورد قبلی",B1=()=>"التطابق السابق",j1=()=>"Coincidencia anterior",U1=()=>"पिछला मिलान",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():N1()});/** +var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-n2QHfWHn.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():m1()}),A1=()=>"Fit to width",x1=()=>"适应宽度",S1=()=>"متناسب با عرض",T1=()=>"ملاءمة العرض",C1=()=>"Ajustar al ancho",P1=()=>"चौड़ाई में फ़िट करें",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?x1():t==="fa"?S1():t==="ar"?T1():t==="es"?C1():t==="hi"?P1():A1()}),I1=()=>"Next match",R1=()=>"下一个匹配项",O1=()=>"مورد بعدی",M1=()=>"التطابق التالي",D1=()=>"Coincidencia siguiente",L1=()=>"अगला मिलान",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?R1():t==="fa"?O1():t==="ar"?M1():t==="es"?D1():t==="hi"?L1():I1()}),N1=()=>"Previous match",F1=()=>"上一个匹配项",k1=()=>"مورد قبلی",B1=()=>"التطابق السابق",j1=()=>"Coincidencia anterior",U1=()=>"पिछला मिलान",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?F1():t==="fa"?k1():t==="ar"?B1():t==="es"?j1():t==="hi"?U1():N1()});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/ui/dist/assets/index-G7UvmvQl.js b/ui/dist/assets/index-n2QHfWHn.js similarity index 65% rename from ui/dist/assets/index-G7UvmvQl.js rename to ui/dist/assets/index-n2QHfWHn.js index 402917d93..c0c8fac15 100644 --- a/ui/dist/assets/index-G7UvmvQl.js +++ b/ui/dist/assets/index-n2QHfWHn.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-CUNM1AGl.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); -var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in e?hK(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var li=(e,n,t)=>pK(e,typeof n!="symbol"?n+"":n,t),ew=(e,n,t)=>n.has(e)||lE("Cannot "+t);var ue=(e,n,t)=>(ew(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?lE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ve=(e,n,t,r)=>(ew(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Kt=(e,n,t)=>(ew(e,n,"access private method"),t);var n0=(e,n,t,r)=>({set _(s){Ve(e,n,s,t)},get _(){return ue(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function qm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tw={exports:{}},r0={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-DTe4mY-0.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in e?hK(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var li=(e,n,t)=>pK(e,typeof n!="symbol"?n+"":n,t),tw=(e,n,t)=>n.has(e)||lE("Cannot "+t);var ue=(e,n,t)=>(tw(e,n,"read from private field"),t?t.call(e):n.get(e)),ut=(e,n,t)=>n.has(e)?lE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(tw(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Vt=(e,n,t)=>(tw(e,n,"access private method"),t);var n0=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return ue(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function Um(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nw={exports:{}},r0={};/** * @license React * react-jsx-runtime.production.js * @@ -7,7 +7,7 @@ var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var uE;function mK(){if(uE)return r0;uE=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var o in s)o!=="key"&&(i[o]=s[o])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:a,ref:s!==void 0?s:null,props:i}}return r0.Fragment=n,r0.jsx=t,r0.jsxs=t,r0}var _E;function gK(){return _E||(_E=1,tw.exports=mK()),tw.exports}var f=gK(),nw={exports:{}},an={};/** + */var uE;function mK(){if(uE)return r0;uE=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var o in s)o!=="key"&&(i[o]=s[o])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:a,ref:s!==void 0?s:null,props:i}}return r0.Fragment=n,r0.jsx=t,r0.jsxs=t,r0}var _E;function gK(){return _E||(_E=1,nw.exports=mK()),nw.exports}var _=gK(),rw={exports:{}},ln={};/** * @license React * react.production.js * @@ -15,7 +15,7 @@ var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var fE;function vK(){if(fE)return an;fE=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function y(F,q,V){this.props=F,this.context=q,this.refs=v,this.updater=V||w}y.prototype.isReactComponent={},y.prototype.setState=function(F,q){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,q,"setState")},y.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=y.prototype;function b(F,q,V){this.props=F,this.context=q,this.refs=v,this.updater=V||w}var C=b.prototype=new x;C.constructor=b,k(C,y.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function z(){}var A={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,q,V){var ie=V.ref;return{$$typeof:e,type:F,key:q,ref:ie!==void 0?ie:null,props:V}}function D(F,q){return M(F.type,q,F.props)}function L(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function B(F){var q={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(V){return q[V]})}var U=/\/+/g;function H(F,q){return typeof F=="object"&&F!==null&&F.key!=null?B(""+F.key):q.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(z,z):(F.status="pending",F.then(function(q){F.status==="pending"&&(F.status="fulfilled",F.value=q)},function(q){F.status==="pending"&&(F.status="rejected",F.reason=q)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,q,V,ie,oe){var ce=typeof F;(ce==="undefined"||ce==="boolean")&&(F=null);var ne=!1;if(F===null)ne=!0;else switch(ce){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(F.$$typeof){case e:case n:ne=!0;break;case d:return ne=F._init,K(ne(F._payload),q,V,ie,oe)}}if(ne)return oe=oe(F),ne=ie===""?"."+H(F,0):ie,N(oe)?(V="",ne!=null&&(V=ne.replace(U,"$&/")+"/"),K(oe,q,V,"",function(le){return le})):oe!=null&&(L(oe)&&(oe=D(oe,V+(oe.key==null||F&&F.key===oe.key?"":(""+oe.key).replace(U,"$&/")+"/")+ne)),q.push(oe)),1;ne=0;var G=ie===""?".":ie+":";if(N(F))for(var ae=0;ae{const n=T.useContext(UO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},bK=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(UO.Provider,{value:e,children:n})),yK={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var Bu,eS,RO,xK=(RO=class{constructor(){lt(this,Bu,yK);lt(this,eS,!1)}setTimeoutProvider(e){Ve(this,Bu,e)}setTimeout(e,n){return ue(this,Bu).setTimeout(e,n)}clearTimeout(e){ue(this,Bu).clearTimeout(e)}setInterval(e,n){return ue(this,Bu).setInterval(e,n)}clearInterval(e){ue(this,Bu).clearInterval(e)}},Bu=new WeakMap,eS=new WeakMap,RO);const Z_=new xK;function wK(e){setTimeout(e,0)}const kK=typeof window>"u"||"Deno"in globalThis;function hi(){}function SK(e,n){return typeof e=="function"?e(n):e}function GO(e){return typeof e=="number"&&e>=0&&e!==1/0}function VO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function es(e,n){return typeof e=="function"?e(n):e}function hE(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==tS(a,n.options))return!1}else if(!Oh(n.queryKey,a))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function pE(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(Sf(n.options.mutationKey)!==Sf(i))return!1}else if(!Oh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function tS(e,n){return((n==null?void 0:n.queryKeyHashFn)||Sf)(e)}function Sf(e){return JSON.stringify(e,(n,t)=>i3(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Oh(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){for(let r=0;r500)return n;const r=mE(e)&&mE(n);if(!r&&!(i3(e)&&i3(n)))return n;const s=(r?e:Object.keys(e)).length,i=r?n:Object.keys(n),a=i.length,o=r?new Array(a):{};let c=0;for(let u=0;u{Z_.setTimeout(n,e)})}function a3(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?nS(e,n):n}function NK(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function zK(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const rS=Symbol();function KO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===rS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sS(e,n){return typeof e=="function"?e(...n):!!e}function jK(e,n,t){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),r||(r=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let AK=()=>kK;const iS=()=>AK();var qf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rf,Pu,mh,MO,TK=(MO=class extends qf{constructor(){super();lt(this,rf);lt(this,Pu);lt(this,mh);Ve(this,mh,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,Pu)||this.setEventListener(ue(this,mh))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,Pu))==null||n.call(this),Ve(this,Pu,void 0))}setEventListener(n){var t;Ve(this,mh,n),(t=ue(this,Pu))==null||t.call(this),Ve(this,Pu,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,rf)!==n&&(Ve(this,rf,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,rf)=="boolean"?ue(this,rf):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},rf=new WeakMap,Pu=new WeakMap,mh=new WeakMap,MO);const aS=new TK,RK=wK;function MK(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=RK;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Fr=MK();var gh,Fu,vh,OO,OK=(OO=class extends qf{constructor(){super();lt(this,gh,!0);lt(this,Fu);lt(this,vh);Ve(this,vh,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){ue(this,Fu)||this.setEventListener(ue(this,vh))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,Fu))==null||n.call(this),Ve(this,Fu,void 0))}setEventListener(n){var t;Ve(this,vh,n),(t=ue(this,Fu))==null||t.call(this),Ve(this,Fu,n(this.setOnline.bind(this)))}setOnline(n){ue(this,gh)!==n&&(Ve(this,gh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,gh)}},gh=new WeakMap,Fu=new WeakMap,vh=new WeakMap,OO);const Fv=new OK;function DK(e){return Math.min(1e3*2**e,3e4)}function WO(e){return(e??"online")==="online"?Fv.isOnline():!0}var Hv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function LK(e){return e instanceof Hv}function QO(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((x,b)=>{i=x,a=b});o.catch(hi);const c=()=>s!=="pending",u=x=>{var b;if(!c()){const C=new Hv(x);k(C),(b=e.onCancel)==null||b.call(e,C)}},d=()=>{n=!0},_=()=>{n=!1},p=()=>aS.isFocused()&&(e.networkMode==="always"||Fv.isOnline())&&e.canRun(),m=()=>WO(e.networkMode)&&e.canRun(),w=x=>{c()||(r==null||r(),s="resolved",i(x))},k=x=>{c()||(r==null||r(),s="rejected",a(x))},v=()=>new Promise(x=>{var b;r=C=>{(c()||p())&&x(C)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;r=void 0,c()||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(c())return;let x;const b=t===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(w).catch(C=>{var M;if(c())return;const N=e.retry??(iS()?0:3),z=e.retryDelay??DK,A=typeof z=="function"?z(t,C):z,j=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):y()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:d,continueRetry:_,canStart:m,start:()=>(m()?y():v().then(y),o)}}var sf,DO,XO=(DO=class{constructor(){lt(this,sf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&Ve(this,sf,Z_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(iS()?1/0:3e5))}clearGcTimeout(){ue(this,sf)!==void 0&&(Z_.clearTimeout(ue(this,sf)),Ve(this,sf,void 0))}},sf=new WeakMap,DO);function IK(e){return{onFetch:(n,t)=>{var d,_,p,m,w;const r=n.options,s=(p=(_=(d=n.fetchOptions)==null?void 0:d.meta)==null?void 0:_.fetchMore)==null?void 0:p.direction,i=((m=n.state.data)==null?void 0:m.pages)||[],a=((w=n.state.data)==null?void 0:w.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let k=!1;const v=b=>{jK(b,()=>n.signal,()=>k=!0)},y=KO(n.options,n.fetchOptions),x=async(b,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&b.pages.length)return Promise.resolve(b);const A=(()=>{const L={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(L),L})(),j=await y(A),{maxPages:M}=n.options,D=N?zK:NK;return{pages:D(b.pages,j,M),pageParams:D(b.pageParams,C,M)}};if(s&&i.length){const b=s==="backward",C=b?YO:o3,N={pages:i,pageParams:a};o=await x(N,C(r,N),b)}else{const b=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:o3(r,o);if(c>0&&C==null)break;o=await x(o,C),c++}while(c{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function o3(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function YO(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}function $K(e,n){return n?o3(e,n)!=null:!1}function BK(e,n){return!n||!e.getPreviousPageParam?!1:YO(e,n)!=null}var bh,af,yh,uo,of,Ls,jm,cf,Lo,Sl,LO,PK=(LO=class extends XO{constructor(n){super();lt(this,Lo);lt(this,bh);lt(this,af);lt(this,yh);lt(this,uo);lt(this,of);lt(this,Ls);lt(this,jm);lt(this,cf);Ve(this,cf,!1),Ve(this,jm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ve(this,of,n.client),Ve(this,uo,ue(this,of).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ve(this,af,bE(this.options)),this.state=n.state??ue(this,af),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,bh)}get promise(){var n;return(n=ue(this,Ls))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,jm),...n},n!=null&&n._type&&Ve(this,bh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=bE(this.options);t.data!==void 0&&(this.setState(vE(t.data,t.dataUpdatedAt)),Ve(this,af,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,uo).remove(this)}setData(n,t){const r=a3(this.state.data,n,this.options);return Kt(this,Lo,Sl).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Kt(this,Lo,Sl).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,Ls))==null?void 0:r.promise;return(s=ue(this,Ls))==null||s.cancel(n),t?t.then(hi).catch(hi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,af)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>es(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>es(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!VO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,Ls))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,Ls))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,uo).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,Ls)&&(ue(this,cf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,Ls).cancel({revert:!0}):ue(this,Ls).cancelRetry()),this.scheduleGc()),ue(this,uo).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Kt(this,Lo,Sl).call(this,{type:"invalidate"})}async fetch(n,t){var u,d,_,p,m,w,k,v,y,x,b,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,Ls))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Ls))return ue(this,Ls).continueRetry(),ue(this,Ls).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(z=>z.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ve(this,cf,!0),r.signal)})},i=()=>{const N=KO(this.options,t),A=(()=>{const j={client:ue(this,of),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ve(this,cf,!1),this.options.persister?this.options.persister(N,A,this):N(A)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,of),state:this.state,fetchFn:i};return s(N),N})();(d=ue(this,bh)==="infinite"?IK(this.options.pages):this.options.behavior)==null||d.onFetch(o,this),Ve(this,yh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((_=o.fetchOptions)==null?void 0:_.meta))&&Kt(this,Lo,Sl).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ve(this,Ls,QO({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof Hv&&N.revert&&this.setState({...ue(this,yh),fetchStatus:"idle"}),r.abort()},onFail:(N,z)=>{Kt(this,Lo,Sl).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{Kt(this,Lo,Sl).call(this,{type:"pause"})},onContinue:()=>{Kt(this,Lo,Sl).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await c.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(w=(m=ue(this,uo).config).onSuccess)==null||w.call(m,N,this),(v=(k=ue(this,uo).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof Hv){if(N.silent)return ue(this,Ls).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Kt(this,Lo,Sl).call(this,{type:"error",error:N}),(x=(y=ue(this,uo).config).onError)==null||x.call(y,N,this),(C=(b=ue(this,uo).config).onSettled)==null||C.call(b,this.state.data,N,this),N}finally{ue(this,Ls)===c&&Ve(this,Ls,void 0),this.scheduleGc()}}},bh=new WeakMap,af=new WeakMap,yh=new WeakMap,uo=new WeakMap,of=new WeakMap,Ls=new WeakMap,jm=new WeakMap,cf=new WeakMap,Lo=new WeakSet,Sl=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ZO(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...vE(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ve(this,yh,n.manual?s:void 0),s;case"error":const i=n.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Fr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,uo).notify({query:this,type:"updated",action:n})})},LO);function ZO(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WO(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vE(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bE(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var zi,Mn,Am,ji,lf,xh,zl,Tm,wh,kh,uf,_f,Hu,Sh,tr,k0,c3,l3,u3,_3,f3,d3,h3,p3,IO,Xb=(IO=class extends qf{constructor(n,t){super();lt(this,tr);lt(this,zi);lt(this,Mn);lt(this,Am);lt(this,ji);lt(this,lf);lt(this,xh);lt(this,zl);lt(this,Tm);lt(this,wh);lt(this,kh);lt(this,uf);lt(this,_f);lt(this,Hu);lt(this,Sh,new Set);this.options=t,Ve(this,zi,n),Ve(this,zl,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Mn).addObserver(this),yE(ue(this,Mn),this.options)?Kt(this,tr,k0).call(this):this.updateResult(),Kt(this,tr,f3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return m3(ue(this,Mn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return m3(ue(this,Mn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Kt(this,tr,d3).call(this),Kt(this,tr,h3).call(this),ue(this,Mn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Mn);if(this.options=ue(this,zi).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof es(this.options.enabled,ue(this,Mn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Kt(this,tr,p3).call(this),ue(this,Mn).setOptions(this.options),t._defaulted&&!j0(this.options,t)&&ue(this,zi).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Mn),observer:this});const s=this.hasListeners();s&&xE(ue(this,Mn),r,this.options,t)&&Kt(this,tr,k0).call(this),this.updateResult(),s&&(ue(this,Mn)!==r||es(this.options.enabled,ue(this,Mn))!==es(t.enabled,ue(this,Mn))||es(this.options.staleTime,ue(this,Mn))!==es(t.staleTime,ue(this,Mn)))&&Kt(this,tr,l3).call(this);const i=Kt(this,tr,u3).call(this);s&&(ue(this,Mn)!==r||es(this.options.enabled,ue(this,Mn))!==es(t.enabled,ue(this,Mn))||i!==ue(this,Hu))&&Kt(this,tr,_3).call(this,i)}getOptimisticResult(n){const t=ue(this,zi).getQueryCache().build(ue(this,zi),n),r=this.createResult(t,n);return j0(this.getCurrentResult(),r)||(Ve(this,ji,r),Ve(this,xh,this.options),Ve(this,lf,ue(this,Mn).state)),r}getCurrentResult(){return ue(this,ji)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){ue(this,Sh).add(n)}getCurrentQuery(){return ue(this,Mn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,zi).defaultQueryOptions(n),r=ue(this,zi).getQueryCache().build(ue(this,zi),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,zi).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),o(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const o=this.createResult(r,t);return i==null||i(o),o}).finally(()=>{s()}),a])}fetch(n){return Kt(this,tr,k0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ji)))}createResult(n,t){var z;const r=ue(this,Mn),s=this.options,i=ue(this,ji),a=ue(this,lf),o=ue(this,xh),c=n!==r?n.state:ue(this,Am),{state:u}=n;let d={...u},_=!1,p;if(t._optimisticResults){const A=this.hasListeners(),j=!A&&yE(n,t),M=A&&xE(n,r,t,s);(j||M)&&(d={...d,...ZO(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:w,status:k}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let A;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(A=i.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((z=ue(this,kh))==null?void 0:z.state.data,ue(this,kh)):t.placeholderData,A!==void 0&&(k="success",p=a3(i==null?void 0:i.data,A,t),_=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,Tm))p=ue(this,wh);else try{Ve(this,Tm,t.select),p=t.select(p),p=a3(i==null?void 0:i.data,p,t),Ve(this,wh,p),Ve(this,zl,null)}catch(A){Ve(this,zl,A)}else p===void 0&&Ve(this,zl,null);ue(this,zl)&&(m=ue(this,zl),p=ue(this,wh),w=Date.now(),k="error",_=!1);const y=d.fetchStatus==="fetching",x=k==="pending",b=k==="error",C=x&&y,N=p!==void 0;return{status:k,fetchStatus:d.fetchStatus,isPending:x,isSuccess:k==="success",isError:b,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:b&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:b&&N,isStale:oS(n,t),refetch:this.refetch,isEnabled:es(t.enabled,n)!==!1}}updateResult(){const n=ue(this,ji),t=this.createResult(ue(this,Mn),this.options);if(Ve(this,lf,ue(this,Mn).state),Ve(this,xh,this.options),ue(this,lf).data!==void 0&&Ve(this,kh,ue(this,Mn)),j0(t,n))return;Ve(this,ji,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Sh).size)return!0;const o=new Set(a??ue(this,Sh));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,ji)).some(c=>{const u=c;return ue(this,ji)[u]!==n[u]&&o.has(u)})})();Fr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,ji))}),ue(this,zi).getQueryCache().notify({query:ue(this,Mn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Kt(this,tr,f3).call(this)}},zi=new WeakMap,Mn=new WeakMap,Am=new WeakMap,ji=new WeakMap,lf=new WeakMap,xh=new WeakMap,zl=new WeakMap,Tm=new WeakMap,wh=new WeakMap,kh=new WeakMap,uf=new WeakMap,_f=new WeakMap,Hu=new WeakMap,Sh=new WeakMap,tr=new WeakSet,k0=function(n){Kt(this,tr,p3).call(this);let t=ue(this,Mn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(hi)),t},c3=function(n){return!iS()&&es(this.options.enabled,ue(this,Mn))!==!1&&GO(n)},l3=function(){Kt(this,tr,d3).call(this);const n=es(this.options.staleTime,ue(this,Mn));if(ue(this,ji).isStale||!Kt(this,tr,c3).call(this,n))return;const t=VO(ue(this,ji).dataUpdatedAt,n)+1;Ve(this,uf,Z_.setTimeout(()=>{ue(this,ji).isStale||this.updateResult()},t))},u3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Mn)):this.options.refetchInterval)??!1},_3=function(n){Kt(this,tr,h3).call(this),Ve(this,Hu,n),!(ue(this,Hu)===0||!Kt(this,tr,c3).call(this,ue(this,Hu)))&&Ve(this,_f,Z_.setInterval(()=>{(this.options.refetchIntervalInBackground||aS.isFocused())&&Kt(this,tr,k0).call(this)},ue(this,Hu)))},f3=function(){Kt(this,tr,l3).call(this),Kt(this,tr,_3).call(this,Kt(this,tr,u3).call(this))},d3=function(){ue(this,uf)!==void 0&&(Z_.clearTimeout(ue(this,uf)),Ve(this,uf,void 0))},h3=function(){ue(this,_f)!==void 0&&(Z_.clearInterval(ue(this,_f)),Ve(this,_f,void 0))},p3=function(){const n=ue(this,zi).getQueryCache().build(ue(this,zi),this.options);if(n===ue(this,Mn))return;const t=ue(this,Mn);Ve(this,Mn,n),Ve(this,Am,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},IO);function FK(e,n){return es(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&es(n.retryOnMount,e)===!1)}function yE(e,n){return FK(e,n)||e.state.data!==void 0&&m3(e,n,n.refetchOnMount)}function m3(e,n,t){if(es(n.enabled,e)!==!1&&es(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&oS(e,n)}return!1}function xE(e,n,t,r){return(e!==n||es(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&oS(e,t)}function oS(e,n){return es(n.enabled,e)!==!1&&e.isStaleByTime(es(n.staleTime,e))}var HK=class extends Xb{constructor(e,n){super(e,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,n){var m,w;const{state:t}=e,r=super.createResult(e,n),{isFetching:s,isRefetching:i,isError:a,isRefetchError:o}=r,c=(w=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:w.direction,u=a&&c==="forward",d=s&&c==="forward",_=a&&c==="backward",p=s&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$K(n,t.data),hasPreviousPage:BK(n,t.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:_,isFetchingPreviousPage:p,isRefetchError:o&&!u&&!_,isRefetching:i&&!d&&!p}}},Rm,wc,_i,ff,kc,Ou,$O,qK=($O=class extends XO{constructor(n){super();lt(this,kc);lt(this,Rm);lt(this,wc);lt(this,_i);lt(this,ff);Ve(this,Rm,n.client),this.mutationId=n.mutationId,Ve(this,_i,n.mutationCache),Ve(this,wc,[]),this.state=n.state||JO(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){ue(this,wc).includes(n)||(ue(this,wc).push(n),this.clearGcTimeout(),ue(this,_i).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ve(this,wc,ue(this,wc).filter(t=>t!==n)),this.scheduleGc(),ue(this,_i).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,wc).length||(this.state.status==="pending"?this.scheduleGc():ue(this,_i).remove(this))}continue(){var n;return((n=ue(this,ff))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,d,_,p,m,w,k,v,y,x,b,C,N,z,A,j;const t=()=>{Kt(this,kc,Ou).call(this,{type:"continue"})},r={client:ue(this,Rm),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ve(this,ff,QO({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Kt(this,kc,Ou).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Kt(this,kc,Ou).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,_i).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Kt(this,kc,Ou).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,_i).config.onMutate&&await ue(this,_i).config.onMutate(n,this,r);const D=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,n,r));D!==this.state.context&&Kt(this,kc,Ou).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((d=(u=ue(this,_i).config).onSuccess)==null?void 0:d.call(u,M,n,this.state.context,this,r)),await((p=(_=this.options).onSuccess)==null?void 0:p.call(_,M,n,this.state.context,r)),await((w=(m=ue(this,_i).config).onSettled)==null?void 0:w.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),Kt(this,kc,Ou).call(this,{type:"success",data:M}),M}catch(M){try{await((x=(y=ue(this,_i).config).onError)==null?void 0:x.call(y,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(b=this.options).onError)==null?void 0:C.call(b,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((z=(N=ue(this,_i).config).onSettled)==null?void 0:z.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(A=this.options).onSettled)==null?void 0:j.call(A,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Kt(this,kc,Ou).call(this,{type:"error",error:M}),M}finally{ue(this,ff)===s&&Ve(this,ff,void 0),ue(this,_i).runNext(this)}}},Rm=new WeakMap,wc=new WeakMap,_i=new WeakMap,ff=new WeakMap,kc=new WeakSet,Ou=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Fr.batch(()=>{ue(this,wc).forEach(r=>{r.onMutationUpdate(n)}),ue(this,_i).notify({mutation:this,type:"updated",action:n})})},$O);function JO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jl,Io,Mm,BO,UK=(BO=class extends qf{constructor(n={}){super();lt(this,jl);lt(this,Io);lt(this,Mm);this.config=n,Ve(this,jl,new Set),Ve(this,Io,new Map),Ve(this,Mm,0)}build(n,t,r){const s=new qK({client:n,mutationCache:this,mutationId:++n0(this,Mm)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,jl).add(n);const t=p1(n);if(typeof t=="string"){const r=ue(this,Io).get(t);r?r.push(n):ue(this,Io).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,jl).delete(n)){const t=p1(n);if(typeof t=="string"){const r=ue(this,Io).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&ue(this,Io).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=p1(n);if(typeof t=="string"){const s=(r=ue(this,Io).get(t))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===n}else return!0}runNext(n){var r,s;const t=p1(n);return typeof t=="string"?((s=(r=ue(this,Io).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Fr.batch(()=>{ue(this,jl).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,jl).clear(),ue(this,Io).clear()})}getAll(){return Array.from(ue(this,jl))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>pE(t,r))}findAll(n={}){return this.getAll().filter(t=>pE(n,t))}notify(n){Fr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Fr.batch(()=>Promise.all(n.map(t=>t.continue().catch(hi))))}},jl=new WeakMap,Io=new WeakMap,Mm=new WeakMap,BO);function p1(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Al,qu,fi,Tl,jc,S0,g3,PO,GK=(PO=class extends qf{constructor(t,r){super();lt(this,jc);lt(this,Al);lt(this,qu);lt(this,fi);lt(this,Tl);Ve(this,Al,t),this.setOptions(r),this.bindMethods(),Kt(this,jc,S0).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ue(this,Al).defaultMutationOptions(t),j0(this.options,r)||ue(this,Al).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,fi),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Sf(r.mutationKey)!==Sf(this.options.mutationKey)?this.reset():((s=ue(this,fi))==null?void 0:s.state.status)==="pending"&&ue(this,fi).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,fi)&&(ue(this,fi).addObserver(this),Kt(this,jc,S0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,fi))==null||t.removeObserver(this)}onMutationUpdate(t){Kt(this,jc,S0).call(this),Kt(this,jc,g3).call(this,t)}getCurrentResult(){return ue(this,qu)}reset(){var t;(t=ue(this,fi))==null||t.removeObserver(this),Ve(this,fi,void 0),Kt(this,jc,S0).call(this),Kt(this,jc,g3).call(this)}mutate(t,r){var s;return Ve(this,Tl,r),(s=ue(this,fi))==null||s.removeObserver(this),Ve(this,fi,ue(this,Al).getMutationCache().build(ue(this,Al),this.options)),ue(this,fi).addObserver(this),ue(this,fi).execute(t)}},Al=new WeakMap,qu=new WeakMap,fi=new WeakMap,Tl=new WeakMap,jc=new WeakSet,S0=function(){var r;const t=((r=ue(this,fi))==null?void 0:r.state)??JO();Ve(this,qu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},g3=function(t){Fr.batch(()=>{var r,s,i,a,o,c,u,d;if(ue(this,Tl)&&this.hasListeners()){const _=ue(this,qu).variables,p=ue(this,qu).context,m={client:ue(this,Al),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Tl)).onSuccess)==null||s.call(r,t.data,_,p,m)}catch(w){Promise.reject(w)}try{(a=(i=ue(this,Tl)).onSettled)==null||a.call(i,t.data,null,_,p,m)}catch(w){Promise.reject(w)}}else if((t==null?void 0:t.type)==="error"){try{(c=(o=ue(this,Tl)).onError)==null||c.call(o,t.error,_,p,m)}catch(w){Promise.reject(w)}try{(d=(u=ue(this,Tl)).onSettled)==null||d.call(u,void 0,t.error,_,p,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(_=>{_(ue(this,qu))})})},PO);function wE(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Ch,Ai,Eh,df,Ea,hf,Om,Dm,Lm,Im,Ps,v3,b3,eD,y3,x3,w3,FO,VK=(FO=class extends qf{constructor(n,t,r){super();lt(this,Ps);lt(this,Ch);lt(this,Ai);lt(this,Eh);lt(this,df);lt(this,Ea);lt(this,hf);lt(this,Om);lt(this,Dm);lt(this,Lm);lt(this,Im,[]);Ve(this,Ch,n),Ve(this,df,r),Ve(this,Eh,[]),Ve(this,Ea,[]),Ve(this,Ai,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Ea).forEach(n=>{n.subscribe(t=>{Kt(this,Ps,x3).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Ea).forEach(n=>{n.destroy()})}setQueries(n,t){Ve(this,Eh,n),Ve(this,df,t),Fr.batch(()=>{const r=ue(this,Ea),s=Kt(this,Ps,y3).call(this,ue(this,Eh));s.forEach(_=>_.observer.setOptions(_.defaultedQueryOptions));const i=s.map(_=>_.observer),a=i.map(_=>_.getCurrentResult()),o=r.length!==i.length,c=i.some((_,p)=>_!==r[p]),u=o||c,d=u?!0:a.some((_,p)=>{const m=ue(this,Ai)[p];return!m||!j0(_,m)});!u&&!d||(u&&(Ve(this,Im,s),Ve(this,Ea,i)),Ve(this,Ai,a),this.hasListeners()&&(u&&(wE(r,i).forEach(_=>{_.destroy()}),wE(i,r).forEach(_=>{_.subscribe(p=>{Kt(this,Ps,x3).call(this,_,p)})})),Kt(this,Ps,w3).call(this)))})}getCurrentResult(){return ue(this,Ai)}getQueries(){return ue(this,Ea).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Ea)}getOptimisticResult(n,t){const r=Kt(this,Ps,y3).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Kt(this,Ps,b3).call(this,a??s,t,i),()=>Kt(this,Ps,v3).call(this,s,r)]}},Ch=new WeakMap,Ai=new WeakMap,Eh=new WeakMap,df=new WeakMap,Ea=new WeakMap,hf=new WeakMap,Om=new WeakMap,Dm=new WeakMap,Lm=new WeakMap,Im=new WeakMap,Ps=new WeakSet,v3=function(n,t){const r=new Set;return t.map((s,i)=>{const a=n[i];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,o=>{r.has(o)||(r.add(o),t.forEach(c=>{c.observer.trackProp(o)}))})})},b3=function(n,t,r){if(t){const s=ue(this,Lm),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,Ai)!==ue(this,Dm)||i||t!==ue(this,Om))&&(Ve(this,Om,t),Ve(this,Dm,ue(this,Ai)),r!==void 0&&Ve(this,Lm,r),Ve(this,hf,nS(ue(this,hf),t(n)))),ue(this,hf)}return n},eD=function(){var n;return!((n=ue(this,df))!=null&&n.combine)||ue(this,Ea).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,Ai)[r])==null?void 0:s.data)===void 0})},y3=function(n){const t=new Map;ue(this,Ea).forEach(s=>{const i=s.options.queryHash;if(!i)return;const a=t.get(i);a?a.push(s):t.set(i,[s])});const r=[];return n.forEach(s=>{var o;const i=ue(this,Ch).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new Xb(ue(this,Ch),i);r.push({defaultedQueryOptions:i,observer:a})}),r},x3=function(n,t){const r=ue(this,Ea).indexOf(n);r!==-1&&(Ve(this,Ai,ue(this,Ai).slice()),ue(this,Ai)[r]=t,Kt(this,Ps,w3).call(this))},w3=function(){var n;if(this.hasListeners()){const t=Kt(this,Ps,eD).call(this),r=ue(this,hf),s=t?r:Kt(this,Ps,b3).call(this,Kt(this,Ps,v3).call(this,ue(this,Ai),ue(this,Im)),(n=ue(this,df))==null?void 0:n.combine);(t||r!==s)&&Fr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,Ai))})})}},FO),Sc,HO,KK=(HO=class extends qf{constructor(n={}){super();lt(this,Sc);this.config=n,Ve(this,Sc,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??tS(s,t);let a=this.get(i);return a||(a=new PK({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Sc).has(n.queryHash)||(ue(this,Sc).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Sc).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Sc).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Fr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Sc).get(n)}getAll(){return[...ue(this,Sc).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>hE(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>hE(n,r)):t}notify(n){Fr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Fr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Fr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Sc=new WeakMap,HO),Br,Uu,Gu,Nh,zh,Vu,jh,Ah,qO,WK=(qO=class{constructor(e={}){lt(this,Br);lt(this,Uu);lt(this,Gu);lt(this,Nh);lt(this,zh);lt(this,Vu);lt(this,jh);lt(this,Ah);Ve(this,Br,e.queryCache||new KK),Ve(this,Uu,e.mutationCache||new UK),Ve(this,Gu,e.defaultOptions||{}),Ve(this,Nh,new Map),Ve(this,zh,new Map),Ve(this,Vu,0)}mount(){n0(this,Vu)._++,ue(this,Vu)===1&&(Ve(this,jh,aS.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Br).onFocus())})),Ve(this,Ah,Fv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Br).onOnline())})))}unmount(){var e,n;n0(this,Vu)._--,ue(this,Vu)===0&&((e=ue(this,jh))==null||e.call(this),Ve(this,jh,void 0),(n=ue(this,Ah))==null||n.call(this),Ve(this,Ah,void 0))}isFetching(e){return ue(this,Br).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Uu).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Br).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Br).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(es(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return ue(this,Br).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Br).get(r.queryHash))==null?void 0:a.state.data,i=SK(n,s);if(i!==void 0)return ue(this,Br).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Fr.batch(()=>ue(this,Br).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Br).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Br);Fr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Br);return Fr.batch(()=>{const r=t.findAll(e),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Fr.batch(()=>ue(this,Br).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(hi).catch(hi)}invalidateQueries(e,n={}){return Fr.batch(()=>(ue(this,Br).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Fr.batch(()=>ue(this,Br).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(hi)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(hi)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Br).build(this,n),r=t.isStaleByTime(es(n.staleTime,t))?await t.fetch(n):t.state.data,s=n.select;return s?s(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Br).build(this,n);return t.isStaleByTime(es(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hi).catch(hi)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hi).catch(hi)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Fv.isOnline()?ue(this,Uu).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Br)}getMutationCache(){return ue(this,Uu)}getDefaultOptions(){return ue(this,Gu)}setDefaultOptions(e){Ve(this,Gu,e)}setQueryDefaults(e,n){ue(this,Nh).set(Sf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,Nh).values()],t={};return n.forEach(r=>{Oh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,zh).set(Sf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,zh).values()],t={};return n.forEach(r=>{Oh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,Gu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=tS(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===rS&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Gu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Br).clear(),ue(this,Uu).clear()}},Br=new WeakMap,Uu=new WeakMap,Gu=new WeakMap,Nh=new WeakMap,zh=new WeakMap,Vu=new WeakMap,jh=new WeakMap,Ah=new WeakMap,qO);const tD=T.createContext(!1),nD=()=>T.useContext(tD);tD.Provider;function QK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const XK=T.createContext(QK()),rD=()=>T.useContext(XK),sD=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?sS(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},iD=e=>{T.useEffect(()=>{e.clearReset()},[e])},aD=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||sS(t,[e.error,r])),oD=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>t(r(...s)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},k3=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,cD=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function lD({queries:e,...n},t){const r=Gm(),s=nD(),i=rD(),a=n.subscribed!==!1,o=T.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{oD(k);const v=r.getQueryCache().get(k.queryHash);sD(k,i,v)}),iD(i);const[c]=T.useState(()=>new VK(r,o,n)),[u,d,_]=c.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?c.subscribe(Fr.batchCalls(k)):hi,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>k3(o[v],k))?u.flatMap((k,v)=>{const y=o[v];if(y&&k3(y,k)){const x=new Xb(r,y);return cD(y,x,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const w=u.find((k,v)=>{const y=o[v];return y&&aD({result:k,errorResetBoundary:i,throwOnError:y.throwOnError,query:r.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(w)throw w.error;return d(_())}function uD(e,n,t){const r=nD(),s=rD(),i=Gm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,oD(a),sD(a,s,o),iD(s);const[u]=T.useState(()=>new n(i,a)),d=u.getOptimisticResult(a),_=!r&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=_?u.subscribe(Fr.batchCalls(p)):hi;return u.updateResult(),m},[u,_]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),k3(a,d))throw cD(a,u,s);if(aD({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function ft(e,n){return uD(e,Xb)}function YK(e,n){const t=Gm(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Fr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function vn(e,n){const t=Gm(),[r]=T.useState(()=>new GK(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Fr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(hi)},[r]);if(s.error&&sS(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function ZK(e,n){return uD(e,HK)}const JK="modulepreload",eW=function(e){return"/"+e},kE={},tW=function(n,t,r){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=a(t.map(u=>{if(u=eW(u),u in kE)return;kE[u]=!0;const d=u.endsWith(".css"),_=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${_}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":JK,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,w)=>{p.addEventListener("load",m),p.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&i(o.reason);return n().catch(i)})},Ze=new WK({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),Ac=new Set;let SE=null,Yb=0;const S3=new Set,nW=()=>Yb,CE=e=>(S3.add(e),()=>{S3.delete(e)}),go=()=>["workspace",Yb],Nt=(e,...n)=>[...go(),e,...n];function rW(e,n=!1){if(SE===e&&!n)return!1;const t=go();return SE=e,Yb++,Ac.clear(),cS({queryKey:t}),S3.forEach(r=>r()),!0}const Un=e=>e[1]===Yb;async function cS(e){await Ze.cancelQueries(e,{revert:!1}),Ze.removeQueries(e)}function ts(e,n){if(Un(e))return Ze.setQueryData(e,n)}var rw={exports:{}},s0={},sw={exports:{}},iw={};/** + */var fE;function vK(){if(fE)return ln;fE=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=p&&F[p]||F["@@iterator"],typeof F=="function"?F:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function y(F,q,V){this.props=F,this.context=q,this.refs=v,this.updater=V||w}y.prototype.isReactComponent={},y.prototype.setState=function(F,q){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,q,"setState")},y.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=y.prototype;function b(F,q,V){this.props=F,this.context=q,this.refs=v,this.updater=V||w}var C=b.prototype=new x;C.constructor=b,k(C,y.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function z(){}var A={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function M(F,q,V){var ie=V.ref;return{$$typeof:e,type:F,key:q,ref:ie!==void 0?ie:null,props:V}}function D(F,q){return M(F.type,q,F.props)}function L(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function B(F){var q={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(V){return q[V]})}var U=/\/+/g;function H(F,q){return typeof F=="object"&&F!==null&&F.key!=null?B(""+F.key):q.toString(36)}function Q(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(z,z):(F.status="pending",F.then(function(q){F.status==="pending"&&(F.status="fulfilled",F.value=q)},function(q){F.status==="pending"&&(F.status="rejected",F.reason=q)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,q,V,ie,oe){var ce=typeof F;(ce==="undefined"||ce==="boolean")&&(F=null);var ne=!1;if(F===null)ne=!0;else switch(ce){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(F.$$typeof){case e:case n:ne=!0;break;case d:return ne=F._init,K(ne(F._payload),q,V,ie,oe)}}if(ne)return oe=oe(F),ne=ie===""?"."+H(F,0):ie,N(oe)?(V="",ne!=null&&(V=ne.replace(U,"$&/")+"/"),K(oe,q,V,"",function(le){return le})):oe!=null&&(L(oe)&&(oe=D(oe,V+(oe.key==null||F&&F.key===oe.key?"":(""+oe.key).replace(U,"$&/")+"/")+ne)),q.push(oe)),1;ne=0;var G=ie===""?".":ie+":";if(N(F))for(var ae=0;ae{const n=T.useContext(UO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},bK=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(UO.Provider,{value:e,children:n})),yK={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var Bu,eS,RO,xK=(RO=class{constructor(){ut(this,Bu,yK);ut(this,eS,!1)}setTimeoutProvider(e){Ge(this,Bu,e)}setTimeout(e,n){return ue(this,Bu).setTimeout(e,n)}clearTimeout(e){ue(this,Bu).clearTimeout(e)}setInterval(e,n){return ue(this,Bu).setInterval(e,n)}clearInterval(e){ue(this,Bu).clearInterval(e)}},Bu=new WeakMap,eS=new WeakMap,RO);const Z_=new xK;function wK(e){setTimeout(e,0)}const kK=typeof window>"u"||"Deno"in globalThis;function hi(){}function SK(e,n){return typeof e=="function"?e(n):e}function GO(e){return typeof e=="number"&&e>=0&&e!==1/0}function VO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function es(e,n){return typeof e=="function"?e(n):e}function hE(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==tS(a,n.options))return!1}else if(!Oh(n.queryKey,a))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function pE(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(Sf(n.options.mutationKey)!==Sf(i))return!1}else if(!Oh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function tS(e,n){return((n==null?void 0:n.queryKeyHashFn)||Sf)(e)}function Sf(e){return JSON.stringify(e,(n,t)=>i3(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Oh(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){for(let r=0;r500)return n;const r=mE(e)&&mE(n);if(!r&&!(i3(e)&&i3(n)))return n;const s=(r?e:Object.keys(e)).length,i=r?n:Object.keys(n),a=i.length,o=r?new Array(a):{};let c=0;for(let u=0;u{Z_.setTimeout(n,e)})}function a3(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?nS(e,n):n}function NK(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function zK(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const rS=Symbol();function KO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===rS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sS(e,n){return typeof e=="function"?e(...n):!!e}function jK(e,n,t){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),r||(r=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let AK=()=>kK;const iS=()=>AK();var qf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rf,Pu,mh,MO,TK=(MO=class extends qf{constructor(){super();ut(this,rf);ut(this,Pu);ut(this,mh);Ge(this,mh,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,Pu)||this.setEventListener(ue(this,mh))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,Pu))==null||n.call(this),Ge(this,Pu,void 0))}setEventListener(n){var t;Ge(this,mh,n),(t=ue(this,Pu))==null||t.call(this),Ge(this,Pu,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,rf)!==n&&(Ge(this,rf,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,rf)=="boolean"?ue(this,rf):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},rf=new WeakMap,Pu=new WeakMap,mh=new WeakMap,MO);const aS=new TK,RK=wK;function MK(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=RK;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{t(c)})})})};return{batch:o=>{let c;n++;try{c=o()}finally{n--,n||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Fr=MK();var gh,Fu,vh,OO,OK=(OO=class extends qf{constructor(){super();ut(this,gh,!0);ut(this,Fu);ut(this,vh);Ge(this,vh,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){ue(this,Fu)||this.setEventListener(ue(this,vh))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,Fu))==null||n.call(this),Ge(this,Fu,void 0))}setEventListener(n){var t;Ge(this,vh,n),(t=ue(this,Fu))==null||t.call(this),Ge(this,Fu,n(this.setOnline.bind(this)))}setOnline(n){ue(this,gh)!==n&&(Ge(this,gh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,gh)}},gh=new WeakMap,Fu=new WeakMap,vh=new WeakMap,OO);const Hv=new OK;function DK(e){return Math.min(1e3*2**e,3e4)}function WO(e){return(e??"online")==="online"?Hv.isOnline():!0}var qv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function LK(e){return e instanceof qv}function QO(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((x,b)=>{i=x,a=b});o.catch(hi);const c=()=>s!=="pending",u=x=>{var b;if(!c()){const C=new qv(x);k(C),(b=e.onCancel)==null||b.call(e,C)}},d=()=>{n=!0},f=()=>{n=!1},p=()=>aS.isFocused()&&(e.networkMode==="always"||Hv.isOnline())&&e.canRun(),m=()=>WO(e.networkMode)&&e.canRun(),w=x=>{c()||(r==null||r(),s="resolved",i(x))},k=x=>{c()||(r==null||r(),s="rejected",a(x))},v=()=>new Promise(x=>{var b;r=C=>{(c()||p())&&x(C)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;r=void 0,c()||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(c())return;let x;const b=t===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(C){x=Promise.reject(C)}Promise.resolve(x).then(w).catch(C=>{var M;if(c())return;const N=e.retry??(iS()?0:3),z=e.retryDelay??DK,A=typeof z=="function"?z(t,C):z,j=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):y()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:d,continueRetry:f,canStart:m,start:()=>(m()?y():v().then(y),o)}}var sf,DO,XO=(DO=class{constructor(){ut(this,sf)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&Ge(this,sf,Z_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(iS()?1/0:3e5))}clearGcTimeout(){ue(this,sf)!==void 0&&(Z_.clearTimeout(ue(this,sf)),Ge(this,sf,void 0))}},sf=new WeakMap,DO);function IK(e){return{onFetch:(n,t)=>{var d,f,p,m,w;const r=n.options,s=(p=(f=(d=n.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,i=((m=n.state.data)==null?void 0:m.pages)||[],a=((w=n.state.data)==null?void 0:w.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let k=!1;const v=b=>{jK(b,()=>n.signal,()=>k=!0)},y=KO(n.options,n.fetchOptions),x=async(b,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&b.pages.length)return Promise.resolve(b);const A=(()=>{const L={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(L),L})(),j=await y(A),{maxPages:M}=n.options,D=N?zK:NK;return{pages:D(b.pages,j,M),pageParams:D(b.pageParams,C,M)}};if(s&&i.length){const b=s==="backward",C=b?YO:o3,N={pages:i,pageParams:a};o=await x(N,C(r,N),b)}else{const b=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:o3(r,o);if(c>0&&C==null)break;o=await x(o,C),c++}while(c{var k,v;return(v=(k=n.options).persister)==null?void 0:v.call(k,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function o3(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function YO(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}function $K(e,n){return n?o3(e,n)!=null:!1}function BK(e,n){return!n||!e.getPreviousPageParam?!1:YO(e,n)!=null}var bh,af,yh,uo,of,Ls,Am,cf,Lo,Sl,LO,PK=(LO=class extends XO{constructor(n){super();ut(this,Lo);ut(this,bh);ut(this,af);ut(this,yh);ut(this,uo);ut(this,of);ut(this,Ls);ut(this,Am);ut(this,cf);Ge(this,cf,!1),Ge(this,Am,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,of,n.client),Ge(this,uo,ue(this,of).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,af,bE(this.options)),this.state=n.state??ue(this,af),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,bh)}get promise(){var n;return(n=ue(this,Ls))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,Am),...n},n!=null&&n._type&&Ge(this,bh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=bE(this.options);t.data!==void 0&&(this.setState(vE(t.data,t.dataUpdatedAt)),Ge(this,af,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,uo).remove(this)}setData(n,t){const r=a3(this.state.data,n,this.options);return Vt(this,Lo,Sl).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Vt(this,Lo,Sl).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,Ls))==null?void 0:r.promise;return(s=ue(this,Ls))==null||s.cancel(n),t?t.then(hi).catch(hi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,af)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>es(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>es(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!VO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,Ls))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,Ls))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,uo).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,Ls)&&(ue(this,cf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,Ls).cancel({revert:!0}):ue(this,Ls).cancelRetry()),this.scheduleGc()),ue(this,uo).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Vt(this,Lo,Sl).call(this,{type:"invalidate"})}async fetch(n,t){var u,d,f,p,m,w,k,v,y,x,b,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,Ls))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Ls))return ue(this,Ls).continueRetry(),ue(this,Ls).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(z=>z.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,cf,!0),r.signal)})},i=()=>{const N=KO(this.options,t),A=(()=>{const j={client:ue(this,of),queryKey:this.queryKey,meta:this.meta};return s(j),j})();return Ge(this,cf,!1),this.options.persister?this.options.persister(N,A,this):N(A)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,of),state:this.state,fetchFn:i};return s(N),N})();(d=ue(this,bh)==="infinite"?IK(this.options.pages):this.options.behavior)==null||d.onFetch(o,this),Ge(this,yh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Vt(this,Lo,Sl).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ge(this,Ls,QO({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof qv&&N.revert&&this.setState({...ue(this,yh),fetchStatus:"idle"}),r.abort()},onFail:(N,z)=>{Vt(this,Lo,Sl).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{Vt(this,Lo,Sl).call(this,{type:"pause"})},onContinue:()=>{Vt(this,Lo,Sl).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await c.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(w=(m=ue(this,uo).config).onSuccess)==null||w.call(m,N,this),(v=(k=ue(this,uo).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof qv){if(N.silent)return ue(this,Ls).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Vt(this,Lo,Sl).call(this,{type:"error",error:N}),(x=(y=ue(this,uo).config).onError)==null||x.call(y,N,this),(C=(b=ue(this,uo).config).onSettled)==null||C.call(b,this.state.data,N,this),N}finally{ue(this,Ls)===c&&Ge(this,Ls,void 0),this.scheduleGc()}}},bh=new WeakMap,af=new WeakMap,yh=new WeakMap,uo=new WeakMap,of=new WeakMap,Ls=new WeakMap,Am=new WeakMap,cf=new WeakMap,Lo=new WeakSet,Sl=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ZO(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...vE(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,yh,n.manual?s:void 0),s;case"error":const i=n.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Fr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,uo).notify({query:this,type:"updated",action:n})})},LO);function ZO(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WO(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vE(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function bE(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var zi,Mn,Tm,ji,lf,xh,zl,Rm,wh,kh,uf,_f,Hu,Sh,nr,k0,c3,l3,u3,_3,f3,d3,h3,p3,IO,Yb=(IO=class extends qf{constructor(n,t){super();ut(this,nr);ut(this,zi);ut(this,Mn);ut(this,Tm);ut(this,ji);ut(this,lf);ut(this,xh);ut(this,zl);ut(this,Rm);ut(this,wh);ut(this,kh);ut(this,uf);ut(this,_f);ut(this,Hu);ut(this,Sh,new Set);this.options=t,Ge(this,zi,n),Ge(this,zl,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Mn).addObserver(this),yE(ue(this,Mn),this.options)?Vt(this,nr,k0).call(this):this.updateResult(),Vt(this,nr,f3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return m3(ue(this,Mn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return m3(ue(this,Mn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Vt(this,nr,d3).call(this),Vt(this,nr,h3).call(this),ue(this,Mn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Mn);if(this.options=ue(this,zi).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof es(this.options.enabled,ue(this,Mn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Vt(this,nr,p3).call(this),ue(this,Mn).setOptions(this.options),t._defaulted&&!A0(this.options,t)&&ue(this,zi).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Mn),observer:this});const s=this.hasListeners();s&&xE(ue(this,Mn),r,this.options,t)&&Vt(this,nr,k0).call(this),this.updateResult(),s&&(ue(this,Mn)!==r||es(this.options.enabled,ue(this,Mn))!==es(t.enabled,ue(this,Mn))||es(this.options.staleTime,ue(this,Mn))!==es(t.staleTime,ue(this,Mn)))&&Vt(this,nr,l3).call(this);const i=Vt(this,nr,u3).call(this);s&&(ue(this,Mn)!==r||es(this.options.enabled,ue(this,Mn))!==es(t.enabled,ue(this,Mn))||i!==ue(this,Hu))&&Vt(this,nr,_3).call(this,i)}getOptimisticResult(n){const t=ue(this,zi).getQueryCache().build(ue(this,zi),n),r=this.createResult(t,n);return A0(this.getCurrentResult(),r)||(Ge(this,ji,r),Ge(this,xh,this.options),Ge(this,lf,ue(this,Mn).state)),r}getCurrentResult(){return ue(this,ji)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){ue(this,Sh).add(n)}getCurrentQuery(){return ue(this,Mn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,zi).defaultQueryOptions(n),r=ue(this,zi).getQueryCache().build(ue(this,zi),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,zi).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),o(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const o=this.createResult(r,t);return i==null||i(o),o}).finally(()=>{s()}),a])}fetch(n){return Vt(this,nr,k0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,ji)))}createResult(n,t){var z;const r=ue(this,Mn),s=this.options,i=ue(this,ji),a=ue(this,lf),o=ue(this,xh),c=n!==r?n.state:ue(this,Tm),{state:u}=n;let d={...u},f=!1,p;if(t._optimisticResults){const A=this.hasListeners(),j=!A&&yE(n,t),M=A&&xE(n,r,t,s);(j||M)&&(d={...d,...ZO(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:w,status:k}=d;p=d.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&k==="pending"){let A;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(A=i.data,v=!0):A=typeof t.placeholderData=="function"?t.placeholderData((z=ue(this,kh))==null?void 0:z.state.data,ue(this,kh)):t.placeholderData,A!==void 0&&(k="success",p=a3(i==null?void 0:i.data,A,t),f=!0)}if(t.select&&p!==void 0&&!v)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,Rm))p=ue(this,wh);else try{Ge(this,Rm,t.select),p=t.select(p),p=a3(i==null?void 0:i.data,p,t),Ge(this,wh,p),Ge(this,zl,null)}catch(A){Ge(this,zl,A)}else p===void 0&&Ge(this,zl,null);ue(this,zl)&&(m=ue(this,zl),p=ue(this,wh),w=Date.now(),k="error",f=!1);const y=d.fetchStatus==="fetching",x=k==="pending",b=k==="error",C=x&&y,N=p!==void 0;return{status:k,fetchStatus:d.fetchStatus,isPending:x,isSuccess:k==="success",isError:b,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:b&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&N,isStale:oS(n,t),refetch:this.refetch,isEnabled:es(t.enabled,n)!==!1}}updateResult(){const n=ue(this,ji),t=this.createResult(ue(this,Mn),this.options);if(Ge(this,lf,ue(this,Mn).state),Ge(this,xh,this.options),ue(this,lf).data!==void 0&&Ge(this,kh,ue(this,Mn)),A0(t,n))return;Ge(this,ji,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Sh).size)return!0;const o=new Set(a??ue(this,Sh));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,ji)).some(c=>{const u=c;return ue(this,ji)[u]!==n[u]&&o.has(u)})})();Fr.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,ji))}),ue(this,zi).getQueryCache().notify({query:ue(this,Mn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Vt(this,nr,f3).call(this)}},zi=new WeakMap,Mn=new WeakMap,Tm=new WeakMap,ji=new WeakMap,lf=new WeakMap,xh=new WeakMap,zl=new WeakMap,Rm=new WeakMap,wh=new WeakMap,kh=new WeakMap,uf=new WeakMap,_f=new WeakMap,Hu=new WeakMap,Sh=new WeakMap,nr=new WeakSet,k0=function(n){Vt(this,nr,p3).call(this);let t=ue(this,Mn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(hi)),t},c3=function(n){return!iS()&&es(this.options.enabled,ue(this,Mn))!==!1&&GO(n)},l3=function(){Vt(this,nr,d3).call(this);const n=es(this.options.staleTime,ue(this,Mn));if(ue(this,ji).isStale||!Vt(this,nr,c3).call(this,n))return;const t=VO(ue(this,ji).dataUpdatedAt,n)+1;Ge(this,uf,Z_.setTimeout(()=>{ue(this,ji).isStale||this.updateResult()},t))},u3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Mn)):this.options.refetchInterval)??!1},_3=function(n){Vt(this,nr,h3).call(this),Ge(this,Hu,n),!(ue(this,Hu)===0||!Vt(this,nr,c3).call(this,ue(this,Hu)))&&Ge(this,_f,Z_.setInterval(()=>{(this.options.refetchIntervalInBackground||aS.isFocused())&&Vt(this,nr,k0).call(this)},ue(this,Hu)))},f3=function(){Vt(this,nr,l3).call(this),Vt(this,nr,_3).call(this,Vt(this,nr,u3).call(this))},d3=function(){ue(this,uf)!==void 0&&(Z_.clearTimeout(ue(this,uf)),Ge(this,uf,void 0))},h3=function(){ue(this,_f)!==void 0&&(Z_.clearInterval(ue(this,_f)),Ge(this,_f,void 0))},p3=function(){const n=ue(this,zi).getQueryCache().build(ue(this,zi),this.options);if(n===ue(this,Mn))return;const t=ue(this,Mn);Ge(this,Mn,n),Ge(this,Tm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},IO);function FK(e,n){return es(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&es(n.retryOnMount,e)===!1)}function yE(e,n){return FK(e,n)||e.state.data!==void 0&&m3(e,n,n.refetchOnMount)}function m3(e,n,t){if(es(n.enabled,e)!==!1&&es(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&oS(e,n)}return!1}function xE(e,n,t,r){return(e!==n||es(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&oS(e,t)}function oS(e,n){return es(n.enabled,e)!==!1&&e.isStaleByTime(es(n.staleTime,e))}var HK=class extends Yb{constructor(e,n){super(e,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,n){var m,w;const{state:t}=e,r=super.createResult(e,n),{isFetching:s,isRefetching:i,isError:a,isRefetchError:o}=r,c=(w=(m=t.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:w.direction,u=a&&c==="forward",d=s&&c==="forward",f=a&&c==="backward",p=s&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$K(n,t.data),hasPreviousPage:BK(n,t.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:o&&!u&&!f,isRefetching:i&&!d&&!p}}},Mm,wc,_i,ff,kc,Ou,$O,qK=($O=class extends XO{constructor(n){super();ut(this,kc);ut(this,Mm);ut(this,wc);ut(this,_i);ut(this,ff);Ge(this,Mm,n.client),this.mutationId=n.mutationId,Ge(this,_i,n.mutationCache),Ge(this,wc,[]),this.state=n.state||JO(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){ue(this,wc).includes(n)||(ue(this,wc).push(n),this.clearGcTimeout(),ue(this,_i).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,wc,ue(this,wc).filter(t=>t!==n)),this.scheduleGc(),ue(this,_i).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,wc).length||(this.state.status==="pending"?this.scheduleGc():ue(this,_i).remove(this))}continue(){var n;return((n=ue(this,ff))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,d,f,p,m,w,k,v,y,x,b,C,N,z,A,j;const t=()=>{Vt(this,kc,Ou).call(this,{type:"continue"})},r={client:ue(this,Mm),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,ff,QO({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Vt(this,kc,Ou).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Vt(this,kc,Ou).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,_i).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Vt(this,kc,Ou).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,_i).config.onMutate&&await ue(this,_i).config.onMutate(n,this,r);const D=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,n,r));D!==this.state.context&&Vt(this,kc,Ou).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((d=(u=ue(this,_i).config).onSuccess)==null?void 0:d.call(u,M,n,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,M,n,this.state.context,r)),await((w=(m=ue(this,_i).config).onSettled)==null?void 0:w.call(m,M,null,this.state.variables,this.state.context,this,r)),await((v=(k=this.options).onSettled)==null?void 0:v.call(k,M,null,n,this.state.context,r)),Vt(this,kc,Ou).call(this,{type:"success",data:M}),M}catch(M){try{await((x=(y=ue(this,_i).config).onError)==null?void 0:x.call(y,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(b=this.options).onError)==null?void 0:C.call(b,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((z=(N=ue(this,_i).config).onSettled)==null?void 0:z.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(A=this.options).onSettled)==null?void 0:j.call(A,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Vt(this,kc,Ou).call(this,{type:"error",error:M}),M}finally{ue(this,ff)===s&&Ge(this,ff,void 0),ue(this,_i).runNext(this)}}},Mm=new WeakMap,wc=new WeakMap,_i=new WeakMap,ff=new WeakMap,kc=new WeakSet,Ou=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Fr.batch(()=>{ue(this,wc).forEach(r=>{r.onMutationUpdate(n)}),ue(this,_i).notify({mutation:this,type:"updated",action:n})})},$O);function JO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jl,Io,Om,BO,UK=(BO=class extends qf{constructor(n={}){super();ut(this,jl);ut(this,Io);ut(this,Om);this.config=n,Ge(this,jl,new Set),Ge(this,Io,new Map),Ge(this,Om,0)}build(n,t,r){const s=new qK({client:n,mutationCache:this,mutationId:++n0(this,Om)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,jl).add(n);const t=m1(n);if(typeof t=="string"){const r=ue(this,Io).get(t);r?r.push(n):ue(this,Io).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,jl).delete(n)){const t=m1(n);if(typeof t=="string"){const r=ue(this,Io).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&ue(this,Io).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=m1(n);if(typeof t=="string"){const s=(r=ue(this,Io).get(t))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===n}else return!0}runNext(n){var r,s;const t=m1(n);return typeof t=="string"?((s=(r=ue(this,Io).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Fr.batch(()=>{ue(this,jl).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,jl).clear(),ue(this,Io).clear()})}getAll(){return Array.from(ue(this,jl))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>pE(t,r))}findAll(n={}){return this.getAll().filter(t=>pE(n,t))}notify(n){Fr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Fr.batch(()=>Promise.all(n.map(t=>t.continue().catch(hi))))}},jl=new WeakMap,Io=new WeakMap,Om=new WeakMap,BO);function m1(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Al,qu,fi,Tl,jc,S0,g3,PO,GK=(PO=class extends qf{constructor(t,r){super();ut(this,jc);ut(this,Al);ut(this,qu);ut(this,fi);ut(this,Tl);Ge(this,Al,t),this.setOptions(r),this.bindMethods(),Vt(this,jc,S0).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ue(this,Al).defaultMutationOptions(t),A0(this.options,r)||ue(this,Al).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,fi),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Sf(r.mutationKey)!==Sf(this.options.mutationKey)?this.reset():((s=ue(this,fi))==null?void 0:s.state.status)==="pending"&&ue(this,fi).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,fi)&&(ue(this,fi).addObserver(this),Vt(this,jc,S0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,fi))==null||t.removeObserver(this)}onMutationUpdate(t){Vt(this,jc,S0).call(this),Vt(this,jc,g3).call(this,t)}getCurrentResult(){return ue(this,qu)}reset(){var t;(t=ue(this,fi))==null||t.removeObserver(this),Ge(this,fi,void 0),Vt(this,jc,S0).call(this),Vt(this,jc,g3).call(this)}mutate(t,r){var s;return Ge(this,Tl,r),(s=ue(this,fi))==null||s.removeObserver(this),Ge(this,fi,ue(this,Al).getMutationCache().build(ue(this,Al),this.options)),ue(this,fi).addObserver(this),ue(this,fi).execute(t)}},Al=new WeakMap,qu=new WeakMap,fi=new WeakMap,Tl=new WeakMap,jc=new WeakSet,S0=function(){var r;const t=((r=ue(this,fi))==null?void 0:r.state)??JO();Ge(this,qu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},g3=function(t){Fr.batch(()=>{var r,s,i,a,o,c,u,d;if(ue(this,Tl)&&this.hasListeners()){const f=ue(this,qu).variables,p=ue(this,qu).context,m={client:ue(this,Al),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Tl)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(w){Promise.reject(w)}try{(a=(i=ue(this,Tl)).onSettled)==null||a.call(i,t.data,null,f,p,m)}catch(w){Promise.reject(w)}}else if((t==null?void 0:t.type)==="error"){try{(c=(o=ue(this,Tl)).onError)==null||c.call(o,t.error,f,p,m)}catch(w){Promise.reject(w)}try{(d=(u=ue(this,Tl)).onSettled)==null||d.call(u,void 0,t.error,f,p,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(f=>{f(ue(this,qu))})})},PO);function wE(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Ch,Ai,Eh,df,Ea,hf,Dm,Lm,Im,$m,Ps,v3,b3,eD,y3,x3,w3,FO,VK=(FO=class extends qf{constructor(n,t,r){super();ut(this,Ps);ut(this,Ch);ut(this,Ai);ut(this,Eh);ut(this,df);ut(this,Ea);ut(this,hf);ut(this,Dm);ut(this,Lm);ut(this,Im);ut(this,$m,[]);Ge(this,Ch,n),Ge(this,df,r),Ge(this,Eh,[]),Ge(this,Ea,[]),Ge(this,Ai,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,Ea).forEach(n=>{n.subscribe(t=>{Vt(this,Ps,x3).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,Ea).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,Eh,n),Ge(this,df,t),Fr.batch(()=>{const r=ue(this,Ea),s=Vt(this,Ps,y3).call(this,ue(this,Eh));s.forEach(f=>f.observer.setOptions(f.defaultedQueryOptions));const i=s.map(f=>f.observer),a=i.map(f=>f.getCurrentResult()),o=r.length!==i.length,c=i.some((f,p)=>f!==r[p]),u=o||c,d=u?!0:a.some((f,p)=>{const m=ue(this,Ai)[p];return!m||!A0(f,m)});!u&&!d||(u&&(Ge(this,$m,s),Ge(this,Ea,i)),Ge(this,Ai,a),this.hasListeners()&&(u&&(wE(r,i).forEach(f=>{f.destroy()}),wE(i,r).forEach(f=>{f.subscribe(p=>{Vt(this,Ps,x3).call(this,f,p)})})),Vt(this,Ps,w3).call(this)))})}getCurrentResult(){return ue(this,Ai)}getQueries(){return ue(this,Ea).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,Ea)}getOptimisticResult(n,t){const r=Vt(this,Ps,y3).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Vt(this,Ps,b3).call(this,a??s,t,i),()=>Vt(this,Ps,v3).call(this,s,r)]}},Ch=new WeakMap,Ai=new WeakMap,Eh=new WeakMap,df=new WeakMap,Ea=new WeakMap,hf=new WeakMap,Dm=new WeakMap,Lm=new WeakMap,Im=new WeakMap,$m=new WeakMap,Ps=new WeakSet,v3=function(n,t){const r=new Set;return t.map((s,i)=>{const a=n[i];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,o=>{r.has(o)||(r.add(o),t.forEach(c=>{c.observer.trackProp(o)}))})})},b3=function(n,t,r){if(t){const s=ue(this,Im),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,Ai)!==ue(this,Lm)||i||t!==ue(this,Dm))&&(Ge(this,Dm,t),Ge(this,Lm,ue(this,Ai)),r!==void 0&&Ge(this,Im,r),Ge(this,hf,nS(ue(this,hf),t(n)))),ue(this,hf)}return n},eD=function(){var n;return!((n=ue(this,df))!=null&&n.combine)||ue(this,Ea).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,Ai)[r])==null?void 0:s.data)===void 0})},y3=function(n){const t=new Map;ue(this,Ea).forEach(s=>{const i=s.options.queryHash;if(!i)return;const a=t.get(i);a?a.push(s):t.set(i,[s])});const r=[];return n.forEach(s=>{var o;const i=ue(this,Ch).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new Yb(ue(this,Ch),i);r.push({defaultedQueryOptions:i,observer:a})}),r},x3=function(n,t){const r=ue(this,Ea).indexOf(n);r!==-1&&(Ge(this,Ai,ue(this,Ai).slice()),ue(this,Ai)[r]=t,Vt(this,Ps,w3).call(this))},w3=function(){var n;if(this.hasListeners()){const t=Vt(this,Ps,eD).call(this),r=ue(this,hf),s=t?r:Vt(this,Ps,b3).call(this,Vt(this,Ps,v3).call(this,ue(this,Ai),ue(this,$m)),(n=ue(this,df))==null?void 0:n.combine);(t||r!==s)&&Fr.batch(()=>{this.listeners.forEach(i=>{i(ue(this,Ai))})})}},FO),Sc,HO,KK=(HO=class extends qf{constructor(n={}){super();ut(this,Sc);this.config=n,Ge(this,Sc,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??tS(s,t);let a=this.get(i);return a||(a=new PK({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,Sc).has(n.queryHash)||(ue(this,Sc).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,Sc).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,Sc).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Fr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,Sc).get(n)}getAll(){return[...ue(this,Sc).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>hE(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>hE(n,r)):t}notify(n){Fr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Fr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Fr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Sc=new WeakMap,HO),Br,Uu,Gu,Nh,zh,Vu,jh,Ah,qO,WK=(qO=class{constructor(e={}){ut(this,Br);ut(this,Uu);ut(this,Gu);ut(this,Nh);ut(this,zh);ut(this,Vu);ut(this,jh);ut(this,Ah);Ge(this,Br,e.queryCache||new KK),Ge(this,Uu,e.mutationCache||new UK),Ge(this,Gu,e.defaultOptions||{}),Ge(this,Nh,new Map),Ge(this,zh,new Map),Ge(this,Vu,0)}mount(){n0(this,Vu)._++,ue(this,Vu)===1&&(Ge(this,jh,aS.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Br).onFocus())})),Ge(this,Ah,Hv.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Br).onOnline())})))}unmount(){var e,n;n0(this,Vu)._--,ue(this,Vu)===0&&((e=ue(this,jh))==null||e.call(this),Ge(this,jh,void 0),(n=ue(this,Ah))==null||n.call(this),Ge(this,Ah,void 0))}isFetching(e){return ue(this,Br).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Uu).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Br).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Br).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(es(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return ue(this,Br).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Br).get(r.queryHash))==null?void 0:a.state.data,i=SK(n,s);if(i!==void 0)return ue(this,Br).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Fr.batch(()=>ue(this,Br).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Br).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Br);Fr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Br);return Fr.batch(()=>{const r=t.findAll(e),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Fr.batch(()=>ue(this,Br).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(hi).catch(hi)}invalidateQueries(e,n={}){return Fr.batch(()=>(ue(this,Br).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Fr.batch(()=>ue(this,Br).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(hi)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(hi)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Br).build(this,n),r=t.isStaleByTime(es(n.staleTime,t))?await t.fetch(n):t.state.data,s=n.select;return s?s(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Br).build(this,n);return t.isStaleByTime(es(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hi).catch(hi)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hi).catch(hi)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Hv.isOnline()?ue(this,Uu).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Br)}getMutationCache(){return ue(this,Uu)}getDefaultOptions(){return ue(this,Gu)}setDefaultOptions(e){Ge(this,Gu,e)}setQueryDefaults(e,n){ue(this,Nh).set(Sf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,Nh).values()],t={};return n.forEach(r=>{Oh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,zh).set(Sf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,zh).values()],t={};return n.forEach(r=>{Oh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,Gu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=tS(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===rS&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Gu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Br).clear(),ue(this,Uu).clear()}},Br=new WeakMap,Uu=new WeakMap,Gu=new WeakMap,Nh=new WeakMap,zh=new WeakMap,Vu=new WeakMap,jh=new WeakMap,Ah=new WeakMap,qO);const tD=T.createContext(!1),nD=()=>T.useContext(tD);tD.Provider;function QK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const XK=T.createContext(QK()),rD=()=>T.useContext(XK),sD=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?sS(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},iD=e=>{T.useEffect(()=>{e.clearReset()},[e])},aD=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||sS(t,[e.error,r])),oD=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>t(r(...s)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},k3=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,cD=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function lD({queries:e,...n},t){const r=Vm(),s=nD(),i=rD(),a=n.subscribed!==!1,o=T.useMemo(()=>e.map(k=>{const v=r.defaultQueryOptions(k);return v._optimisticResults=s?"isRestoring":a?"optimistic":void 0,v}),[e,r,s,a]);o.forEach(k=>{oD(k);const v=r.getQueryCache().get(k.queryHash);sD(k,i,v)}),iD(i);const[c]=T.useState(()=>new VK(r,o,n)),[u,d,f]=c.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?c.subscribe(Fr.batchCalls(k)):hi,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>k3(o[v],k))?u.flatMap((k,v)=>{const y=o[v];if(y&&k3(y,k)){const x=new Yb(r,y);return cD(y,x,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const w=u.find((k,v)=>{const y=o[v];return y&&aD({result:k,errorResetBoundary:i,throwOnError:y.throwOnError,query:r.getQueryCache().get(y.queryHash),suspense:y.suspense})});if(w)throw w.error;return d(f())}function uD(e,n,t){const r=nD(),s=rD(),i=Vm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,oD(a),sD(a,s,o),iD(s);const[u]=T.useState(()=>new n(i,a)),d=u.getOptimisticResult(a),f=!r&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?u.subscribe(Fr.batchCalls(p)):hi;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),k3(a,d))throw cD(a,u,s);if(aD({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:u.trackResult(d)}function dt(e,n){return uD(e,Yb)}function YK(e,n){const t=Vm(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Fr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function pn(e,n){const t=Vm(),[r]=T.useState(()=>new GK(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Fr.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(hi)},[r]);if(s.error&&sS(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function ZK(e,n){return uD(e,HK)}const JK="modulepreload",eW=function(e){return"/"+e},kE={},tW=function(n,t,r){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=a(t.map(u=>{if(u=eW(u),u in kE)return;kE[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":JK,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,w)=>{p.addEventListener("load",m),p.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return s.then(a=>{for(const o of a||[])o.status==="rejected"&&i(o.reason);return n().catch(i)})},Ze=new WK({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),Ac=new Set;let SE=null,Zb=0;const S3=new Set,nW=()=>Zb,CE=e=>(S3.add(e),()=>{S3.delete(e)}),go=()=>["workspace",Zb],jt=(e,...n)=>[...go(),e,...n];function rW(e,n=!1){if(SE===e&&!n)return!1;const t=go();return SE=e,Zb++,Ac.clear(),cS({queryKey:t}),S3.forEach(r=>r()),!0}const Gn=e=>e[1]===Zb;async function cS(e){await Ze.cancelQueries(e,{revert:!1}),Ze.removeQueries(e)}function ts(e,n){if(Gn(e))return Ze.setQueryData(e,n)}var sw={exports:{}},s0={},iw={exports:{}},aw={};/** * @license React * scheduler.production.js * @@ -23,7 +23,7 @@ var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var EE;function sW(){return EE||(EE=1,(function(e){function n(K,Z){var ee=K.length;K.push(Z);e:for(;0>>1,I=K[$];if(0>>1;$s(V,ee))ies(oe,V)?(K[$]=oe,K[ie]=ee,$=ie):(K[$]=V,K[q]=ee,$=q);else if(ies(oe,ee))K[$]=oe,K[ie]=ee,$=ie;else break e}}return Z}function s(K,Z){var ee=K.sortIndex-Z.sortIndex;return ee!==0?ee:K.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],u=[],d=1,_=null,p=3,m=!1,w=!1,k=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function C(K){for(var Z=t(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=K)r(u),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(u)}}function N(K){if(k=!1,C(K),!w)if(t(c)!==null)w=!0,z||(z=!0,B());else{var Z=t(u);Z!==null&&Q(N,Z.startTime-K)}}var z=!1,A=-1,j=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MK&&D());){var $=_.callback;if(typeof $=="function"){_.callback=null,p=_.priorityLevel;var I=$(_.expirationTime<=K);if(K=e.unstable_now(),typeof I=="function"){_.callback=I,C(K),Z=!0;break t}_===t(c)&&r(c),C(K)}else r(c);_=t(c)}if(_!==null)Z=!0;else{var F=t(u);F!==null&&Q(N,F.startTime-K),Z=!1}}break e}finally{_=null,p=ee,m=!1}Z=void 0}}finally{Z?B():z=!1}}}var B;if(typeof b=="function")B=function(){b(L)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=L,B=function(){H.postMessage(null)}}else B=function(){y(L,0)};function Q(K,Z){A=y(function(){K(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125$?(K.sortIndex=ee,n(u,K),t(c)===null&&K===t(u)&&(k?(x(A),A=-1):k=!0,Q(N,ee-$))):(K.sortIndex=I,n(c,K),w||m||(w=!0,z||(z=!0,B()))),K},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(K){var Z=p;return function(){var ee=p;p=Z;try{return K.apply(this,arguments)}finally{p=ee}}}})(iw)),iw}var NE;function iW(){return NE||(NE=1,sw.exports=sW()),sw.exports}var aw={exports:{}},ui={};/** + */var EE;function sW(){return EE||(EE=1,(function(e){function n(K,Z){var ee=K.length;K.push(Z);e:for(;0>>1,I=K[$];if(0>>1;$s(V,ee))ies(oe,V)?(K[$]=oe,K[ie]=ee,$=ie):(K[$]=V,K[q]=ee,$=q);else if(ies(oe,ee))K[$]=oe,K[ie]=ee,$=ie;else break e}}return Z}function s(K,Z){var ee=K.sortIndex-Z.sortIndex;return ee!==0?ee:K.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],u=[],d=1,f=null,p=3,m=!1,w=!1,k=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function C(K){for(var Z=t(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=K)r(u),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(u)}}function N(K){if(k=!1,C(K),!w)if(t(c)!==null)w=!0,z||(z=!0,B());else{var Z=t(u);Z!==null&&Q(N,Z.startTime-K)}}var z=!1,A=-1,j=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MK&&D());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;var I=$(f.expirationTime<=K);if(K=e.unstable_now(),typeof I=="function"){f.callback=I,C(K),Z=!0;break t}f===t(c)&&r(c),C(K)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var F=t(u);F!==null&&Q(N,F.startTime-K),Z=!1}}break e}finally{f=null,p=ee,m=!1}Z=void 0}}finally{Z?B():z=!1}}}var B;if(typeof b=="function")B=function(){b(L)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=L,B=function(){H.postMessage(null)}}else B=function(){y(L,0)};function Q(K,Z){A=y(function(){K(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125$?(K.sortIndex=ee,n(u,K),t(c)===null&&K===t(u)&&(k?(x(A),A=-1):k=!0,Q(N,ee-$))):(K.sortIndex=I,n(c,K),w||m||(w=!0,z||(z=!0,B()))),K},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(K){var Z=p;return function(){var ee=p;p=Z;try{return K.apply(this,arguments)}finally{p=ee}}}})(aw)),aw}var NE;function iW(){return NE||(NE=1,iw.exports=sW()),iw.exports}var ow={exports:{}},ui={};/** * @license React * react-dom.production.js * @@ -31,7 +31,7 @@ var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var zE;function aW(){if(zE)return ui;zE=1;var e=Um();function n(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),aw.exports=aW(),aw.exports}/** + */var zE;function aW(){if(zE)return ui;zE=1;var e=Gm();function n(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),ow.exports=aW(),ow.exports}/** * @license React * react-dom-client.production.js * @@ -39,15 +39,15 @@ var hK=Object.defineProperty;var lE=e=>{throw TypeError(e)};var pK=(e,n,t)=>n in * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var AE;function oW(){if(AE)return s0;AE=1;var e=iW(),n=Um(),t=_D();function r(l){var h="https://react.dev/errors/"+l;if(1I||(l.current=$[I],$[I]=null,I--)}function V(l,h){I++,$[I]=l.current,l.current=h}var ie=F(null),oe=F(null),ce=F(null),ne=F(null);function G(l,h){switch(V(ce,h),V(oe,l),V(ie,null),h.nodeType){case 9:case 11:l=(l=h.documentElement)&&(l=l.namespaceURI)?R9(l):0;break;default:if(l=h.tagName,h=h.namespaceURI)h=R9(h),l=M9(h,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}q(ie),V(ie,l)}function ae(){q(ie),q(oe),q(ce)}function le(l){l.memoizedState!==null&&V(ne,l);var h=ie.current,g=M9(h,l.type);h!==g&&(V(oe,l),V(ie,g))}function ge(l){oe.current===l&&(q(ie),q(oe)),ne.current===l&&(q(ne),Zp._currentValue=ee)}var be,Ee;function Fe(l){if(be===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);be=h&&h[1]||"",Ee=-1I||(l.current=$[I],$[I]=null,I--)}function V(l,h){I++,$[I]=l.current,l.current=h}var ie=F(null),oe=F(null),ce=F(null),ne=F(null);function G(l,h){switch(V(ce,h),V(oe,l),V(ie,null),h.nodeType){case 9:case 11:l=(l=h.documentElement)&&(l=l.namespaceURI)?R9(l):0;break;default:if(l=h.tagName,h=h.namespaceURI)h=R9(h),l=M9(h,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}q(ie),V(ie,l)}function ae(){q(ie),q(oe),q(ce)}function le(l){l.memoizedState!==null&&V(ne,l);var h=ie.current,g=M9(h,l.type);h!==g&&(V(oe,l),V(ie,g))}function me(l){oe.current===l&&(q(ie),q(oe)),ne.current===l&&(q(ne),Zp._currentValue=ee)}var ve,Ee;function Fe(l){if(ve===void 0)try{throw Error()}catch(g){var h=g.stack.trim().match(/\n( *(at )?)/);ve=h&&h[1]||"",Ee=-1)":-1R||pe[S]!==je[R]){var Pe=` -`+pe[S].replace(" at new "," at ");return l.displayName&&Pe.includes("")&&(Pe=Pe.replace("",l.displayName)),Pe}while(1<=S&&0<=R);break}}}finally{Ye=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Fe(g):""}function Ue(l,h){switch(l.tag){case 26:case 27:case 5:return Fe(l.type);case 16:return Fe("Lazy");case 13:return l.child!==h&&h!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Me(l.type,!1);case 11:return Me(l.type.render,!1);case 1:return Me(l.type,!0);case 31:return Fe("Activity");default:return""}}function dt(l){try{var h="",g=null;do h+=Ue(l,g),g=l,l=l.return;while(l);return h}catch(S){return` +`+ve+l+Ee}var We=!1;function Oe(l,h){if(!l||We)return"";We=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(h){var Ue=function(){throw Error()};if(Object.defineProperty(Ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ue,[])}catch(Ie){var Re=Ie}Reflect.construct(l,[],Ue)}else{try{Ue.call()}catch(Ie){Re=Ie}l.call(Ue.prototype)}}else{try{throw Error()}catch(Ie){Re=Ie}(Ue=l())&&typeof Ue.catch=="function"&&Ue.catch(function(){})}}catch(Ie){if(Ie&&Re&&typeof Ie.stack=="string")return[Ie.stack,Re.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=S.DetermineComponentFrameRoot(),X=O[0],re=O[1];if(X&&re){var pe=X.split(` +`),ze=re.split(` +`);for(R=S=0;SR||pe[S]!==ze[R]){var Pe=` +`+pe[S].replace(" at new "," at ");return l.displayName&&Pe.includes("")&&(Pe=Pe.replace("",l.displayName)),Pe}while(1<=S&&0<=R);break}}}finally{We=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Fe(g):""}function He(l,h){switch(l.tag){case 26:case 27:case 5:return Fe(l.type);case 16:return Fe("Lazy");case 13:return l.child!==h&&h!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Oe(l.type,!1);case 11:return Oe(l.type.render,!1);case 1:return Oe(l.type,!0);case 31:return Fe("Activity");default:return""}}function ht(l){try{var h="",g=null;do h+=He(l,g),g=l,l=l.return;while(l);return h}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var wt=Object.prototype.hasOwnProperty,Ft=e.unstable_scheduleCallback,Ht=e.unstable_cancelCallback,qt=e.unstable_shouldYield,$e=e.unstable_requestPaint,ot=e.unstable_now,Ce=e.unstable_getCurrentPriorityLevel,me=e.unstable_ImmediatePriority,ze=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,We=e.unstable_LowPriority,ct=e.unstable_IdlePriority,St=e.log,Be=e.unstable_setDisableYieldValue,un=null,Vt=null;function _n(l){if(typeof St=="function"&&Be(l),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(un,l)}catch{}}var Gt=Math.clz32?Math.clz32:$t,cn=Math.log,Tt=Math.LN2;function $t(l){return l>>>=0,l===0?32:31-(cn(l)/Tt|0)|0}var Lr=256,mr=262144,Gr=4194304;function Jt(l){var h=l&42;if(h!==0)return h;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Gn(l,h,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var re=S&134217727;return re!==0?(S=re&~O,S!==0?R=Jt(S):(X&=re,X!==0?R=Jt(X):g||(g=re&~l,g!==0&&(R=Jt(g))))):(re=S&~O,re!==0?R=Jt(re):X!==0?R=Jt(X):g||(g=S&~l,g!==0&&(R=Jt(g)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,g=h&-h,O>=g||O===32&&(g&4194048)!==0)?h:R}function ls(l,h){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&h)===0}function ut(l,h){switch(l){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fn(){var l=Gr;return Gr<<=1,(Gr&62914560)===0&&(Gr=4194304),l}function yn(l){for(var h=[],g=0;31>g;g++)h.push(l);return h}function Tn(l,h){l.pendingLanes|=h,h!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Vn(l,h,g,S,R,O){var X=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var re=l.entanglements,pe=l.expirationTimes,je=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var js=/[\n"\\]/g;function ss(l){return l.replace(js,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Zo(l,h,g,S,R,O,X,re){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),h!=null?X==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=""+kr(h)):l.value!==""+kr(h)&&(l.value=""+kr(h)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),h!=null?vr(l,X,kr(h)):g!=null?vr(l,X,kr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?l.name=""+kr(re):l.removeAttribute("name")}function aa(l,h,g,S,R,O,X,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),h!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||h!=null)){ri(l);return}g=g!=null?""+kr(g):"",h=h!=null?""+kr(h):g,re||h===l.value||(l.value=h),l.defaultValue=h}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=re?l.checked:!!S,l.defaultChecked=!!S,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),ri(l)}function vr(l,h,g){h==="number"&&si(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function wi(l,h,g,S){if(l=l.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ki=!1;if(Hs)try{var _t={};Object.defineProperty(_t,"passive",{get:function(){ki=!0}}),window.addEventListener("test",_t,_t),window.removeEventListener("test",_t,_t)}catch{ki=!1}var Qt=null,fa=null,wo=null;function Va(){if(wo)return wo;var l,h=fa,g=h.length,S,R="value"in Qt?Qt.value:Qt.textContent,O=R.length;for(l=0;l=pa),hs=" ",qs=!1;function Si(l,h){switch(l){case"keyup":return Eo.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fi(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var No=!1;function S_(l,h){switch(l){case"compositionend":return Fi(h);case"keypress":return h.which!==32?null:(qs=!0,hs);case"textInput":return l=h.data,l===hs&&qs?null:l;default:return null}}function Xa(l,h){if(No)return l==="compositionend"||!Qa&&Si(l,h)?(l=Va(),wo=fa=Qt=null,No=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:g,offset:h-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=ic(g)}}function ac(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?ac(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function sl(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var h=si(l.document);h instanceof l.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)l=h.contentWindow;else break;h=si(l.document)}return h}function Rs(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}var Ms=Hs&&"documentMode"in document&&11>=document.documentMode,oc=null,il=null,is=null,al=!1;function ld(l,h,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;al||oc==null||oc!==si(S)||(S=oc,"selectionStart"in S&&Rs(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),is&&ps(is,S)||(is=S,S=e1(il,"onSelect"),0>=X,R-=X,to=1<<32-Gt(h)+R|g<gn?(An=jt,jt=null):An=jt.sibling;var qn=Re(ke,jt,Ne[gn],qe);if(qn===null){jt===null&&(jt=An);break}l&&jt&&qn.alternate===null&&h(ke,jt),ve=O(qn,ve,gn),Hn===null?Ut=qn:Hn.sibling=qn,Hn=qn,jt=An}if(gn===Ne.length)return g(ke,jt),Sn&&ro(ke,gn),Ut;if(jt===null){for(;gngn?(An=jt,jt=null):An=jt.sibling;var Nu=Re(ke,jt,qn.value,qe);if(Nu===null){jt===null&&(jt=An);break}l&&jt&&Nu.alternate===null&&h(ke,jt),ve=O(Nu,ve,gn),Hn===null?Ut=Nu:Hn.sibling=Nu,Hn=Nu,jt=An}if(qn.done)return g(ke,jt),Sn&&ro(ke,gn),Ut;if(jt===null){for(;!qn.done;gn++,qn=Ne.next())qn=Ge(ke,qn.value,qe),qn!==null&&(ve=O(qn,ve,gn),Hn===null?Ut=qn:Hn.sibling=qn,Hn=qn);return Sn&&ro(ke,gn),Ut}for(jt=S(jt);!qn.done;gn++,qn=Ne.next())qn=Ie(jt,ke,gn,qn.value,qe),qn!==null&&(l&&qn.alternate!==null&&jt.delete(qn.key===null?gn:qn.key),ve=O(qn,ve,gn),Hn===null?Ut=qn:Hn.sibling=qn,Hn=qn);return l&&jt.forEach(function(dK){return h(ke,dK)}),Sn&&ro(ke,gn),Ut}function pr(ke,ve,Ne,qe){if(typeof Ne=="object"&&Ne!==null&&Ne.type===k&&Ne.key===null&&(Ne=Ne.props.children),typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case m:e:{for(var Ut=Ne.key;ve!==null;){if(ve.key===Ut){if(Ut=Ne.type,Ut===k){if(ve.tag===7){g(ke,ve.sibling),qe=R(ve,Ne.props.children),qe.return=ke,ke=qe;break e}}else if(ve.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===j&&M_(Ut)===ve.type){g(ke,ve.sibling),qe=R(ve,Ne.props),jp(qe,Ne),qe.return=ke,ke=qe;break e}g(ke,ve);break}else h(ke,ve);ve=ve.sibling}Ne.type===k?(qe=uc(Ne.props.children,ke.mode,qe,Ne.key),qe.return=ke,ke=qe):(qe=A_(Ne.type,Ne.key,Ne.props,null,ke.mode,qe),jp(qe,Ne),qe.return=ke,ke=qe)}return X(ke);case w:e:{for(Ut=Ne.key;ve!==null;){if(ve.key===Ut)if(ve.tag===4&&ve.stateNode.containerInfo===Ne.containerInfo&&ve.stateNode.implementation===Ne.implementation){g(ke,ve.sibling),qe=R(ve,Ne.children||[]),qe.return=ke,ke=qe;break e}else{g(ke,ve);break}else h(ke,ve);ve=ve.sibling}qe=he(Ne,ke.mode,qe),qe.return=ke,ke=qe}return X(ke);case j:return Ne=M_(Ne),pr(ke,ve,Ne,qe)}if(Q(Ne))return kt(ke,ve,Ne,qe);if(B(Ne)){if(Ut=B(Ne),typeof Ut!="function")throw Error(r(150));return Ne=Ut.call(Ne),Yt(ke,ve,Ne,qe)}if(typeof Ne.then=="function")return pr(ke,ve,Sg(Ne),qe);if(Ne.$$typeof===b)return pr(ke,ve,yg(ke,Ne),qe);Cg(ke,Ne)}return typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint"?(Ne=""+Ne,ve!==null&&ve.tag===6?(g(ke,ve.sibling),qe=R(ve,Ne),qe.return=ke,ke=qe):(g(ke,ve),qe=fd(Ne,ke.mode,qe),qe.return=ke,ke=qe),X(ke)):g(ke,ve)}return function(ke,ve,Ne,qe){try{zp=0;var Ut=pr(ke,ve,Ne,qe);return bd=null,Ut}catch(jt){if(jt===vd||jt===wg)throw jt;var Hn=Xr(29,jt,null,ke.mode);return Hn.lanes=qe,Hn.return=ke,Hn}finally{}}}var D_=k7(!0),S7=k7(!1),uu=!1;function Ax(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tx(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function _u(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function fu(l,h,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(Zn&2)!==0){var R=S.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),S.pending=h,h=Us(l),Xs(l,null,g),h}return zt(l,S,h,g),Us(l)}function Ap(l,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194048)!==0)){var S=h.lanes;S&=l.pendingLanes,g|=S,h.lanes=g,Dn(l,g)}}function Rx(l,h){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var X={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=X:O=O.next=X,g=g.next}while(g!==null);O===null?R=O=h:O=O.next=h}else R=O=h;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=h}var Mx=!1;function Tp(){if(Mx){var l=gd;if(l!==null)throw l}}function Rp(l,h,g,S){Mx=!1;var R=l.updateQueue;uu=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var pe=re,je=pe.next;pe.next=null,X===null?O=je:X.next=je,X=pe;var Pe=l.alternate;Pe!==null&&(Pe=Pe.updateQueue,re=Pe.lastBaseUpdate,re!==X&&(re===null?Pe.firstBaseUpdate=je:re.next=je,Pe.lastBaseUpdate=pe))}if(O!==null){var Ge=R.baseState;X=0,Pe=je=pe=null,re=O;do{var Re=re.lane&-536870913,Ie=Re!==re.lane;if(Ie?(jn&Re)===Re:(S&Re)===Re){Re!==0&&Re===md&&(Mx=!0),Pe!==null&&(Pe=Pe.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var kt=l,Yt=re;Re=h;var pr=g;switch(Yt.tag){case 1:if(kt=Yt.payload,typeof kt=="function"){Ge=kt.call(pr,Ge,Re);break e}Ge=kt;break e;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=Yt.payload,Re=typeof kt=="function"?kt.call(pr,Ge,Re):kt,Re==null)break e;Ge=_({},Ge,Re);break e;case 2:uu=!0}}Re=re.callback,Re!==null&&(l.flags|=64,Ie&&(l.flags|=8192),Ie=R.callbacks,Ie===null?R.callbacks=[Re]:Ie.push(Re))}else Ie={lane:Re,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Pe===null?(je=Pe=Ie,pe=Ge):Pe=Pe.next=Ie,X|=Re;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Ie=re,re=Ie.next,Ie.next=null,R.lastBaseUpdate=Ie,R.shared.pending=null}}while(!0);Pe===null&&(pe=Ge),R.baseState=pe,R.firstBaseUpdate=je,R.lastBaseUpdate=Pe,O===null&&(R.shared.lanes=0),gu|=X,l.lanes=X,l.memoizedState=Ge}}function C7(l,h){if(typeof l!="function")throw Error(r(191,l));l.call(h)}function E7(l,h){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,re={};K.T=re,Zx(l,!1,h,g);try{var pe=R(),je=K.S;if(je!==null&&je(re,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Pe=nV(pe,S);Dp(l,h,Pe,wa(l))}else Dp(l,h,S,wa(l))}catch(Ge){Dp(l,h,{then:function(){},status:"rejected",reason:Ge},wa())}finally{Z.p=O,X!==null&&re.types!==null&&(X.types=re.types),K.T=X}}function cV(){}function Xx(l,h,g,S){if(l.tag!==5)throw Error(r(476));var R=s8(l).queue;r8(l,R,h,ee,g===null?cV:function(){return i8(l),g(S)})}function s8(l){var h=l.memoizedState;if(h!==null)return h;h={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:ee},next:null};var g={};return h.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:g},next:null},l.memoizedState=h,l=l.alternate,l!==null&&(l.memoizedState=h),h}function i8(l){var h=s8(l);h.next===null&&(h=l.alternate.memoizedState),Dp(l,h.next.queue,{},wa())}function Yx(){return Ys(Zp)}function a8(){return cs().memoizedState}function o8(){return cs().memoizedState}function lV(l){for(var h=l.return;h!==null;){switch(h.tag){case 24:case 3:var g=wa();l=_u(g);var S=fu(h,l,g);S!==null&&(Qi(S,h,g),Ap(S,h,g)),h={cache:Ex()},l.payload=h;return}h=h.return}}function uV(l,h,g){var S=wa();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Dg(l)?l8(h,g):(g=In(l,h,g,S),g!==null&&(Qi(g,l,S),u8(g,h,S)))}function c8(l,h,g){var S=wa();Dp(l,h,g,S)}function Dp(l,h,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Dg(l))l8(h,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var X=h.lastRenderedState,re=O(X,g);if(R.hasEagerState=!0,R.eagerState=re,ar(re,X))return zt(l,h,R,0),br===null&&nt(),!1}catch{}finally{}if(g=In(l,h,R,S),g!==null)return Qi(g,l,S),u8(g,h,S),!0}return!1}function Zx(l,h,g,S){if(S={lane:2,revertLane:A2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Dg(l)){if(h)throw Error(r(479))}else h=In(l,g,S,2),h!==null&&Qi(h,l,2)}function Dg(l){var h=l.alternate;return l===hn||h!==null&&h===hn}function l8(l,h){xd=zg=!0;var g=l.pending;g===null?h.next=h:(h.next=g.next,g.next=h),l.pending=h}function u8(l,h,g){if((g&4194048)!==0){var S=h.lanes;S&=l.pendingLanes,g|=S,h.lanes=g,Dn(l,g)}}var Lp={readContext:Ys,use:Tg,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useLayoutEffect:Yr,useInsertionEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useDeferredValue:Yr,useTransition:Yr,useSyncExternalStore:Yr,useId:Yr,useHostTransitionStatus:Yr,useFormState:Yr,useActionState:Yr,useOptimistic:Yr,useMemoCache:Yr,useCacheRefresh:Yr};Lp.useEffectEvent=Yr;var _8={readContext:Ys,use:Tg,useCallback:function(l,h){return Ei().memoizedState=[l,h===void 0?null:h],l},useContext:Ys,useEffect:W7,useImperativeHandle:function(l,h,g){g=g!=null?g.concat([l]):null,Mg(4194308,4,Z7.bind(null,h,l),g)},useLayoutEffect:function(l,h){return Mg(4194308,4,l,h)},useInsertionEffect:function(l,h){Mg(4,2,l,h)},useMemo:function(l,h){var g=Ei();h=h===void 0?null:h;var S=l();if(L_){_n(!0);try{l()}finally{_n(!1)}}return g.memoizedState=[S,h],S},useReducer:function(l,h,g){var S=Ei();if(g!==void 0){var R=g(h);if(L_){_n(!0);try{g(h)}finally{_n(!1)}}}else R=h;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=uV.bind(null,hn,l),[S.memoizedState,l]},useRef:function(l){var h=Ei();return l={current:l},h.memoizedState=l},useState:function(l){l=Gx(l);var h=l.queue,g=c8.bind(null,hn,h);return h.dispatch=g,[l.memoizedState,g]},useDebugValue:Wx,useDeferredValue:function(l,h){var g=Ei();return Qx(g,l,h)},useTransition:function(){var l=Gx(!1);return l=r8.bind(null,hn,l.queue,!0,!1),Ei().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,h,g){var S=hn,R=Ei();if(Sn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=h(),br===null)throw Error(r(349));(jn&127)!==0||R7(S,h,g)}R.memoizedState=g;var O={value:g,getSnapshot:h};return R.queue=O,W7(O7.bind(null,S,O,l),[l]),S.flags|=2048,kd(9,{destroy:void 0},M7.bind(null,S,O,g,h),null),g},useId:function(){var l=Ei(),h=br.identifierPrefix;if(Sn){var g=no,S=to;g=(S&~(1<<32-Gt(S)-1)).toString(32)+g,h="_"+h+"R_"+g,g=jg++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?X.createElement("select",{is:S.is}):X.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?X.createElement(R,{is:S.is}):X.createElement(R)}}O[rr]=h,O[Wn]=S;e:for(X=h.child;X!==null;){if(X.tag===5||X.tag===6)O.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===h)break e;for(;X.sibling===null;){if(X.return===null||X.return===h)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}h.stateNode=O;e:switch(Js(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&_l(h)}}return Er(h),f2(h,h.type,l===null?null:l.memoizedProps,h.pendingProps,g),null;case 6:if(l&&h.stateNode!=null)l.memoizedProps!==S&&_l(h);else{if(typeof S!="string"&&h.stateNode===null)throw Error(r(166));if(l=ce.current,ol(h)){if(l=h.stateNode,g=h.memoizedProps,S=null,R=ms,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[rr]=h,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||A9(l.nodeValue,g)),l||To(h,!0)}else l=t1(l).createTextNode(S),l[rr]=h,h.stateNode=l}return Er(h),null;case 31:if(g=h.memoizedState,l===null||l.memoizedState!==null){if(S=ol(h),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=h.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[rr]=h}else _c(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Er(h),l=!1}else g=Fn(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return h.flags&256?(ba(h),h):(ba(h),null);if((h.flags&128)!==0)throw Error(r(558))}return Er(h),null;case 13:if(S=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=ol(h),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[rr]=h}else _c(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Er(h),R=!1}else R=Fn(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(ba(h),h):(ba(h),null)}return ba(h),(h.flags&128)!==0?(h.lanes=g,h):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=h.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==l&&g&&(h.child.flags|=8192),Pg(h,h.updateQueue),Er(h),null);case 4:return ae(),l===null&&O2(h.stateNode.containerInfo),Er(h),null;case 10:return io(h.type),Er(h),null;case 19:if(q(os),S=h.memoizedState,S===null)return Er(h),null;if(R=(h.flags&128)!==0,O=S.rendering,O===null)if(R)$p(S,!1);else{if(Zr!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(O=Ng(l),O!==null){for(h.flags|=128,$p(S,!1),l=O.updateQueue,h.updateQueue=l,Pg(h,l),h.subtreeFlags=0,l=g,g=h.child;g!==null;)kp(g,l),g=g.sibling;return V(os,os.current&1|2),Sn&&ro(h,S.treeForkCount),h.child}l=l.sibling}S.tail!==null&&ot()>Gg&&(h.flags|=128,R=!0,$p(S,!1),h.lanes=4194304)}else{if(!R)if(l=Ng(O),l!==null){if(h.flags|=128,R=!0,l=l.updateQueue,h.updateQueue=l,Pg(h,l),$p(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Sn)return Er(h),null}else 2*ot()-S.renderingStartTime>Gg&&g!==536870912&&(h.flags|=128,R=!0,$p(S,!1),h.lanes=4194304);S.isBackwards?(O.sibling=h.child,h.child=O):(l=S.last,l!==null?l.sibling=O:h.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=ot(),l.sibling=null,g=os.current,V(os,R?g&1|2:g&1),Sn&&ro(h,S.treeForkCount),l):(Er(h),null);case 22:case 23:return ba(h),Dx(),S=h.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(h.flags|=8192):S&&(h.flags|=8192),S?(g&536870912)!==0&&(h.flags&128)===0&&(Er(h),h.subtreeFlags&6&&(h.flags|=8192)):Er(h),g=h.updateQueue,g!==null&&Pg(h,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(S=h.memoizedState.cachePool.pool),S!==g&&(h.flags|=2048),l!==null&&q(R_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),h.memoizedState.cache!==g&&(h.flags|=2048),io(gs),Er(h),null;case 25:return null;case 30:return null}throw Error(r(156,h.tag))}function pV(l,h){switch(as(h),h.tag){case 1:return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return io(gs),ae(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 26:case 27:case 5:return ge(h),null;case 31:if(h.memoizedState!==null){if(ba(h),h.alternate===null)throw Error(r(340));_c()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 13:if(ba(h),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(r(340));_c()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return q(os),null;case 4:return ae(),null;case 10:return io(h.type),null;case 22:case 23:return ba(h),Dx(),l!==null&&q(R_),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 24:return io(gs),null;case 25:return null;default:return null}}function D8(l,h){switch(as(h),h.tag){case 3:io(gs),ae();break;case 26:case 27:case 5:ge(h);break;case 4:ae();break;case 31:h.memoizedState!==null&&ba(h);break;case 13:ba(h);break;case 19:q(os);break;case 10:io(h.type);break;case 22:case 23:ba(h),Dx(),l!==null&&q(R_);break;case 24:io(gs)}}function Bp(l,h){try{var g=h.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&l)===l){S=void 0;var O=g.create,X=g.inst;S=O(),X.destroy=S}g=g.next}while(g!==R)}}catch(re){lr(h,h.return,re)}}function pu(l,h,g){try{var S=h.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&l)===l){var X=S.inst,re=X.destroy;if(re!==void 0){X.destroy=void 0,R=h;var pe=g,je=re;try{je()}catch(Pe){lr(R,pe,Pe)}}}S=S.next}while(S!==O)}}catch(Pe){lr(h,h.return,Pe)}}function L8(l){var h=l.updateQueue;if(h!==null){var g=l.stateNode;try{E7(h,g)}catch(S){lr(l,l.return,S)}}}function I8(l,h,g){g.props=I_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){lr(l,h,S)}}function Pp(l,h){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var S=l.stateNode;break;case 30:S=l.stateNode;break;default:S=l.stateNode}typeof g=="function"?l.refCleanup=g(S):g.current=S}}catch(R){lr(l,h,R)}}function fc(l,h){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){lr(l,h,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){lr(l,h,R)}else g.current=null}function $8(l){var h=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){lr(l,l.return,R)}}function d2(l,h,g){try{var S=l.stateNode;IV(S,l.type,g,h),S[Wn]=h}catch(R){lr(l,l.return,R)}}function B8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&wu(l.type)||l.tag===4}function h2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||B8(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&wu(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function p2(l,h,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,h?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,h):(h=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,h.appendChild(l),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=or));else if(S!==4&&(S===27&&wu(l.type)&&(g=l.stateNode,h=null),l=l.child,l!==null))for(p2(l,h,g),l=l.sibling;l!==null;)p2(l,h,g),l=l.sibling}function Fg(l,h,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,h?g.insertBefore(l,h):g.appendChild(l);else if(S!==4&&(S===27&&wu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Fg(l,h,g),l=l.sibling;l!==null;)Fg(l,h,g),l=l.sibling}function P8(l){var h=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);Js(h,S,g),h[rr]=l,h[Wn]=g}catch(O){lr(l,l.return,O)}}var fl=!1,ys=!1,m2=!1,F8=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function mV(l,h){if(l=l.containerInfo,I2=c1,l=sl(l),Rs(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var X=0,re=-1,pe=-1,je=0,Pe=0,Ge=l,Re=null;t:for(;;){for(var Ie;Ge!==g||R!==0&&Ge.nodeType!==3||(re=X+R),Ge!==O||S!==0&&Ge.nodeType!==3||(pe=X+S),Ge.nodeType===3&&(X+=Ge.nodeValue.length),(Ie=Ge.firstChild)!==null;)Re=Ge,Ge=Ie;for(;;){if(Ge===l)break t;if(Re===g&&++je===R&&(re=X),Re===O&&++Pe===S&&(pe=X),(Ie=Ge.nextSibling)!==null)break;Ge=Re,Re=Ge.parentNode}Ge=Ie}g=re===-1||pe===-1?null:{start:re,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for($2={focusedElem:l,selectionRange:g},c1=!1,Gs=h;Gs!==null;)if(h=Gs,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Gs=l;else for(;Gs!==null;){switch(h=Gs,O=h.alternate,l=h.flags,h.tag){case 0:if((l&4)!==0&&(l=h.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Js(O,S,g),O[rr]=l,Ln(O),S=O;break e;case"link":var X=K9("link","href",R).get(S+(g.href||""));if(X){for(var re=0;repr&&(X=pr,pr=Yt,Yt=X);var ke=ou(re,Yt),ve=ou(re,pr);if(ke&&ve&&(Ie.rangeCount!==1||Ie.anchorNode!==ke.node||Ie.anchorOffset!==ke.offset||Ie.focusNode!==ve.node||Ie.focusOffset!==ve.offset)){var Ne=Ge.createRange();Ne.setStart(ke.node,ke.offset),Ie.removeAllRanges(),Yt>pr?(Ie.addRange(Ne),Ie.extend(ve.node,ve.offset)):(Ne.setEnd(ve.node,ve.offset),Ie.addRange(Ne))}}}}for(Ge=[],Ie=re;Ie=Ie.parentNode;)Ie.nodeType===1&&Ge.push({element:Ie,left:Ie.scrollLeft,top:Ie.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,K.T=null,g=k2,k2=null;var O=bu,X=gl;if(Os=0,zd=bu=null,gl=0,(Zn&6)!==0)throw Error(r(331));var re=Zn;if(Zn|=4,Z8(O.current),Q8(O,O.current,X,g),Zn=re,Vp(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(un,O)}catch{}return!0}finally{Z.p=R,K.T=S,m9(l,h)}}function v9(l,h,g){h=xe(g,h),h=n2(l.stateNode,h,2),l=fu(l,h,2),l!==null&&(Tn(l,2),dc(l))}function lr(l,h,g){if(l.tag===3)v9(l,l,g);else for(;h!==null;){if(h.tag===3){v9(h,l,g);break}else if(h.tag===1){var S=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(vu===null||!vu.has(S))){l=xe(g,l),g=b8(2),S=fu(h,g,2),S!==null&&(y8(g,S,h,l),Tn(S,2),dc(S));break}}h=h.return}}function N2(l,h,g){var S=l.pingCache;if(S===null){S=l.pingCache=new bV;var R=new Set;S.set(h,R)}else R=S.get(h),R===void 0&&(R=new Set,S.set(h,R));R.has(g)||(b2=!0,R.add(g),l=SV.bind(null,l,h,g),h.then(l,l))}function SV(l,h,g){var S=l.pingCache;S!==null&&S.delete(h),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,br===l&&(jn&g)===g&&(Zr===4||Zr===3&&(jn&62914560)===jn&&300>ot()-Ug?(Zn&2)===0&&jd(l,0):y2|=g,Nd===jn&&(Nd=0)),dc(l)}function b9(l,h){h===0&&(h=fn()),l=Qr(l,h),l!==null&&(Tn(l,h),dc(l))}function CV(l){var h=l.memoizedState,g=0;h!==null&&(g=h.retryLane),b9(l,g)}function EV(l,h){var g=0;switch(l.tag){case 31:case 13:var S=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=l.stateNode;break;case 22:S=l.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(h),b9(l,g)}function NV(l,h){return Ft(l,h)}var Yg=null,Td=null,z2=!1,Zg=!1,j2=!1,xu=0;function dc(l){l!==Td&&l.next===null&&(Td===null?Yg=Td=l:Td=Td.next=l),Zg=!0,z2||(z2=!0,jV())}function Vp(l,h){if(!j2&&Zg){j2=!0;do for(var g=!1,S=Yg;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var X=S.suspendedLanes,re=S.pingedLanes;O=(1<<31-Gt(42|l)+1)-1,O&=R&~(X&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,k9(S,O))}else O=jn,O=Gn(S,S===br?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||ls(S,O)||(g=!0,k9(S,O));S=S.next}while(g);j2=!1}}function zV(){y9()}function y9(){Zg=z2=!1;var l=0;xu!==0&&BV()&&(l=xu);for(var h=ot(),g=null,S=Yg;S!==null;){var R=S.next,O=x9(S,h);O===0?(S.next=null,g===null?Yg=R:g.next=R,R===null&&(Td=g)):(g=S,(l!==0||(O&3)!==0)&&(Zg=!0)),S=R}Os!==0&&Os!==5||Vp(l),xu!==0&&(xu=0)}function x9(l,h){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0re)break;var Pe=pe.transferSize,Ge=pe.initiatorType;Pe&&T9(Ge)&&(pe=pe.responseEnd,X+=Pe*(pe"u"?null:document;function q9(l,h,g){var S=Rd;if(S&&typeof h=="string"&&h){var R=ss(h);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),H9.has(R)||(H9.add(R),l={rel:l,crossOrigin:g,href:h},S.querySelector(R)===null&&(h=S.createElement("link"),Js(h,"link",l),Ln(h),S.head.appendChild(h)))}}function WV(l){vl.D(l),q9("dns-prefetch",l,null)}function QV(l,h){vl.C(l,h),q9("preconnect",l,h)}function XV(l,h,g){vl.L(l,h,g);var S=Rd;if(S&&l&&h){var R='link[rel="preload"][as="'+ss(h)+'"]';h==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+ss(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+ss(g.imageSizes)+'"]')):R+='[href="'+ss(l)+'"]';var O=R;switch(h){case"style":O=Md(l);break;case"script":O=Od(l)}co.has(O)||(l=_({rel:"preload",href:h==="image"&&g&&g.imageSrcSet?void 0:l,as:h},g),co.set(O,l),S.querySelector(R)!==null||h==="style"&&S.querySelector(Xp(O))||h==="script"&&S.querySelector(Yp(O))||(h=S.createElement("link"),Js(h,"link",l),Ln(h),S.head.appendChild(h)))}}function YV(l,h){vl.m(l,h);var g=Rd;if(g&&l){var S=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+ss(S)+'"][href="'+ss(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Od(l)}if(!co.has(O)&&(l=_({rel:"modulepreload",href:l},h),co.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Yp(O)))return}S=g.createElement("link"),Js(S,"link",l),Ln(S),g.head.appendChild(S)}}}function ZV(l,h,g){vl.S(l,h,g);var S=Rd;if(S&&l){var R=sr(S).hoistableStyles,O=Md(l);h=h||"default";var X=R.get(O);if(!X){var re={loading:0,preload:null};if(X=S.querySelector(Xp(O)))re.loading=5;else{l=_({rel:"stylesheet",href:l,"data-precedence":h},g),(g=co.get(O))&&G2(l,g);var pe=X=S.createElement("link");Ln(pe),Js(pe,"link",l),pe._p=new Promise(function(je,Pe){pe.onload=je,pe.onerror=Pe}),pe.addEventListener("load",function(){re.loading|=1}),pe.addEventListener("error",function(){re.loading|=2}),re.loading|=4,r1(X,h,S)}X={type:"stylesheet",instance:X,count:1,state:re},R.set(O,X)}}}function JV(l,h){vl.X(l,h);var g=Rd;if(g&&l){var S=sr(g).hoistableScripts,R=Od(l),O=S.get(R);O||(O=g.querySelector(Yp(R)),O||(l=_({src:l,async:!0},h),(h=co.get(R))&&V2(l,h),O=g.createElement("script"),Ln(O),Js(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function eK(l,h){vl.M(l,h);var g=Rd;if(g&&l){var S=sr(g).hoistableScripts,R=Od(l),O=S.get(R);O||(O=g.querySelector(Yp(R)),O||(l=_({src:l,async:!0,type:"module"},h),(h=co.get(R))&&V2(l,h),O=g.createElement("script"),Ln(O),Js(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function U9(l,h,g,S){var R=(R=ce.current)?n1(R):null;if(!R)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(h=Md(g.href),g=sr(R).hoistableStyles,S=g.get(h),S||(S={type:"style",instance:null,count:0,state:null},g.set(h,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=Md(g.href);var O=sr(R).hoistableStyles,X=O.get(l);if(X||(R=R.ownerDocument||R,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,X),(O=R.querySelector(Xp(l)))&&!O._p&&(X.instance=O,X.state.loading=5),co.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},co.set(l,g),O||tK(R,l,g,X.state))),h&&S===null)throw Error(r(528,""));return X}if(h&&S!==null)throw Error(r(529,""));return null;case"script":return h=g.async,g=g.src,typeof g=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Od(g),g=sr(R).hoistableScripts,S=g.get(h),S||(S={type:"script",instance:null,count:0,state:null},g.set(h,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function Md(l){return'href="'+ss(l)+'"'}function Xp(l){return'link[rel="stylesheet"]['+l+"]"}function G9(l){return _({},l,{"data-precedence":l.precedence,precedence:null})}function tK(l,h,g,S){l.querySelector('link[rel="preload"][as="style"]['+h+"]")?S.loading=1:(h=l.createElement("link"),S.preload=h,h.addEventListener("load",function(){return S.loading|=1}),h.addEventListener("error",function(){return S.loading|=2}),Js(h,"link",g),Ln(h),l.head.appendChild(h))}function Od(l){return'[src="'+ss(l)+'"]'}function Yp(l){return"script[async]"+l}function V9(l,h,g){if(h.count++,h.instance===null)switch(h.type){case"style":var S=l.querySelector('style[data-href~="'+ss(g.href)+'"]');if(S)return h.instance=S,Ln(S),S;var R=_({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(l.ownerDocument||l).createElement("style"),Ln(S),Js(S,"style",R),r1(S,g.precedence,l),h.instance=S;case"stylesheet":R=Md(g.href);var O=l.querySelector(Xp(R));if(O)return h.state.loading|=4,h.instance=O,Ln(O),O;S=G9(g),(R=co.get(R))&&G2(S,R),O=(l.ownerDocument||l).createElement("link"),Ln(O);var X=O;return X._p=new Promise(function(re,pe){X.onload=re,X.onerror=pe}),Js(O,"link",S),h.state.loading|=4,r1(O,g.precedence,l),h.instance=O;case"script":return O=Od(g.src),(R=l.querySelector(Yp(O)))?(h.instance=R,Ln(R),R):(S=g,(R=co.get(O))&&(S=_({},g),V2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),Ln(R),Js(R,"link",S),l.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(r(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(S=h.instance,h.state.loading|=4,r1(S,g.precedence,l));return h.instance}function r1(l,h,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,X=0;X title"):null)}function nK(l,h,g){if(g===1||h.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return l=h.disabled,typeof h.precedence=="string"&&l==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function Q9(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function rK(l,h,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Md(S.href),O=h.querySelector(Xp(R));if(O){h=O._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(l.count++,l=i1.bind(l),h.then(l,l)),g.state.loading|=4,g.instance=O,Ln(O);return}O=h.ownerDocument||h,S=G9(S),(R=co.get(R))&&G2(S,R),O=O.createElement("link"),Ln(O);var X=O;X._p=new Promise(function(re,pe){X.onload=re,X.onerror=pe}),Js(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=i1.bind(l),h.addEventListener("load",g),h.addEventListener("error",g))}}var K2=0;function sK(l,h){return l.stylesheets&&l.count===0&&o1(l,l.stylesheets),0K2?50:800)+h);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function i1(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)o1(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var a1=null;function o1(l,h){l.stylesheets=null,l.unsuspend!==null&&(l.count++,a1=new Map,h.forEach(iK,l),a1=null,i1.call(l))}function iK(l,h){if(!(h.state.loading&4)){var g=a1.get(l);if(g)var S=g.get(null);else{g=new Map,a1.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),rw.exports=oW(),rw.exports}var lW=cW();const uW=!1;var fD=T.useLayoutEffect;function _W(e,n,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>n();const r=new IntersectionObserver(s=>{n(s.pop())},{rootMargin:"100px"});return r.observe(e.current),()=>{r.disconnect(),n()}},[n,t,e])}function fW(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function G0(e){return e[e.length-1]}function Dh(e,n){return typeof e=="function"?e(n):e}const dD=Object.prototype.hasOwnProperty,dW=Object.prototype.propertyIsEnumerable;function hD(e){for(const n in e)if(dD.call(e,n))return!0;return!1}const hW=()=>Object.create(null),P_=(e,n)=>J_(e,n,hW);function J_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=OE(e)&&OE(s);if(!i&&!(qv(e)&&qv(s)))return s;const a=i?e:RE(e);if(!a)return s;const o=i?s:RE(s);if(!o)return s;const c=a.length,u=o.length,d=i?new Array(u):t();let _=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!ME(t)||!t.hasOwnProperty("isPrototypeOf"))}function ME(e){return Object.prototype.toString.call(e)==="[object Object]"}function OE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zu(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,s=e.length;rs||!Zu(e[a],n[a],t)))return!1;return s===i}return!1}const pW=/[\x00-\x1f\x7f"<>`{}]/g;function mW(e){return e.replace(pW,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function DE(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return mW(n)}const gW=["http:","https:","mailto:","tel:"];function Uv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function i0(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let t=0,r="",s;for(;(s=n.exec(e))!==null;)r+=DE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+DE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function vW(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function bW(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,t=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=n.get(i);if(a)return s(a),a.value},set(i,a){if(n.size>=e&&t){const c=t;n.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,t||(t=c),n.set(i,c)}},clear(){n.clear(),t=void 0,r=void 0}}}const Wu=4,pD=5;function mD(e,n,t=new Uint16Array(6)){const r=e.indexOf("/",n),s=r===-1?e.length:r,i=e.substring(n,s);if(!i||!i.includes("$"))return t[0]=0,t[1]=n,t[2]=n,t[3]=s,t[4]=s,t[5]=s,t;if(i==="$"){const c=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=c,t[4]=c,t[5]=c,t}if(i.charCodeAt(0)===36)return t[0]=1,t[1]=n,t[2]=n+1,t[3]=s,t[4]=s,t[5]=s,t;const a=i.indexOf("{");let o;if(a!==-1&&a+1!L.parse&&L.caseSensitive===j&&L.prefix===z&&L.suffix===A));if(D)x=D;else{const L=yW(N,_,j,z,A);x=L,L.parent=s,L.depth=i;let B;N===1?B=s.dynamic??(s.dynamic=[]):N===3?B=s.optional??(s.optional=[]):B=s.wildcard??(s.wildcard=[]),B.push(L),B.length===2&&(a==null||a.push(B))}break}}s=x}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const y=sh(_);y.kind=pD,y.parent=s,i++,y.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(y),s=y}const v=(t.path||!t.children)&&!t.isRoot;if(v&&_.endsWith("/")){const y=sh(_);y.kind=Wu,y.parent=s,i++,y.depth=i,s.index=y,s=y}s.parse=k??null,s.priority=((d=p==null?void 0:p.params)==null?void 0:d.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=_)}if(t.children)for(const _ of t.children)Zb(e,n,_,c,s,i,a,o)}function gD(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.parse&&n.parse&&(e.priority||n.priority))return n.priority-e.priority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function sh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function yW(e,n,t,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0,caseSensitive:t,prefix:r,suffix:s}}function xW(e,n){const t=sh("/"),r=new Uint16Array(6),s=[];for(const i of e)Zb(!1,r,i,1,t,0,s);for(const i of s)i.sort(gD);n.masksTree=t,n.flatCache=Gv(1e3)}function wW(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=uS(e,n.masksTree);return n.flatCache.set(e,r),r}function kW(e,n,t,r,s){e||(e="/"),r||(r="/");const i=n?`case\0${e}`:e;let a=s.singleCache.get(i);return a||(a=sh("/"),Zb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),uS(r,a,t)}function SW(e,n,t=!1){const r=t?e:`nofuzz\0${e}`,s=n.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=uS(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=bD(i.route)),n.matchCache.set(r,i),i}function CW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function EW(e,n=!1,t){const r=sh(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;Zb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&lS(),a[u.id]=u,c!==0&&u.path){const d=CW(u.fullPath);(!o[d]||u.fullPath.endsWith("/"))&&(o[d]=u)}c++});for(const u of i)u.sort(gD);return{processedTree:{segmentTree:r,singleCache:Gv(1e3),matchCache:Gv(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function uS(e,n,t=!1){const r=e.split("/"),s=zW(e,r,n,t);if(!s)return null;const[i]=vD(e,r,s);return{route:s.node.route,rawParams:i}}function vD(e,n,t){var d,_,p,m;const r=NW(t.node);let s=null;const i=Object.create(null);let a=((d=t.extract)==null?void 0:d.part)??0,o=((_=t.extract)==null?void 0:_.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;z--){const A=_.wildcard[z],{prefix:j,suffix:M}=A;if(!(j&&(b||!(A.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(j)))){if(M){if(b)continue;const D=n.slice(p).join("/"),L=D.slice(-M.length);if((A.caseSensitive?L:L.toLowerCase())!==M||D.length-M.length=0;A--){const j=_.optional[A];o.push({node:j,index:p,skipped:z,statics:w,dynamics:k,optionals:v,extract:y,rawParams:x})}if(!b)for(let A=_.optional.length-1;A>=0;A--){const j=_.optional[A],{prefix:M,suffix:D}=j;if(M||D){const L=j.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!L.startsWith(M)||D&&L.indexOf(D,L.length-D.length)=0;z--){const A=_.dynamic[z],{prefix:j,suffix:M}=A;if(j||M){const D=A.caseSensitive?C:N??(N=C.toLowerCase());if(j&&!D.startsWith(j)||M&&D.indexOf(M,D.length-M.length)=0;z--){const A=_.pathless[z];o.push({node:A,index:p,skipped:m,statics:w,dynamics:k,optionals:v,extract:y,rawParams:x})}}if(u)return u;if(r&&c){let d=c.index;for(let p=0;pe.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===Wu)>(e.node.kind===Wu)||n.node.kind===Wu==(e.node.kind===Wu)&&n.node.depth>e.node.depth))):!0}function hv(e){return pv(e.filter(n=>n!==void 0).join("/"))}function pv(e){return e.replace(/\/{2,}/g,"/")}function yD(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Rl(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function xD(e){return Rl(yD(e))}function Vv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function AW(e,n,t){return Vv(e,t)===Vv(n,t)}function TW({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=pv(n)),n.startsWith("/"))return n.length===1||t==="preserve"?n:t==="always"?n.endsWith("/")?n:`${n}/`:n.endsWith("/")?n.slice(0,-1):n;const s=n===".";let i;if(r){i=s?e:e+"\0"+n;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=pv(e)),a=e.split("/");a.length>1&&G0(a)==="";)a.pop();const u=n.split("/");for(let d=0,_=u.length;d<_;d++){const p=u[d];p===""?d?d===_-1&&a.push(p):a=[p]:p===".."?a.length>1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(G0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?pv(o):o)||"/";return i&&r&&r.set(i,c),c}function RW(e){const n=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(n.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(t,"g");return s=>s.replace(r,i=>n.get(i)??i)}function ow(e,n,t){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>$E(s,t)).join("/"):$E(r,t)}function IE({path:e,params:n,decoder:t,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,c,u="";for(;oe.state.__TSR_key||e.href;function BW(e){const n=e.getAttribute(BE);if(n)return`[${BE}="${n}"]`;let t="",r=e,s;for(;s=r.parentNode;){let i=1,a=r;for(;a=a.previousElementSibling;)i++;const o=`${r.localName}:nth-child(${i})`;t=t?`${o} > ${t}`:o,r=s}return t}let v1=!1;const mv="window";function C3(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function PE(e){const n=new Set;for(const t of e){if(t===mv)continue;const r=C3(t);r&&n.add(r)}return n}function PW(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||$W,i=new Set,a=o=>{const c=Du[o]||(Du[o]={});for(const u of i)u===document?c[mv]={scrollX,scrollY}:u.isConnected&&(c[BW(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,v1=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{v1||i.add(o.target)},!0),e.subscribe("onBeforeLoad",o=>{o.fromLocation&&a(s(o.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),IW()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,d=r.next,_=r.hash;let p;if(i.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(o.toLocation),w=o.fromLocation&&s(o.fromLocation);if(r.restoring&&w&&w!==m){const v=Du[w];if(v){let y=Du[m];for(const x in v){if(x===mv){if(d)continue}else{const b=C3(x);if(!b||d&&u&&(p??(p=PE(u)),p.has(b)))continue}y||(y=Du[m]={}),y[x]??(y[x]=v[x])}}}v1=!0;try{const v=o.toLocation.hash,y=o.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(d){!v&&u&&(p??(p=PE(u)));const b=v&&y&&_,C=r.restoring?Du[m]:void 0;if(C)for(const N in C){const{scrollX:z,scrollY:A}=C[N];if(N===mv){if(b)continue;scrollTo({top:A,left:z,behavior:c}),x=!0}else{const j=C3(N);j&&(j.scrollLeft=z,j.scrollTop=A,p==null||p.delete(j))}}if(!v){const N={top:0,left:0,behavior:c};if(x||scrollTo(N),p)for(const z of p)z.scrollTo(N)}}!x&&v&&y&&((k=document.getElementById(v))==null||k.scrollIntoView(y))}finally{v1=!1}}))}function FW(e,n=String){const t=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&t.set(r,n(s))}return t.toString()}function cw(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function HW(e){const n=new URLSearchParams(e),t=Object.create(null);for(const[r,s]of n.entries()){const i=t[r];i==null?t[r]=cw(s):Array.isArray(i)?i.push(cw(s)):t[r]=[i,cw(s)]}return t}const qW=/^(?:\s|["[{\d-]|fa|nu|tr)/,UW=VW(JSON.parse),GW=KW(JSON.stringify,JSON.parse);function VW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=HW(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function KW(e,n){const t=n===JSON.parse;function r(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(n&&typeof s=="string"){if(t&&!qW.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=FW(s,r);return i?`?${i}`:""}}const ah="__root__";function WW(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function wD(e){return e instanceof Response&&!!e.options}function QW(e){return{input:({url:n})=>{for(const t of e)n=E3(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=kD(e[t],n);return n}}}function XW(e){const n=xD(e.basepath),t=`/${n}`,r=e.caseSensitive?t:t.toLowerCase(),s=`${r}/`;return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===r?i.pathname="/":a.startsWith(s)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=hv(["/",n,i.pathname]),i)}}function E3(e,n){var r;const t=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function kD(e,n){var r;const t=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function YW(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),c=t(void 0),u=t([]),d=r(()=>u.get().map(k=>i.get(k).get())),_=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:d.get(),location:o.get(),resolvedLocation:c.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:c,ids:u,matches:d,byRoute:i,__store:_,getMatchStore:p,setMatches:w};function w(k){const v=u.get(),y=k.map(x=>x.routeId);s(()=>{bW(v,y)||u.set(y);for(const x of v)y.includes(x)||i.get(x).set(()=>{});for(const x of k){const b=p(x.routeId);b.get()!==x&&b.set(x)}})}return m}var Ju="__TSR_index",FE="popstate",HE="beforeunload";function ZW(e){let n=e.getLocation();const t=new Set,r=a=>{n=e.getLocation(),t.forEach(o=>o({location:n,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):n=e.getLocation()},i=async({task:a,navigateOpts:o,...c})=>{var _,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((_=e.getBlockers)==null?void 0:_.call(e))??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&d)for(const m of u){const w=Kv(c.path,c.state);if(await m.blockerFn({currentLocation:n,nextLocation:w,action:c.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,o,c)=>{const u=n.state[Ju];o=qE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=n.state[Ju];o=qE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>n.state[Ju]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const o=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...o,a]),()=>{var d,_;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(_=e.setBlockers)==null||_.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function qE(e,n){n||(n={});const t=_S();return{...n,key:t,__TSR_key:t,[Ju]:e}}function JW(e){var A,j;const n=typeof document<"u"?window:void 0,t=n.history.pushState,r=n.history.replaceState;let s=[];const i=()=>s,a=M=>s=M,o=(M=>M),c=(()=>Kv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=_S();n.history.replaceState({[Ju]:0,key:M,__TSR_key:M},"")}let u=c(),d,_=!1,p=!1,m=!1,w=!1;const k=()=>u;let v;const y=()=>{v&&(z._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),z._ignoreSubscribers=!1,v=void 0,d=void 0)},x=(M,D,L)=>{const B=o(D),U=!!v;U||(d=u),u=Kv(D,L),v=[B,L,(v==null?void 0:v[2])||M],U||queueMicrotask(()=>y())},b=M=>{u=c(),z.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[Ju]-u.state[Ju],L=D===1,B=D===-1,U=!L&&!B||_;_=!1;const H=U?"GO":B?"BACK":"FORWARD",Q=U?{type:"GO",index:D}:{type:B?"BACK":"FORWARD"};if(m)m=!1;else{const K=i();if(typeof document<"u"&&K.length){for(const Z of K)if(await Z.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,n.history.go(1),z.notify(Q);return}}}u=c(),z.notify(Q)},N=M=>{if(w){w=!1;return}let D=!1;const L=i();if(typeof document<"u"&&L.length)for(const B of L){const U=B.enableBeforeUnload??!0;if(U===!0){D=!0;break}if(typeof U=="function"&&U()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},z=ZW({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>x(!0,M,D),replaceState:(M,D)=>x(!1,M,D),back:M=>(M&&(m=!0),w=!0,n.history.back()),forward:M=>{M&&(m=!0),w=!0,n.history.forward()},go:M=>{_=!0,n.history.go(M)},createHref:M=>o(M),flush:y,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(HE,N,{capture:!0}),n.removeEventListener(FE,C)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(HE,N,{capture:!0}),n.addEventListener(FE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return z._ignoreSubscribers||b("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return z._ignoreSubscribers||b("REPLACE"),D},z}function eQ(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function Kv(e,n){const t=eQ(e),r=t.indexOf("#"),s=t.indexOf("?"),i=_S();return{href:t,pathname:t.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:t.length),hash:r>-1?t.substring(r):"",search:s>-1?t.slice(s,r===-1?void 0:r):"",state:n||{[Ju]:0,key:i,__TSR_key:i}}}function _S(){return(Math.random()+1).toString(36).substring(7)}function UE(e){var n,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((n=e.options.component)==null?void 0:n.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function Jb(e,n){return{fromLocation:n,toLocation:e,pathChanged:(n==null?void 0:n.pathname)!==e.pathname,hrefChanged:(n==null?void 0:n.href)!==e.href,hashChanged:(n==null?void 0:n.hash)!==e.hash}}function GE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function tQ(e,n,t,r){var s,i,a,o;for(const c of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===c.routeId)||(i=(s=e.routesById[c.routeId].options).onLeave)==null||i.call(s,c)}for(const c of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[c.routeId].options)[n.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||o.call(a,c)}}var nQ=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...t},this.isServer=this.options.isServer??uW??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=RW(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=JW()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=Gv(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=YW(this.latestLocation,u),PW(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],d=xD(o);d&&d!=="/"&&u.push(XW({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:QW(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=EW(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&xW(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,r)=>{const s={eventType:t,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const r of this.subscribers)if(r.eventType===t.type)try{r.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,r)=>{const s=({pathname:c,search:u,hash:d,href:_,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const y=this.options.parseSearch(u),x=this.options.stringifySearch(y);return{href:c+x+d,publicHref:c+x+d,pathname:i0(c).path,external:!1,searchStr:x,search:P_(r==null?void 0:r.search,y),hash:i0(d.slice(1)).path,state:J_(r==null?void 0:r.state,p)}}const m=new URL(_,this.origin),w=E3(this.rewrite,m),k=this.options.parseSearch(w.search),v=this.options.stringifySearch(k);return w.search=v,{href:w.href.replace(w.origin,""),publicHref:_,pathname:i0(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:v,search:P_(r==null?void 0:r.search,k),hash:i0(w.hash.slice(1)).path,state:J_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>TW({base:t,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,r,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:r},s):this.matchRoutesInternal(t,r),this.getMatchedRoutes=t=>{const r=Object.create(null),s=SW(Rl(t),this.processedTree,!0);return s&&Object.assign(r,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],r,s==null?void 0:s.route]},this.buildLocation=t=>{const r=(i={})=>{var M,D;if(i.href){const L=Kv(i.href,{});i={...i,to:E3(this.rewrite,new URL(L.pathname,this.origin)).pathname,search:this.options.parseSearch(L.search),hash:L.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],d=o[3],_=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=VE(i.params,d);const m=this.routesByPath[Rl(_)];let w;if(m)w=this.getRouteBranch(m);else if(_.includes("$"))w=[];else{const[L,B,U]=this.getMatchedRoutes(_);w=L,this.options.notFoundRoute&&(!U||U.path!=="/"&&B["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&hD(p))for(const L of w){const B=((M=L.options.params)==null?void 0:M.stringify)??L.options.stringifyParams;if(B){p===d&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?_:i0(IE({path:_,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const L={};w.forEach(B=>{if(B.options.validateSearch)try{Object.assign(L,gv(B.options.validateSearch,{...L,...v}))}catch{}}),v=L}v=sQ(v,i,w,t._includeValidateSearch),v=P_(u,v);const y=this.options.stringifySearch(v),x=i.hash===!0?a.hash:i.hash?Dh(i.hash,a.hash):void 0,b=x?`#${x}`:"";let C=i.state===!0?a.state:i.state?Dh(i.state,a.state):{};i.state&&(C=J_(a.state,C));const N=`${k}${y}${b}`;let z,A,j=!1;if(this.rewrite){const L=new URL(N,this.origin),B=kD(this.rewrite,L);z=L.href.replace(L.origin,""),B.origin!==this.origin?(A=B.href,j=!0):A=B.pathname+B.search+B.hash}else z=vW(N),A=z;return{publicHref:A,href:z,pathname:k,search:v,searchStr:y,state:C,hash:x??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=wW(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,d=VE(c,a);s.maskedLocation=r({from:t.from,...u,params:d})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Rl(this.latestLocation.href)===Rl(s.href)&&Zu(GE(s.state),GE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(d=>{c=d});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:_,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=_??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,i=s.replace?"REPLACE":"PUSH",this.history[i==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,...o}={})=>{const c=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var c,u;let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(t!==void 0||!s){const _=this.buildLocation({to:t,...a});s=s??_.publicHref,i=i??_.publicHref}const d=!o&&i?i:s;if(Uv(d,this.protocolAllowlist))return;if(!a.ignoreBlocker){const _=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of _)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await dQ(this,t)},this.startViewTransition=t=>{var s,i;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&((i=(s=window.CSS)==null?void 0:s.supports)!=null&&i.call(s,"selector(:active-view-transition-type(a))"))){const o=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Jb(o,c)):r.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,d;const r=this._committed,s=t==null?void 0:t.filter,i=this._preloads,a=new Set([...r,...this._cache.values(),...[...(i==null?void 0:i.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(_=>!s||s(_)).map(_=>_.id)),o=[];for(const[_,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(_),o.push(_));const c=_=>{if(a.has(_.id)){const p=this.routesById[_.routeId],m={..._,invalid:!0,...(t!=null&&t.forcePending||_.status==="error"||_.status==="notFound")&&UE(p)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,m}return _};this._committed=r.map(c);for(const[_,p]of this._cache)a.has(_)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const _ of a)(d=this._flights)==null||d.delete(_);for(const _ of o)_.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t.headers.get("Location");if(t.options.href){if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;t.options.href=i,t.headers.set("Location",i)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&Uv(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const r=this._cache,s=this._preloads,i=t==null?void 0:t.filter,a=[],o=[];for(const[d,_]of r)(!i||i(_))&&(o.push(d),a.push(_));const c=[];for(const[d,_]of s??[])(!i||_.some(i))&&(c.push(d),a.push(..._));for(const d of o)r.delete(d);for(const d of c)s.delete(d);for(const d of a){const _=d._flight;d._flight=void 0,_&&!--_[2]&&(((u=this._flights)==null?void 0:u.get(d.id))===_&&this._flights.delete(d.id),c.push(_[1]))}for(const d of c)d.abort()},this.loadRouteChunk=oh,this.preloadRoute=t=>hQ(this,t),this.matchRoute=(t,r)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},i=this.buildLocation(s),a=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!a)return!1;const o=(r==null?void 0:r.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=kW(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!Zu(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Zu(o.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??GW,parseSearch:e.parseSearch??UW,protocolAllowlist:e.protocolAllowlist??gW}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:t}){this.routesById=e,this.routesByPath=n,this.processedTree=t;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=bD(e),this.routeBranchCache.set(e,n)),n}matchRoutesInternal(e,n){var p,m;const[t,r,s]=this.getMatchedRoutes(e.pathname);let i=t,a=!1;(s?s.path!=="/"&&r["**"]:Rl(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?iQ(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,d=(w,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===w.id?v:w===this.options.notFoundRoute?u.find(y=>y.routeId===w.id):void 0};let _;for(let w=0;w{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((w,k)=>k(w),_):_);return c.postSearchFilters?c.postSearchFilters.reduce((w,k)=>k(w),m):m};s.push(d)}const u=c.validateSearch;if(r&&u){const d=({search:_,next:p,meta:m})=>{const w=p(_);try{const k=gv(u,w);if(m&&k)for(const v in k)v in w||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...w,...k}}catch{}return w};s.push(d)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const _=Dh(n.search,c);return u&&(u.explicit=_),_}const d=(_,p)=>{if(p){const m=u||{};return{search:i(o+1,_,m),meta:m}}return i(o+1,_,u)};return s[o]({search:c,next:d,meta:u})};return i(0,e)}function iQ(e,n){if(e!=="root"){let t;for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return ah}function VE(e,n){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return n;const t=Object.assign(Object.create(null),n);return Object.assign(t,Dh(e,t))}function KE(e,n){var r;const t=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;t&&Object.assign(n,t(n))}function N3(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function aQ(e,n){const t=N3(e,"component");let r=N3(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function oh(e,n,t){const r=()=>n===!1?void 0:n?N3(e,n):aQ(e,t),s=e._lazy;if(s)return s===!0?r():s.then(r);if(!e.lazyFn)return r();const i=e.lazyFn().then(a=>{{const{id:o,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function fS(e){const n=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return n&&n{const s=()=>r(n);n.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,r).finally(()=>n.removeEventListener("abort",s))})}function Gf(e,n){return e.routesById[n.routeId]}function K0(e,n,t){return wD(e)?[za,e]:Lh(e)?(e.routeId||(e.routeId=t),[ey,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Bl,e]):[Tc,e]}function dS(e,n){var r,s;let t=K0(n,!0,e.id);if(t[0]!==Bl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=K0(i,!0,e.id)}return t}function A0(e,n,t,r,s){return s[0].signal.aborted?n_:mS(e,n,t,dS(t,r),s)}async function oQ(e,n,t,r,s,i){var d,_;const[a,o]=n,c=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...C,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:o,routeId:w.id};try{const C=m._ctx||(m._ctx=w.options.context?w.options.context({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Ol(e,m),[p,A0(e,n,w,C,t)]}if(c.aborted)return[p,n_];const y=m.paramsError??m.searchError;if(y!==void 0)return Ol(e,m),[p,A0(e,n,w,y,t)];const x=w.options.beforeLoad;if(!x)continue;const b=m.status;p>=i&&(m.status="pending",(_=t[7])==null||_.call(t));try{W0(e,m,"beforeLoad",t[0]);const C=await Uf(x({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,n_];const N=mS(e,n,w,K0(C,!1,w.id),t);if(N[0]!==Tc)return Ol(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Ol(e,m),[p,A0(e,n,w,C,t)]}finally{m.status=b,W0(e,m,!1,t[0])}}s()}function hS(e,n,t){var r;if(!(!t||--t[2])){if(((r=e._flights)==null?void 0:r.get(n.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(n)&&s[3].some(i=>i.id===n.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(n.id)}return t[1]}}function Ol(e,n){var r;const t=n._flight;n._flight=void 0,(r=hS(e,n,t))==null||r.abort()}function ta(e,n,t,r){var i;const s=[];for(const a of n)if(!(t!=null&&t.includes(a))){const o=a._flight;if(a._flight=void 0,r&&(o==null?void 0:o[2])===1&&((i=e._flights)==null?void 0:i.get(a.id))===o&&(t!=null&&t.some(c=>c.id===a.id)))o[2]=0;else{const c=hS(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function pS(e){for(const n of e){const t=n._flight;t&&t[2]++}}function W0(e,n,t,r){var a;if(n.isFetching=t,r&&((a=e._tx)==null?void 0:a[0])!==r)return;const s=e.stores.byRoute.get(n.routeId),i=s==null?void 0:s.get();(i==null?void 0:i.id)===n.id&&s.set({...i,isFetching:t})}function SD(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:c=>e.navigate({...c,_fromLocation:o}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:i,context:t.context,route:r,...e.options.additionalContext}}async function WE(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return n_;if(!s)return[Tc,void 0];let u=t._flight;W0(e,t,"loader",o);try{if(!u){const d=new AbortController;u=[Promise.resolve().then(()=>s(SD(e,n,t,r,d,i,!!a[3]))).then(_=>K0(_,!1,r.id),_=>K0(_,!0,r.id)).then(_=>{var p;return _[0]!==Tc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||d.abort()),_[0]===Bl&&u[2]?dS(r,_[1]):_}),d,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],mS(e,n,r,await Uf(u[0],c),a)}catch(d){if(d!==c||!c.aborted)throw d;return Ol(e,t),n_}finally{W0(e,t,!1,o)}}function QE(e,n,t){n[0]!==za&&(e.status="success",e.error=void 0,n[0]===Tc?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function cQ(e,n,t){const r=e._cache.get(n.id);if(r!==t||e._committed.some(i=>i.id===n.id&&i._flight===n._flight))return;const s={...n,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(n.id,s),r&&Ol(e,r)}function XE(e,n){return n[0]===Bl||n[0]===ey?{...e,status:n[0]===Bl?"error":"notFound",error:n[1],_flight:void 0}:e}function lQ(e,n,t,r,s,i,a){var B,U;const o=n[1][t],c=Gf(e,o),u=!!i[3],d=e._cache.get(o.id);let _,p=!1,m;try{if(o.status==="success"&&(_=c.options.shouldReload,typeof _=="function"&&(_=_(SD(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=n_)),!m)if(o.status!=="success")p=!0;else{const H=u||o.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||_||_===void 0&&Date.now()-o.updatedAt>=H&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(H){o.invalid=!0,Ol(e,o),m=A0(e,n,c,H,i)}const w=c.options.loader,k=typeof w=="function",v=k?w:w==null?void 0:w.handler,y=!u||c.options.preload!==!1;let x=y&&w?(B=e._flights)==null?void 0:B.get(o.id):void 0;x===o._flight||m?x=void 0:x&&!p&&!u&&_===void 0?p=!0:p||(x=void 0);const b=!!(w&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&y,N=C&&!b&&(o.status!=="success"||!!w),z=t>=a?i[7]:void 0,A=c.lazyFn&&c._lazy!==!0?z:void 0;if(C&&!w&&(o.invalid=!1,o.updatedAt=Date.now()),x&&x[2]++,N){const H=o._flight;o._flight=x,(U=hS(e,o,H))==null||U.abort(),t>=a&&(o.status="pending"),z==null||z()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):N?WE(e,n,o,c,v,s,i):Promise.resolve([Tc,o.loaderData])).then(H=>(N&&(QE(o,H,u),H[0]===Tc&&(w&&!i[0].signal.aborted&&cQ(e,o,d),t>=a&&(o.status="pending"))),H)),M=Uf(Promise.resolve().then(()=>oh(c,void 0,A)),i[0].signal).then(()=>{},H=>n[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,A0(e,n,c,H,i)]).then(H=>j.then(Q=>(N&&!H&&Q[0]===Tc&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",z==null||z()),H)));if(r.push([t,j,M]),!b)return j.then(H=>XE(o,H));const D={...o,status:"pending",preload:!1,_flight:x};o.invalid=!1,o.isFetching="loader";const L=WE(e,n,D,c,v,s,i).then(H=>(o.isFetching=!1,QE(D,H,!1),H));return(n[2]??(n[2]=[])).push([t,L,M,D]),L.then(H=>XE(D,H))}async function z3(e,n,t,r,s=0){const i=t==null?void 0:t[1][1];let a=i!=null&&i.routeId?n.findIndex(o=>o.routeId===i.routeId):(t==null?void 0:t[0])??n.length-1;a<0&&(a=0);for(let o=a;o>=0;o--){const c=Gf(e,n[o]);try{const u=oh(c,!1);u&&await Uf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(c.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function vf(e,n){n[2]&&(ta(e,n[2].map(t=>t[3])),n[2]=void 0)}async function YE(e,n,t,r){let s;try{await Promise.all(e.map(i=>i[1].then(async a=>{const o=i[0];if(!(r&&o>=await r)){if(a[0]>=za)throw[o,a];!s&&a[0]!==Tc&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===za)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function mS(e,n,t,r,s,i){for(;r[0]===za;){const a=r[1],o=a.options;if(o.reloadDocument?s[3]:s[1]>=20)return r;try{return o.href&&o.reloadDocument?(e.resolveRedirect(a),r):[za,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[Bl,c]:dS(t,c),i=!0}}return r}async function CD(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),d=m=>m[1][0]===ey?z3(e,a,m,r.signal):m[0];let _=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=za)_=0;else if(o){_=o[2]??(o[2]=await d(o));for(const m of t){if(m[0]>=_)break;const w=await m[1];if(w[0]!==Tc&&w[0]=_)break;const w=await m[2];if(w){o=w;break}}if(((o==null?void 0:o[1][0])??0)>=za){const m=o[1];if(m[0]!==za||m[1].options.reloadDocument||m[2])return vf(e,n),m;c=!0,o=[0,[Bl,new Error("Too many redirects")]]}const p=o?o[2]??await d(o):u;if(p>=0){const m=o==null?void 0:o[1],w=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],y=()=>{m&&(k._notFound=void 0,w===Bl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};y(),m||i==null||i();const x=Gf(e,k);try{await Uf(m?Promise.resolve().then(()=>oh(x,w===Bl?"errorComponent":"notFoundComponent")):Promise.all([oh(x),oh(x,"notFoundComponent")]),r.signal)}catch(b){if(b===r.signal&&r.signal.aborted)return vf(e,n),n_}m?c&&(r.abort(),await Promise.all([...t.map(b=>b[1]),...t.map(b=>b[2]),...(n[2]??[]).map(b=>b[1])]),vf(e,n),ta(e,a),y()):k.status="success"}return n}async function ED(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cx._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const x=await z3(e,t,void 0,i,u);t[u]._notFound=void 0,t[x]._notFound=!0,u=x}let d=u<0?t.length:u+1,_=0;for(;_{for(let x=m;x=za&&(d=0);k()}if(!i.aborted&&!r[3]){const x=[];for(const[b,C]of e._flights??[])C[2]||(e._flights.delete(b),x.push(C[1]));for(const b of x)b.abort()}const y=CD(e,s,p,r[0],YE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=YE(s[2],void 0,void 0,y.then(x=>V0(x)?0:fS(t).length,()=>0))),a=await y}catch(c){if(vf(e,s),c===i&&i.aborted)return n_;throw c}return V0(a)?a:ED(e,a,i,r[6]===t.length?r[6]:0)}function j3(e,n){var i,a;if(e._tx!==n)return;const t=n[3],r=e.stores.matches.get();let s=e._pending;for(let o=0;o0){s[3]=setTimeout(()=>j3(e,n),x);return}s[2]=0}const v=t.map(x=>({...x,_flight:void 0}));v[o].status="pending";const y=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(x=>(x&&e._pending===s&&s[4]===y&&!s[2]&&(s[2]=Date.now()+w),x));return}}function a0(e,n){var r;const t=e._pending;(e._tx===n||!((r=e._tx)!=null&&r[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function ZE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!fS(n[3]).some(i=>i.id===t[1]))return;let s;try{await Uf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function zD(e,n){e._committed=n,e.stores.setMatches(n)}function uQ(e,n,t,r){const s=e._committed,i=e._cache;for(const c of t)c.preload=!1,r&&(c._assetEnd=void 0);const a=fS(t).length,o=new Map;{const c=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((_,p)=>_.id===u.id&&(p=(u.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||o.set(u.id,i.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}n[3]=[],e._cache=o,zD(e,t),ta(e,[...i.values(),...s],[...t,...o.values()]),tQ(e,s,t,n)}async function b1(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function jD(e,n,t){const r=t[1].options,s=t[2];if(!s)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=n[1]+1,e._pendingLocation=s;const i=e.commitLocation({...s,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),i}async function _Q(e,n,t,r,s){const i=t.map(c=>({...c}));pS(i);for(const c of r)Ol(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await CD(e,a,r,n[0],s)}catch(c){throw ta(e,i),c}if(V0(o)){ta(e,i),o[0]===za&&e._tx===n&&e._committed===t&&await jD(e,n,o);return}if(await ED(e,o,n[0].signal),e._tx!==n||e._committed!==t){ta(e,i);return}for(const c of i){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Ol(e,u))}zD(e,i),ta(e,t,i)}async function fQ(e,n,t,r,s,i){const a=await ND(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(V0(a)){const _=a[0]===za&&e._tx===n;if((!_||a[1].options.reloadDocument)&&a0(e,n),ta(e,n[3]),n[3]=[],!_)return;if(e._tx!==n){a0(e,n);return}await jD(e,n,a);return}const o=a[1];if(e._tx===n&&await ZE(e,n),e._tx!==n){a0(e,n),ta(e,o),vf(e,a);return}const c=n[2],u=Jb(c,e.stores.resolvedLocation.get()),d=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await ZE(e,n),e._tx!==n){a0(e,n),ta(e,o),vf(e,a);return}const _=()=>{a0(e,n),uQ(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(_,o);if(e._tx!==n){vf(e,a);return}d!=null&&d.length&&_Q(e,n,o,d,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set("idle"),e._tx===n&&e.emit({type:"onResolved",...u}),p&&e._tx===n&&e.emit({type:"onRendered",...u})}),e._tx===n&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function dQ(e,n){var C;const t=e._tx,r=e.stores.resolvedLocation.get(),s=r??e.stores.location.get(),i=e.latestLocation,a=e._pendingLocation,o=(a==null?void 0:a.href)===i.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),d=new AbortController,_=e._preflight;if(e._preflight=d,u||c==null||c[1](),_==null||_.abort(),!d.signal.aborted){const N=Jb(i,r);e.emit({type:"onBeforeNavigate",...N}),d.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(d.signal.aborted){await b1(e,t);return}const p=s.href===i.href;let m=d;const w=e.matchRoutes(i,{_controller:d});pS(w);const k=u?c[1](w):void 0;if(k?m=u:u==null||u.abort(),d.signal.aborted){ta(e,w),await b1(e,t);return}e._preflight=void 0;let v;const y=()=>fQ(e,b,p,()=>j3(e,b),n==null?void 0:n.sync,k),x=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(y).then(),b=[m,o,i,w,Date.now(),x];if(e._tx=b,t){for(const N of e.stores.matches.get()){if(e._tx!==b)break;N.isFetching&&W0(e,N,!1)}t[0].abort(),ta(e,t[3],b[3],!0)}if(e._tx!==b){ta(e,b[3]),b[3]=[],v==null||v(),await b1(e,b);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=w[0])==null?void 0:C.status)!=="success"&&!w.some(N=>N._notFound))&&j3(e,b),v==null||v(y()),await x,await b1(e,b)}async function hQ(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,c;try{try{a=e.matchRoutes(t,{_controller:i}),pS(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await ND(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),ta(e,a)),i.abort()}if(!V0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){Lh(u)||console.error(u);return}}}const pQ="Error preloading route! ☝️";var AD=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{var c,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),r?this._path=ah:this.parentRoute||lS();let s=r?ah:t==null?void 0:t.path;s&&s!=="/"&&(s=yD(s));const i=(t==null?void 0:t.id)||s;let a=r?ah:hv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=hv(["/",a]));const o=a==="__root__"?"/":hv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Rl(o)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>WW({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},mQ=class extends AD{constructor(e){super(e)}},gS=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,n){const t=e.getResetKey();return n.error&&n.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,n){var t,r;(r=(t=this.props).onCatch)==null||r.call(t,e,n)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??gQ,{error:e,reset:this.reset}):this.props.children}};function gQ({error:e}){const[n,t]=T.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:n?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),n?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?f.jsx("code",{children:e.message}):null})}):null]})}function vQ({children:e,fallback:n=null}){return f.jsx(rt.Fragment,{children:TD()?e:n})}function TD(){return rt.useSyncExternalStore(bQ,()=>!0,()=>!1)}function bQ(){return()=>{}}var RD=T.createContext(null);function Oi(e){return T.useContext(RD)}var ty=T.createContext(void 0),yQ=T.createContext(void 0),Tr=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Tr||{});function xQ({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,d,_){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=_,d.depsTail=m;return}const w=u.subsTail;if(w!==void 0&&w.version===_&&w.sub===d)return;const k=d.depsTail=u.subsTail={version:_,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:w,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:d.deps=k,w!==void 0?w.nextSub=k:u.subs=k}function s(u,d=u.sub){const _=u.dep,p=u.prevDep,m=u.nextDep,w=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,w!==void 0?w.prevSub=k:_.subsTail=k,k!==void 0?k.nextSub=w:(_.subs=w)===void 0&&t(_),m}function i(u){let d=u.nextSub,_;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&n(p),m&1){const w=p.subs;if(w!==void 0){const k=(u=w).nextSub;k!==void 0&&(_={value:d,prev:_},d=k);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;_!==void 0;)if(u=_.value,_=_.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let _,p=0,m=!1;e:do{const w=u.dep,k=w.flags;if(d.flags&16)m=!0;else if((k&17)===17){if(e(w)){const v=w.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(_={value:u,prev:_}),u=w.deps,d=w,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=d.subs,y=v.nextSub!==void 0;if(y?(u=_.value,_=_.prev):u=v,m){if(e(d)){y&&o(v),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function o(u){do{const d=u.sub,_=d.flags;(_&48)===32&&(d.flags=_|16,(_&6)===2&&n(d))}while((u=u.nextSub)!==void 0)}function c(u,d){let _=d.depsTail;for(;_!==void 0;){if(_===u)return!0;_=_.prevDep}return!1}}function wQ(e,n,t){var i,a,o;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(a=r?e.error:n)==null?void 0:a.bind(s),complete:(o=r?e.complete:t)==null?void 0:o.bind(s)}}const A3=[];let vv=0;const{link:JE,unlink:kQ,propagate:SQ,checkDirty:MD,shallowPropagate:eN}=xQ({update(e){return e._update()},notify(e){A3[T3++]=e,e.flags&=~Tr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Tr.Mutable|Tr.Dirty,Qv(e))}});let y1=0,T3=0,xc,R3=0;function CQ(e){try{++R3,e()}finally{--R3||OD()}}function Qv(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=kQ(t,e)}function OD(){if(!(R3>0)){for(;y1{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=xc,o=(n==null?void 0:n.compare)??Object.is;if(t)xc=s,++vv,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=Tr.Mutable|Tr.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&t?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{xc=a,t&&(s.flags&=~Tr.RecursedCheck),Qv(s)}}};return t?(s.flags=Tr.Mutable|Tr.Dirty,s.get=function(){const i=s.flags;if(i&Tr.Dirty||i&Tr.Pending&&MD(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&eN(a)}}else i&Tr.Pending&&(s.flags=i&~Tr.Pending);return xc!==void 0&&JE(s,xc,vv),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(SQ(a),eN(a),OD())}},s}function EQ(e){const n=()=>{const r=xc;xc=t,++vv,t.depsTail=void 0,t.flags=Tr.Watching|Tr.RecursedCheck;try{return e()}finally{xc=r,t.flags&=~Tr.RecursedCheck,Qv(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Tr.Watching|Tr.RecursedCheck,notify(){const r=this.flags;r&Tr.Dirty||r&Tr.Pending&&MD(this.deps,this)?n():this.flags=Tr.Watching},stop(){this.flags=Tr.None,this.depsTail=void 0,Qv(this)}};return n(),t}var lw={exports:{}},uw={},_w={exports:{}},fw={};/** +`+S.stack}}var xt=Object.prototype.hasOwnProperty,Kt=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Ht=e.unstable_shouldYield,$e=e.unstable_requestPaint,ot=e.unstable_now,ct=e.unstable_getCurrentPriorityLevel,ye=e.unstable_ImmediatePriority,Be=e.unstable_UserBlockingPriority,Ke=e.unstable_NormalPriority,Ce=e.unstable_LowPriority,Ye=e.unstable_IdlePriority,lt=e.log,je=e.unstable_setDisableYieldValue,Gt=null,Mt=null;function Jt(l){if(typeof lt=="function"&&je(l),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Gt,l)}catch{}}var rn=Math.clz32?Math.clz32:wt,nn=Math.log,Nt=Math.LN2;function wt(l){return l>>>=0,l===0?32:31-(nn(l)/Nt|0)|0}var Bn=256,gr=262144,Gr=4194304;function en(l){var h=l&42;if(h!==0)return h;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Vn(l,h,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var re=S&134217727;return re!==0?(S=re&~O,S!==0?R=en(S):(X&=re,X!==0?R=en(X):g||(g=re&~l,g!==0&&(R=en(g))))):(re=S&~O,re!==0?R=en(re):X!==0?R=en(X):g||(g=S&~l,g!==0&&(R=en(g)))),R===0?0:h!==0&&h!==R&&(h&O)===0&&(O=R&-R,g=h&-h,O>=g||O===32&&(g&4194048)!==0)?h:R}function ls(l,h){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&h)===0}function _t(l,h){switch(l){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fn(){var l=Gr;return Gr<<=1,(Gr&62914560)===0&&(Gr=4194304),l}function yn(l){for(var h=[],g=0;31>g;g++)h.push(l);return h}function Tn(l,h){l.pendingLanes|=h,h!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Kn(l,h,g,S,R,O){var X=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var re=l.entanglements,pe=l.expirationTimes,ze=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var js=/[\n"\\]/g;function ss(l){return l.replace(js,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Zo(l,h,g,S,R,O,X,re){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),h!=null?X==="number"?(h===0&&l.value===""||l.value!=h)&&(l.value=""+Sr(h)):l.value!==""+Sr(h)&&(l.value=""+Sr(h)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),h!=null?br(l,X,Sr(h)):g!=null?br(l,X,Sr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?l.name=""+Sr(re):l.removeAttribute("name")}function aa(l,h,g,S,R,O,X,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),h!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||h!=null)){ri(l);return}g=g!=null?""+Sr(g):"",h=h!=null?""+Sr(h):g,re||h===l.value||(l.value=h),l.defaultValue=h}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=re?l.checked:!!S,l.defaultChecked=!!S,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),ri(l)}function br(l,h,g){h==="number"&&si(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function wi(l,h,g,S){if(l=l.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ki=!1;if(Hs)try{var ft={};Object.defineProperty(ft,"passive",{get:function(){ki=!0}}),window.addEventListener("test",ft,ft),window.removeEventListener("test",ft,ft)}catch{ki=!1}var Qt=null,fa=null,wo=null;function Va(){if(wo)return wo;var l,h=fa,g=h.length,S,R="value"in Qt?Qt.value:Qt.textContent,O=R.length;for(l=0;l=pa),hs=" ",qs=!1;function Si(l,h){switch(l){case"keyup":return Eo.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fi(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var No=!1;function S_(l,h){switch(l){case"compositionend":return Fi(h);case"keypress":return h.which!==32?null:(qs=!0,hs);case"textInput":return l=h.data,l===hs&&qs?null:l;default:return null}}function Xa(l,h){if(No)return l==="compositionend"||!Qa&&Si(l,h)?(l=Va(),wo=fa=Qt=null,No=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:g,offset:h-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=ic(g)}}function ac(l,h){return l&&h?l===h?!0:l&&l.nodeType===3?!1:h&&h.nodeType===3?ac(l,h.parentNode):"contains"in l?l.contains(h):l.compareDocumentPosition?!!(l.compareDocumentPosition(h)&16):!1:!1}function sl(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var h=si(l.document);h instanceof l.HTMLIFrameElement;){try{var g=typeof h.contentWindow.location.href=="string"}catch{g=!1}if(g)l=h.contentWindow;else break;h=si(l.document)}return h}function Rs(l){var h=l&&l.nodeName&&l.nodeName.toLowerCase();return h&&(h==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||h==="textarea"||l.contentEditable==="true")}var Ms=Hs&&"documentMode"in document&&11>=document.documentMode,oc=null,il=null,is=null,al=!1;function ld(l,h,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;al||oc==null||oc!==si(S)||(S=oc,"selectionStart"in S&&Rs(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),is&&ps(is,S)||(is=S,S=t1(il,"onSelect"),0>=X,R-=X,to=1<<32-rn(h)+R|g<vn?(An=Tt,Tt=null):An=Tt.sibling;var Un=Re(ke,Tt,Ne[vn],qe);if(Un===null){Tt===null&&(Tt=An);break}l&&Tt&&Un.alternate===null&&h(ke,Tt),ge=O(Un,ge,vn),qn===null?qt=Un:qn.sibling=Un,qn=Un,Tt=An}if(vn===Ne.length)return g(ke,Tt),Sn&&ro(ke,vn),qt;if(Tt===null){for(;vnvn?(An=Tt,Tt=null):An=Tt.sibling;var Nu=Re(ke,Tt,Un.value,qe);if(Nu===null){Tt===null&&(Tt=An);break}l&&Tt&&Nu.alternate===null&&h(ke,Tt),ge=O(Nu,ge,vn),qn===null?qt=Nu:qn.sibling=Nu,qn=Nu,Tt=An}if(Un.done)return g(ke,Tt),Sn&&ro(ke,vn),qt;if(Tt===null){for(;!Un.done;vn++,Un=Ne.next())Un=Ue(ke,Un.value,qe),Un!==null&&(ge=O(Un,ge,vn),qn===null?qt=Un:qn.sibling=Un,qn=Un);return Sn&&ro(ke,vn),qt}for(Tt=S(Tt);!Un.done;vn++,Un=Ne.next())Un=Ie(Tt,ke,vn,Un.value,qe),Un!==null&&(l&&Un.alternate!==null&&Tt.delete(Un.key===null?vn:Un.key),ge=O(Un,ge,vn),qn===null?qt=Un:qn.sibling=Un,qn=Un);return l&&Tt.forEach(function(dK){return h(ke,dK)}),Sn&&ro(ke,vn),qt}function mr(ke,ge,Ne,qe){if(typeof Ne=="object"&&Ne!==null&&Ne.type===k&&Ne.key===null&&(Ne=Ne.props.children),typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case m:e:{for(var qt=Ne.key;ge!==null;){if(ge.key===qt){if(qt=Ne.type,qt===k){if(ge.tag===7){g(ke,ge.sibling),qe=R(ge,Ne.props.children),qe.return=ke,ke=qe;break e}}else if(ge.elementType===qt||typeof qt=="object"&&qt!==null&&qt.$$typeof===j&&M_(qt)===ge.type){g(ke,ge.sibling),qe=R(ge,Ne.props),jp(qe,Ne),qe.return=ke,ke=qe;break e}g(ke,ge);break}else h(ke,ge);ge=ge.sibling}Ne.type===k?(qe=uc(Ne.props.children,ke.mode,qe,Ne.key),qe.return=ke,ke=qe):(qe=A_(Ne.type,Ne.key,Ne.props,null,ke.mode,qe),jp(qe,Ne),qe.return=ke,ke=qe)}return X(ke);case w:e:{for(qt=Ne.key;ge!==null;){if(ge.key===qt)if(ge.tag===4&&ge.stateNode.containerInfo===Ne.containerInfo&&ge.stateNode.implementation===Ne.implementation){g(ke,ge.sibling),qe=R(ge,Ne.children||[]),qe.return=ke,ke=qe;break e}else{g(ke,ge);break}else h(ke,ge);ge=ge.sibling}qe=he(Ne,ke.mode,qe),qe.return=ke,ke=qe}return X(ke);case j:return Ne=M_(Ne),mr(ke,ge,Ne,qe)}if(Q(Ne))return Ct(ke,ge,Ne,qe);if(B(Ne)){if(qt=B(Ne),typeof qt!="function")throw Error(r(150));return Ne=qt.call(Ne),Yt(ke,ge,Ne,qe)}if(typeof Ne.then=="function")return mr(ke,ge,Cg(Ne),qe);if(Ne.$$typeof===b)return mr(ke,ge,xg(ke,Ne),qe);Eg(ke,Ne)}return typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint"?(Ne=""+Ne,ge!==null&&ge.tag===6?(g(ke,ge.sibling),qe=R(ge,Ne),qe.return=ke,ke=qe):(g(ke,ge),qe=fd(Ne,ke.mode,qe),qe.return=ke,ke=qe),X(ke)):g(ke,ge)}return function(ke,ge,Ne,qe){try{zp=0;var qt=mr(ke,ge,Ne,qe);return bd=null,qt}catch(Tt){if(Tt===vd||Tt===kg)throw Tt;var qn=Xr(29,Tt,null,ke.mode);return qn.lanes=qe,qn.return=ke,qn}finally{}}}var D_=k7(!0),S7=k7(!1),uu=!1;function Tx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rx(l,h){l=l.updateQueue,h.updateQueue===l&&(h.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function _u(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function fu(l,h,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(Jn&2)!==0){var R=S.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),S.pending=h,h=Us(l),Xs(l,null,g),h}return At(l,S,h,g),Us(l)}function Ap(l,h,g){if(h=h.updateQueue,h!==null&&(h=h.shared,(g&4194048)!==0)){var S=h.lanes;S&=l.pendingLanes,g|=S,h.lanes=g,Dn(l,g)}}function Mx(l,h){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var R=null,O=null;if(g=g.firstBaseUpdate,g!==null){do{var X={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};O===null?R=O=X:O=O.next=X,g=g.next}while(g!==null);O===null?R=O=h:O=O.next=h}else R=O=h;g={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:O,shared:S.shared,callbacks:S.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=h:l.next=h,g.lastBaseUpdate=h}var Ox=!1;function Tp(){if(Ox){var l=gd;if(l!==null)throw l}}function Rp(l,h,g,S){Ox=!1;var R=l.updateQueue;uu=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var pe=re,ze=pe.next;pe.next=null,X===null?O=ze:X.next=ze,X=pe;var Pe=l.alternate;Pe!==null&&(Pe=Pe.updateQueue,re=Pe.lastBaseUpdate,re!==X&&(re===null?Pe.firstBaseUpdate=ze:re.next=ze,Pe.lastBaseUpdate=pe))}if(O!==null){var Ue=R.baseState;X=0,Pe=ze=pe=null,re=O;do{var Re=re.lane&-536870913,Ie=Re!==re.lane;if(Ie?(jn&Re)===Re:(S&Re)===Re){Re!==0&&Re===md&&(Ox=!0),Pe!==null&&(Pe=Pe.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var Ct=l,Yt=re;Re=h;var mr=g;switch(Yt.tag){case 1:if(Ct=Yt.payload,typeof Ct=="function"){Ue=Ct.call(mr,Ue,Re);break e}Ue=Ct;break e;case 3:Ct.flags=Ct.flags&-65537|128;case 0:if(Ct=Yt.payload,Re=typeof Ct=="function"?Ct.call(mr,Ue,Re):Ct,Re==null)break e;Ue=f({},Ue,Re);break e;case 2:uu=!0}}Re=re.callback,Re!==null&&(l.flags|=64,Ie&&(l.flags|=8192),Ie=R.callbacks,Ie===null?R.callbacks=[Re]:Ie.push(Re))}else Ie={lane:Re,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Pe===null?(ze=Pe=Ie,pe=Ue):Pe=Pe.next=Ie,X|=Re;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Ie=re,re=Ie.next,Ie.next=null,R.lastBaseUpdate=Ie,R.shared.pending=null}}while(!0);Pe===null&&(pe=Ue),R.baseState=pe,R.firstBaseUpdate=ze,R.lastBaseUpdate=Pe,O===null&&(R.shared.lanes=0),gu|=X,l.lanes=X,l.memoizedState=Ue}}function C7(l,h){if(typeof l!="function")throw Error(r(191,l));l.call(h)}function E7(l,h){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,re={};K.T=re,Jx(l,!1,h,g);try{var pe=R(),ze=K.S;if(ze!==null&&ze(re,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Pe=nV(pe,S);Dp(l,h,Pe,wa(l))}else Dp(l,h,S,wa(l))}catch(Ue){Dp(l,h,{then:function(){},status:"rejected",reason:Ue},wa())}finally{Z.p=O,X!==null&&re.types!==null&&(X.types=re.types),K.T=X}}function cV(){}function Yx(l,h,g,S){if(l.tag!==5)throw Error(r(476));var R=s8(l).queue;r8(l,R,h,ee,g===null?cV:function(){return i8(l),g(S)})}function s8(l){var h=l.memoizedState;if(h!==null)return h;h={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:ee},next:null};var g={};return h.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ll,lastRenderedState:g},next:null},l.memoizedState=h,l=l.alternate,l!==null&&(l.memoizedState=h),h}function i8(l){var h=s8(l);h.next===null&&(h=l.alternate.memoizedState),Dp(l,h.next.queue,{},wa())}function Zx(){return Ys(Zp)}function a8(){return cs().memoizedState}function o8(){return cs().memoizedState}function lV(l){for(var h=l.return;h!==null;){switch(h.tag){case 24:case 3:var g=wa();l=_u(g);var S=fu(h,l,g);S!==null&&(Qi(S,h,g),Ap(S,h,g)),h={cache:Nx()},l.payload=h;return}h=h.return}}function uV(l,h,g){var S=wa();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Lg(l)?l8(h,g):(g=In(l,h,g,S),g!==null&&(Qi(g,l,S),u8(g,h,S)))}function c8(l,h,g){var S=wa();Dp(l,h,g,S)}function Dp(l,h,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Lg(l))l8(h,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var X=h.lastRenderedState,re=O(X,g);if(R.hasEagerState=!0,R.eagerState=re,or(re,X))return At(l,h,R,0),yr===null&&nt(),!1}catch{}finally{}if(g=In(l,h,R,S),g!==null)return Qi(g,l,S),u8(g,h,S),!0}return!1}function Jx(l,h,g,S){if(S={lane:2,revertLane:T2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Lg(l)){if(h)throw Error(r(479))}else h=In(l,g,S,2),h!==null&&Qi(h,l,2)}function Lg(l){var h=l.alternate;return l===hn||h!==null&&h===hn}function l8(l,h){xd=jg=!0;var g=l.pending;g===null?h.next=h:(h.next=g.next,g.next=h),l.pending=h}function u8(l,h,g){if((g&4194048)!==0){var S=h.lanes;S&=l.pendingLanes,g|=S,h.lanes=g,Dn(l,g)}}var Lp={readContext:Ys,use:Rg,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useLayoutEffect:Yr,useInsertionEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useDeferredValue:Yr,useTransition:Yr,useSyncExternalStore:Yr,useId:Yr,useHostTransitionStatus:Yr,useFormState:Yr,useActionState:Yr,useOptimistic:Yr,useMemoCache:Yr,useCacheRefresh:Yr};Lp.useEffectEvent=Yr;var _8={readContext:Ys,use:Rg,useCallback:function(l,h){return Ei().memoizedState=[l,h===void 0?null:h],l},useContext:Ys,useEffect:W7,useImperativeHandle:function(l,h,g){g=g!=null?g.concat([l]):null,Og(4194308,4,Z7.bind(null,h,l),g)},useLayoutEffect:function(l,h){return Og(4194308,4,l,h)},useInsertionEffect:function(l,h){Og(4,2,l,h)},useMemo:function(l,h){var g=Ei();h=h===void 0?null:h;var S=l();if(L_){Jt(!0);try{l()}finally{Jt(!1)}}return g.memoizedState=[S,h],S},useReducer:function(l,h,g){var S=Ei();if(g!==void 0){var R=g(h);if(L_){Jt(!0);try{g(h)}finally{Jt(!1)}}}else R=h;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=uV.bind(null,hn,l),[S.memoizedState,l]},useRef:function(l){var h=Ei();return l={current:l},h.memoizedState=l},useState:function(l){l=Vx(l);var h=l.queue,g=c8.bind(null,hn,h);return h.dispatch=g,[l.memoizedState,g]},useDebugValue:Qx,useDeferredValue:function(l,h){var g=Ei();return Xx(g,l,h)},useTransition:function(){var l=Vx(!1);return l=r8.bind(null,hn,l.queue,!0,!1),Ei().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,h,g){var S=hn,R=Ei();if(Sn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=h(),yr===null)throw Error(r(349));(jn&127)!==0||R7(S,h,g)}R.memoizedState=g;var O={value:g,getSnapshot:h};return R.queue=O,W7(O7.bind(null,S,O,l),[l]),S.flags|=2048,kd(9,{destroy:void 0},M7.bind(null,S,O,g,h),null),g},useId:function(){var l=Ei(),h=yr.identifierPrefix;if(Sn){var g=no,S=to;g=(S&~(1<<32-rn(S)-1)).toString(32)+g,h="_"+h+"R_"+g,g=Ag++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof S.is=="string"?X.createElement("select",{is:S.is}):X.createElement("select"),S.multiple?O.multiple=!0:S.size&&(O.size=S.size);break;default:O=typeof S.is=="string"?X.createElement(R,{is:S.is}):X.createElement(R)}}O[sr]=h,O[Qn]=S;e:for(X=h.child;X!==null;){if(X.tag===5||X.tag===6)O.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===h)break e;for(;X.sibling===null;){if(X.return===null||X.return===h)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}h.stateNode=O;e:switch(Js(O,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&_l(h)}}return Nr(h),d2(h,h.type,l===null?null:l.memoizedProps,h.pendingProps,g),null;case 6:if(l&&h.stateNode!=null)l.memoizedProps!==S&&_l(h);else{if(typeof S!="string"&&h.stateNode===null)throw Error(r(166));if(l=ce.current,ol(h)){if(l=h.stateNode,g=h.memoizedProps,S=null,R=ms,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[sr]=h,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||A9(l.nodeValue,g)),l||To(h,!0)}else l=n1(l).createTextNode(S),l[sr]=h,h.stateNode=l}return Nr(h),null;case 31:if(g=h.memoizedState,l===null||l.memoizedState!==null){if(S=ol(h),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=h.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[sr]=h}else _c(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Nr(h),l=!1}else g=Hn(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return h.flags&256?(ba(h),h):(ba(h),null);if((h.flags&128)!==0)throw Error(r(558))}return Nr(h),null;case 13:if(S=h.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=ol(h),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[sr]=h}else _c(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Nr(h),R=!1}else R=Hn(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(ba(h),h):(ba(h),null)}return ba(h),(h.flags&128)!==0?(h.lanes=g,h):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=h.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),O=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(O=S.memoizedState.cachePool.pool),O!==R&&(S.flags|=2048)),g!==l&&g&&(h.child.flags|=8192),Fg(h,h.updateQueue),Nr(h),null);case 4:return ae(),l===null&&D2(h.stateNode.containerInfo),Nr(h),null;case 10:return io(h.type),Nr(h),null;case 19:if(q(os),S=h.memoizedState,S===null)return Nr(h),null;if(R=(h.flags&128)!==0,O=S.rendering,O===null)if(R)$p(S,!1);else{if(Zr!==0||l!==null&&(l.flags&128)!==0)for(l=h.child;l!==null;){if(O=zg(l),O!==null){for(h.flags|=128,$p(S,!1),l=O.updateQueue,h.updateQueue=l,Fg(h,l),h.subtreeFlags=0,l=g,g=h.child;g!==null;)kp(g,l),g=g.sibling;return V(os,os.current&1|2),Sn&&ro(h,S.treeForkCount),h.child}l=l.sibling}S.tail!==null&&ot()>Vg&&(h.flags|=128,R=!0,$p(S,!1),h.lanes=4194304)}else{if(!R)if(l=zg(O),l!==null){if(h.flags|=128,R=!0,l=l.updateQueue,h.updateQueue=l,Fg(h,l),$p(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Sn)return Nr(h),null}else 2*ot()-S.renderingStartTime>Vg&&g!==536870912&&(h.flags|=128,R=!0,$p(S,!1),h.lanes=4194304);S.isBackwards?(O.sibling=h.child,h.child=O):(l=S.last,l!==null?l.sibling=O:h.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=ot(),l.sibling=null,g=os.current,V(os,R?g&1|2:g&1),Sn&&ro(h,S.treeForkCount),l):(Nr(h),null);case 22:case 23:return ba(h),Lx(),S=h.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(h.flags|=8192):S&&(h.flags|=8192),S?(g&536870912)!==0&&(h.flags&128)===0&&(Nr(h),h.subtreeFlags&6&&(h.flags|=8192)):Nr(h),g=h.updateQueue,g!==null&&Fg(h,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(S=h.memoizedState.cachePool.pool),S!==g&&(h.flags|=2048),l!==null&&q(R_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),h.memoizedState.cache!==g&&(h.flags|=2048),io(gs),Nr(h),null;case 25:return null;case 30:return null}throw Error(r(156,h.tag))}function pV(l,h){switch(as(h),h.tag){case 1:return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 3:return io(gs),ae(),l=h.flags,(l&65536)!==0&&(l&128)===0?(h.flags=l&-65537|128,h):null;case 26:case 27:case 5:return me(h),null;case 31:if(h.memoizedState!==null){if(ba(h),h.alternate===null)throw Error(r(340));_c()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 13:if(ba(h),l=h.memoizedState,l!==null&&l.dehydrated!==null){if(h.alternate===null)throw Error(r(340));_c()}return l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 19:return q(os),null;case 4:return ae(),null;case 10:return io(h.type),null;case 22:case 23:return ba(h),Lx(),l!==null&&q(R_),l=h.flags,l&65536?(h.flags=l&-65537|128,h):null;case 24:return io(gs),null;case 25:return null;default:return null}}function D8(l,h){switch(as(h),h.tag){case 3:io(gs),ae();break;case 26:case 27:case 5:me(h);break;case 4:ae();break;case 31:h.memoizedState!==null&&ba(h);break;case 13:ba(h);break;case 19:q(os);break;case 10:io(h.type);break;case 22:case 23:ba(h),Lx(),l!==null&&q(R_);break;case 24:io(gs)}}function Bp(l,h){try{var g=h.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var R=S.next;g=R;do{if((g.tag&l)===l){S=void 0;var O=g.create,X=g.inst;S=O(),X.destroy=S}g=g.next}while(g!==R)}}catch(re){ur(h,h.return,re)}}function pu(l,h,g){try{var S=h.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var O=R.next;S=O;do{if((S.tag&l)===l){var X=S.inst,re=X.destroy;if(re!==void 0){X.destroy=void 0,R=h;var pe=g,ze=re;try{ze()}catch(Pe){ur(R,pe,Pe)}}}S=S.next}while(S!==O)}}catch(Pe){ur(h,h.return,Pe)}}function L8(l){var h=l.updateQueue;if(h!==null){var g=l.stateNode;try{E7(h,g)}catch(S){ur(l,l.return,S)}}}function I8(l,h,g){g.props=I_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){ur(l,h,S)}}function Pp(l,h){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var S=l.stateNode;break;case 30:S=l.stateNode;break;default:S=l.stateNode}typeof g=="function"?l.refCleanup=g(S):g.current=S}}catch(R){ur(l,h,R)}}function fc(l,h){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){ur(l,h,R)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(R){ur(l,h,R)}else g.current=null}function $8(l){var h=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":g.autoFocus&&S.focus();break e;case"img":g.src?S.src=g.src:g.srcSet&&(S.srcset=g.srcSet)}}catch(R){ur(l,l.return,R)}}function h2(l,h,g){try{var S=l.stateNode;IV(S,l.type,g,h),S[Qn]=h}catch(R){ur(l,l.return,R)}}function B8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&wu(l.type)||l.tag===4}function p2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||B8(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&wu(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function m2(l,h,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,h?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,h):(h=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,h.appendChild(l),g=g._reactRootContainer,g!=null||h.onclick!==null||(h.onclick=cr));else if(S!==4&&(S===27&&wu(l.type)&&(g=l.stateNode,h=null),l=l.child,l!==null))for(m2(l,h,g),l=l.sibling;l!==null;)m2(l,h,g),l=l.sibling}function Hg(l,h,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,h?g.insertBefore(l,h):g.appendChild(l);else if(S!==4&&(S===27&&wu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Hg(l,h,g),l=l.sibling;l!==null;)Hg(l,h,g),l=l.sibling}function P8(l){var h=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);Js(h,S,g),h[sr]=l,h[Qn]=g}catch(O){ur(l,l.return,O)}}var fl=!1,ys=!1,g2=!1,F8=typeof WeakSet=="function"?WeakSet:Set,Gs=null;function mV(l,h){if(l=l.containerInfo,$2=l1,l=sl(l),Rs(l)){if("selectionStart"in l)var g={start:l.selectionStart,end:l.selectionEnd};else e:{g=(g=l.ownerDocument)&&g.defaultView||window;var S=g.getSelection&&g.getSelection();if(S&&S.rangeCount!==0){g=S.anchorNode;var R=S.anchorOffset,O=S.focusNode;S=S.focusOffset;try{g.nodeType,O.nodeType}catch{g=null;break e}var X=0,re=-1,pe=-1,ze=0,Pe=0,Ue=l,Re=null;t:for(;;){for(var Ie;Ue!==g||R!==0&&Ue.nodeType!==3||(re=X+R),Ue!==O||S!==0&&Ue.nodeType!==3||(pe=X+S),Ue.nodeType===3&&(X+=Ue.nodeValue.length),(Ie=Ue.firstChild)!==null;)Re=Ue,Ue=Ie;for(;;){if(Ue===l)break t;if(Re===g&&++ze===R&&(re=X),Re===O&&++Pe===S&&(pe=X),(Ie=Ue.nextSibling)!==null)break;Ue=Re,Re=Ue.parentNode}Ue=Ie}g=re===-1||pe===-1?null:{start:re,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(B2={focusedElem:l,selectionRange:g},l1=!1,Gs=h;Gs!==null;)if(h=Gs,l=h.child,(h.subtreeFlags&1028)!==0&&l!==null)l.return=h,Gs=l;else for(;Gs!==null;){switch(h=Gs,O=h.alternate,l=h.flags,h.tag){case 0:if((l&4)!==0&&(l=h.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Js(O,S,g),O[sr]=l,Ln(O),S=O;break e;case"link":var X=K9("link","href",R).get(S+(g.href||""));if(X){for(var re=0;remr&&(X=mr,mr=Yt,Yt=X);var ke=ou(re,Yt),ge=ou(re,mr);if(ke&&ge&&(Ie.rangeCount!==1||Ie.anchorNode!==ke.node||Ie.anchorOffset!==ke.offset||Ie.focusNode!==ge.node||Ie.focusOffset!==ge.offset)){var Ne=Ue.createRange();Ne.setStart(ke.node,ke.offset),Ie.removeAllRanges(),Yt>mr?(Ie.addRange(Ne),Ie.extend(ge.node,ge.offset)):(Ne.setEnd(ge.node,ge.offset),Ie.addRange(Ne))}}}}for(Ue=[],Ie=re;Ie=Ie.parentNode;)Ie.nodeType===1&&Ue.push({element:Ie,left:Ie.scrollLeft,top:Ie.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,K.T=null,g=S2,S2=null;var O=bu,X=gl;if(Os=0,zd=bu=null,gl=0,(Jn&6)!==0)throw Error(r(331));var re=Jn;if(Jn|=4,Z8(O.current),Q8(O,O.current,X,g),Jn=re,Vp(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Gt,O)}catch{}return!0}finally{Z.p=R,K.T=S,m9(l,h)}}function v9(l,h,g){h=xe(g,h),h=r2(l.stateNode,h,2),l=fu(l,h,2),l!==null&&(Tn(l,2),dc(l))}function ur(l,h,g){if(l.tag===3)v9(l,l,g);else for(;h!==null;){if(h.tag===3){v9(h,l,g);break}else if(h.tag===1){var S=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(vu===null||!vu.has(S))){l=xe(g,l),g=b8(2),S=fu(h,g,2),S!==null&&(y8(g,S,h,l),Tn(S,2),dc(S));break}}h=h.return}}function z2(l,h,g){var S=l.pingCache;if(S===null){S=l.pingCache=new bV;var R=new Set;S.set(h,R)}else R=S.get(h),R===void 0&&(R=new Set,S.set(h,R));R.has(g)||(y2=!0,R.add(g),l=SV.bind(null,l,h,g),h.then(l,l))}function SV(l,h,g){var S=l.pingCache;S!==null&&S.delete(h),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,yr===l&&(jn&g)===g&&(Zr===4||Zr===3&&(jn&62914560)===jn&&300>ot()-Gg?(Jn&2)===0&&jd(l,0):x2|=g,Nd===jn&&(Nd=0)),dc(l)}function b9(l,h){h===0&&(h=fn()),l=Qr(l,h),l!==null&&(Tn(l,h),dc(l))}function CV(l){var h=l.memoizedState,g=0;h!==null&&(g=h.retryLane),b9(l,g)}function EV(l,h){var g=0;switch(l.tag){case 31:case 13:var S=l.stateNode,R=l.memoizedState;R!==null&&(g=R.retryLane);break;case 19:S=l.stateNode;break;case 22:S=l.stateNode._retryCache;break;default:throw Error(r(314))}S!==null&&S.delete(h),b9(l,g)}function NV(l,h){return Kt(l,h)}var Zg=null,Td=null,j2=!1,Jg=!1,A2=!1,xu=0;function dc(l){l!==Td&&l.next===null&&(Td===null?Zg=Td=l:Td=Td.next=l),Jg=!0,j2||(j2=!0,jV())}function Vp(l,h){if(!A2&&Jg){A2=!0;do for(var g=!1,S=Zg;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var X=S.suspendedLanes,re=S.pingedLanes;O=(1<<31-rn(42|l)+1)-1,O&=R&~(X&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,k9(S,O))}else O=jn,O=Vn(S,S===yr?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||ls(S,O)||(g=!0,k9(S,O));S=S.next}while(g);A2=!1}}function zV(){y9()}function y9(){Jg=j2=!1;var l=0;xu!==0&&BV()&&(l=xu);for(var h=ot(),g=null,S=Zg;S!==null;){var R=S.next,O=x9(S,h);O===0?(S.next=null,g===null?Zg=R:g.next=R,R===null&&(Td=g)):(g=S,(l!==0||(O&3)!==0)&&(Jg=!0)),S=R}Os!==0&&Os!==5||Vp(l),xu!==0&&(xu=0)}function x9(l,h){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0re)break;var Pe=pe.transferSize,Ue=pe.initiatorType;Pe&&T9(Ue)&&(pe=pe.responseEnd,X+=Pe*(pe"u"?null:document;function q9(l,h,g){var S=Rd;if(S&&typeof h=="string"&&h){var R=ss(h);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),H9.has(R)||(H9.add(R),l={rel:l,crossOrigin:g,href:h},S.querySelector(R)===null&&(h=S.createElement("link"),Js(h,"link",l),Ln(h),S.head.appendChild(h)))}}function WV(l){vl.D(l),q9("dns-prefetch",l,null)}function QV(l,h){vl.C(l,h),q9("preconnect",l,h)}function XV(l,h,g){vl.L(l,h,g);var S=Rd;if(S&&l&&h){var R='link[rel="preload"][as="'+ss(h)+'"]';h==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+ss(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+ss(g.imageSizes)+'"]')):R+='[href="'+ss(l)+'"]';var O=R;switch(h){case"style":O=Md(l);break;case"script":O=Od(l)}co.has(O)||(l=f({rel:"preload",href:h==="image"&&g&&g.imageSrcSet?void 0:l,as:h},g),co.set(O,l),S.querySelector(R)!==null||h==="style"&&S.querySelector(Xp(O))||h==="script"&&S.querySelector(Yp(O))||(h=S.createElement("link"),Js(h,"link",l),Ln(h),S.head.appendChild(h)))}}function YV(l,h){vl.m(l,h);var g=Rd;if(g&&l){var S=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+ss(S)+'"][href="'+ss(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Od(l)}if(!co.has(O)&&(l=f({rel:"modulepreload",href:l},h),co.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Yp(O)))return}S=g.createElement("link"),Js(S,"link",l),Ln(S),g.head.appendChild(S)}}}function ZV(l,h,g){vl.S(l,h,g);var S=Rd;if(S&&l){var R=ir(S).hoistableStyles,O=Md(l);h=h||"default";var X=R.get(O);if(!X){var re={loading:0,preload:null};if(X=S.querySelector(Xp(O)))re.loading=5;else{l=f({rel:"stylesheet",href:l,"data-precedence":h},g),(g=co.get(O))&&V2(l,g);var pe=X=S.createElement("link");Ln(pe),Js(pe,"link",l),pe._p=new Promise(function(ze,Pe){pe.onload=ze,pe.onerror=Pe}),pe.addEventListener("load",function(){re.loading|=1}),pe.addEventListener("error",function(){re.loading|=2}),re.loading|=4,s1(X,h,S)}X={type:"stylesheet",instance:X,count:1,state:re},R.set(O,X)}}}function JV(l,h){vl.X(l,h);var g=Rd;if(g&&l){var S=ir(g).hoistableScripts,R=Od(l),O=S.get(R);O||(O=g.querySelector(Yp(R)),O||(l=f({src:l,async:!0},h),(h=co.get(R))&&K2(l,h),O=g.createElement("script"),Ln(O),Js(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function eK(l,h){vl.M(l,h);var g=Rd;if(g&&l){var S=ir(g).hoistableScripts,R=Od(l),O=S.get(R);O||(O=g.querySelector(Yp(R)),O||(l=f({src:l,async:!0,type:"module"},h),(h=co.get(R))&&K2(l,h),O=g.createElement("script"),Ln(O),Js(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function U9(l,h,g,S){var R=(R=ce.current)?r1(R):null;if(!R)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(h=Md(g.href),g=ir(R).hoistableStyles,S=g.get(h),S||(S={type:"style",instance:null,count:0,state:null},g.set(h,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){l=Md(g.href);var O=ir(R).hoistableStyles,X=O.get(l);if(X||(R=R.ownerDocument||R,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,X),(O=R.querySelector(Xp(l)))&&!O._p&&(X.instance=O,X.state.loading=5),co.has(l)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},co.set(l,g),O||tK(R,l,g,X.state))),h&&S===null)throw Error(r(528,""));return X}if(h&&S!==null)throw Error(r(529,""));return null;case"script":return h=g.async,g=g.src,typeof g=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Od(g),g=ir(R).hoistableScripts,S=g.get(h),S||(S={type:"script",instance:null,count:0,state:null},g.set(h,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function Md(l){return'href="'+ss(l)+'"'}function Xp(l){return'link[rel="stylesheet"]['+l+"]"}function G9(l){return f({},l,{"data-precedence":l.precedence,precedence:null})}function tK(l,h,g,S){l.querySelector('link[rel="preload"][as="style"]['+h+"]")?S.loading=1:(h=l.createElement("link"),S.preload=h,h.addEventListener("load",function(){return S.loading|=1}),h.addEventListener("error",function(){return S.loading|=2}),Js(h,"link",g),Ln(h),l.head.appendChild(h))}function Od(l){return'[src="'+ss(l)+'"]'}function Yp(l){return"script[async]"+l}function V9(l,h,g){if(h.count++,h.instance===null)switch(h.type){case"style":var S=l.querySelector('style[data-href~="'+ss(g.href)+'"]');if(S)return h.instance=S,Ln(S),S;var R=f({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return S=(l.ownerDocument||l).createElement("style"),Ln(S),Js(S,"style",R),s1(S,g.precedence,l),h.instance=S;case"stylesheet":R=Md(g.href);var O=l.querySelector(Xp(R));if(O)return h.state.loading|=4,h.instance=O,Ln(O),O;S=G9(g),(R=co.get(R))&&V2(S,R),O=(l.ownerDocument||l).createElement("link"),Ln(O);var X=O;return X._p=new Promise(function(re,pe){X.onload=re,X.onerror=pe}),Js(O,"link",S),h.state.loading|=4,s1(O,g.precedence,l),h.instance=O;case"script":return O=Od(g.src),(R=l.querySelector(Yp(O)))?(h.instance=R,Ln(R),R):(S=g,(R=co.get(O))&&(S=f({},g),K2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),Ln(R),Js(R,"link",S),l.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(r(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(S=h.instance,h.state.loading|=4,s1(S,g.precedence,l));return h.instance}function s1(l,h,g){for(var S=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,O=R,X=0;X title"):null)}function nK(l,h,g){if(g===1||h.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return l=h.disabled,typeof h.precedence=="string"&&l==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function Q9(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function rK(l,h,g,S){if(g.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var R=Md(S.href),O=h.querySelector(Xp(R));if(O){h=O._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(l.count++,l=a1.bind(l),h.then(l,l)),g.state.loading|=4,g.instance=O,Ln(O);return}O=h.ownerDocument||h,S=G9(S),(R=co.get(R))&&V2(S,R),O=O.createElement("link"),Ln(O);var X=O;X._p=new Promise(function(re,pe){X.onload=re,X.onerror=pe}),Js(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=a1.bind(l),h.addEventListener("load",g),h.addEventListener("error",g))}}var W2=0;function sK(l,h){return l.stylesheets&&l.count===0&&c1(l,l.stylesheets),0W2?50:800)+h);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function a1(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)c1(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var o1=null;function c1(l,h){l.stylesheets=null,l.unsuspend!==null&&(l.count++,o1=new Map,h.forEach(iK,l),o1=null,a1.call(l))}function iK(l,h){if(!(h.state.loading&4)){var g=o1.get(l);if(g)var S=g.get(null);else{g=new Map,o1.set(l,g);for(var R=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),sw.exports=oW(),sw.exports}var lW=cW();const uW=!1;var fD=T.useLayoutEffect;function _W(e,n,t){T.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>n();const r=new IntersectionObserver(s=>{n(s.pop())},{rootMargin:"100px"});return r.observe(e.current),()=>{r.disconnect(),n()}},[n,t,e])}function fW(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function V0(e){return e[e.length-1]}function Dh(e,n){return typeof e=="function"?e(n):e}const dD=Object.prototype.hasOwnProperty,dW=Object.prototype.propertyIsEnumerable;function hD(e){for(const n in e)if(dD.call(e,n))return!0;return!1}const hW=()=>Object.create(null),P_=(e,n)=>J_(e,n,hW);function J_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=OE(e)&&OE(s);if(!i&&!(Uv(e)&&Uv(s)))return s;const a=i?e:RE(e);if(!a)return s;const o=i?s:RE(s);if(!o)return s;const c=a.length,u=o.length,d=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!ME(t)||!t.hasOwnProperty("isPrototypeOf"))}function ME(e){return Object.prototype.toString.call(e)==="[object Object]"}function OE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zu(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,s=e.length;rs||!Zu(e[a],n[a],t)))return!1;return s===i}return!1}const pW=/[\x00-\x1f\x7f"<>`{}]/g;function mW(e){return e.replace(pW,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function DE(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return mW(n)}const gW=["http:","https:","mailto:","tel:"];function Gv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function i0(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let t=0,r="",s;for(;(s=n.exec(e))!==null;)r+=DE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+DE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function vW(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function bW(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,t=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=n.get(i);if(a)return s(a),a.value},set(i,a){if(n.size>=e&&t){const c=t;n.delete(c.key),c.next&&(t=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,t||(t=c),n.set(i,c)}},clear(){n.clear(),t=void 0,r=void 0}}}const Wu=4,pD=5;function mD(e,n,t=new Uint16Array(6)){const r=e.indexOf("/",n),s=r===-1?e.length:r,i=e.substring(n,s);if(!i||!i.includes("$"))return t[0]=0,t[1]=n,t[2]=n,t[3]=s,t[4]=s,t[5]=s,t;if(i==="$"){const c=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=c,t[4]=c,t[5]=c,t}if(i.charCodeAt(0)===36)return t[0]=1,t[1]=n,t[2]=n+1,t[3]=s,t[4]=s,t[5]=s,t;const a=i.indexOf("{");let o;if(a!==-1&&a+1!L.parse&&L.caseSensitive===j&&L.prefix===z&&L.suffix===A));if(D)x=D;else{const L=yW(N,f,j,z,A);x=L,L.parent=s,L.depth=i;let B;N===1?B=s.dynamic??(s.dynamic=[]):N===3?B=s.optional??(s.optional=[]):B=s.wildcard??(s.wildcard=[]),B.push(L),B.length===2&&(a==null||a.push(B))}break}}s=x}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const y=sh(f);y.kind=pD,y.parent=s,i++,y.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(y),s=y}const v=(t.path||!t.children)&&!t.isRoot;if(v&&f.endsWith("/")){const y=sh(f);y.kind=Wu,y.parent=s,i++,y.depth=i,s.index=y,s=y}s.parse=k??null,s.priority=((d=p==null?void 0:p.params)==null?void 0:d.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Jb(e,n,f,c,s,i,a,o)}function gD(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.parse&&n.parse&&(e.priority||n.priority))return n.priority-e.priority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function sh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function yW(e,n,t,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0,caseSensitive:t,prefix:r,suffix:s}}function xW(e,n){const t=sh("/"),r=new Uint16Array(6),s=[];for(const i of e)Jb(!1,r,i,1,t,0,s);for(const i of s)i.sort(gD);n.masksTree=t,n.flatCache=Vv(1e3)}function wW(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=uS(e,n.masksTree);return n.flatCache.set(e,r),r}function kW(e,n,t,r,s){e||(e="/"),r||(r="/");const i=n?`case\0${e}`:e;let a=s.singleCache.get(i);return a||(a=sh("/"),Jb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),uS(r,a,t)}function SW(e,n,t=!1){const r=t?e:`nofuzz\0${e}`,s=n.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=uS(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=bD(i.route)),n.matchCache.set(r,i),i}function CW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function EW(e,n=!1,t){const r=sh(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;Jb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&lS(),a[u.id]=u,c!==0&&u.path){const d=CW(u.fullPath);(!o[d]||u.fullPath.endsWith("/"))&&(o[d]=u)}c++});for(const u of i)u.sort(gD);return{processedTree:{segmentTree:r,singleCache:Vv(1e3),matchCache:Vv(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function uS(e,n,t=!1){const r=e.split("/"),s=zW(e,r,n,t);if(!s)return null;const[i]=vD(e,r,s);return{route:s.node.route,rawParams:i}}function vD(e,n,t){var d,f,p,m;const r=NW(t.node);let s=null;const i=Object.create(null);let a=((d=t.extract)==null?void 0:d.part)??0,o=((f=t.extract)==null?void 0:f.node)??0,c=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;z--){const A=f.wildcard[z],{prefix:j,suffix:M}=A;if(!(j&&(b||!(A.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(j)))){if(M){if(b)continue;const D=n.slice(p).join("/"),L=D.slice(-M.length);if((A.caseSensitive?L:L.toLowerCase())!==M||D.length-M.length=0;A--){const j=f.optional[A];o.push({node:j,index:p,skipped:z,statics:w,dynamics:k,optionals:v,extract:y,rawParams:x})}if(!b)for(let A=f.optional.length-1;A>=0;A--){const j=f.optional[A],{prefix:M,suffix:D}=j;if(M||D){const L=j.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!L.startsWith(M)||D&&L.indexOf(D,L.length-D.length)=0;z--){const A=f.dynamic[z],{prefix:j,suffix:M}=A;if(j||M){const D=A.caseSensitive?C:N??(N=C.toLowerCase());if(j&&!D.startsWith(j)||M&&D.indexOf(M,D.length-M.length)=0;z--){const A=f.pathless[z];o.push({node:A,index:p,skipped:m,statics:w,dynamics:k,optionals:v,extract:y,rawParams:x})}}if(u)return u;if(r&&c){let d=c.index;for(let p=0;pe.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===Wu)>(e.node.kind===Wu)||n.node.kind===Wu==(e.node.kind===Wu)&&n.node.depth>e.node.depth))):!0}function pv(e){return mv(e.filter(n=>n!==void 0).join("/"))}function mv(e){return e.replace(/\/{2,}/g,"/")}function yD(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Rl(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function xD(e){return Rl(yD(e))}function Kv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function AW(e,n,t){return Kv(e,t)===Kv(n,t)}function TW({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=mv(n)),n.startsWith("/"))return n.length===1||t==="preserve"?n:t==="always"?n.endsWith("/")?n:`${n}/`:n.endsWith("/")?n.slice(0,-1):n;const s=n===".";let i;if(r){i=s?e:e+"\0"+n;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=mv(e)),a=e.split("/");a.length>1&&V0(a)==="";)a.pop();const u=n.split("/");for(let d=0,f=u.length;d1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(V0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?mv(o):o)||"/";return i&&r&&r.set(i,c),c}function RW(e){const n=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(n.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(t,"g");return s=>s.replace(r,i=>n.get(i)??i)}function cw(e,n,t){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>$E(s,t)).join("/"):$E(r,t)}function IE({path:e,params:n,decoder:t,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,c,u="";for(;oe.state.__TSR_key||e.href;function BW(e){const n=e.getAttribute(BE);if(n)return`[${BE}="${n}"]`;let t="",r=e,s;for(;s=r.parentNode;){let i=1,a=r;for(;a=a.previousElementSibling;)i++;const o=`${r.localName}:nth-child(${i})`;t=t?`${o} > ${t}`:o,r=s}return t}let b1=!1;const gv="window";function C3(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function PE(e){const n=new Set;for(const t of e){if(t===gv)continue;const r=C3(t);r&&n.add(r)}return n}function PW(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||$W,i=new Set,a=o=>{const c=Du[o]||(Du[o]={});for(const u of i)u===document?c[gv]={scrollX,scrollY}:u.isConnected&&(c[BW(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,b1=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{b1||i.add(o.target)},!0),e.subscribe("onBeforeLoad",o=>{o.fromLocation&&a(s(o.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),IW()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,d=r.next,f=r.hash;let p;if(i.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(o.toLocation),w=o.fromLocation&&s(o.fromLocation);if(r.restoring&&w&&w!==m){const v=Du[w];if(v){let y=Du[m];for(const x in v){if(x===gv){if(d)continue}else{const b=C3(x);if(!b||d&&u&&(p??(p=PE(u)),p.has(b)))continue}y||(y=Du[m]={}),y[x]??(y[x]=v[x])}}}b1=!0;try{const v=o.toLocation.hash,y=o.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(d){!v&&u&&(p??(p=PE(u)));const b=v&&y&&f,C=r.restoring?Du[m]:void 0;if(C)for(const N in C){const{scrollX:z,scrollY:A}=C[N];if(N===gv){if(b)continue;scrollTo({top:A,left:z,behavior:c}),x=!0}else{const j=C3(N);j&&(j.scrollLeft=z,j.scrollTop=A,p==null||p.delete(j))}}if(!v){const N={top:0,left:0,behavior:c};if(x||scrollTo(N),p)for(const z of p)z.scrollTo(N)}}!x&&v&&y&&((k=document.getElementById(v))==null||k.scrollIntoView(y))}finally{b1=!1}}))}function FW(e,n=String){const t=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&t.set(r,n(s))}return t.toString()}function lw(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function HW(e){const n=new URLSearchParams(e),t=Object.create(null);for(const[r,s]of n.entries()){const i=t[r];i==null?t[r]=lw(s):Array.isArray(i)?i.push(lw(s)):t[r]=[i,lw(s)]}return t}const qW=/^(?:\s|["[{\d-]|fa|nu|tr)/,UW=VW(JSON.parse),GW=KW(JSON.stringify,JSON.parse);function VW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=HW(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function KW(e,n){const t=n===JSON.parse;function r(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(n&&typeof s=="string"){if(t&&!qW.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=FW(s,r);return i?`?${i}`:""}}const ah="__root__";function WW(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function wD(e){return e instanceof Response&&!!e.options}function QW(e){return{input:({url:n})=>{for(const t of e)n=E3(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=kD(e[t],n);return n}}}function XW(e){const n=xD(e.basepath),t=`/${n}`,r=e.caseSensitive?t:t.toLowerCase(),s=`${r}/`;return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===r?i.pathname="/":a.startsWith(s)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=pv(["/",n,i.pathname]),i)}}function E3(e,n){var r;const t=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function kD(e,n){var r;const t=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function YW(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),c=t(void 0),u=t([]),d=r(()=>u.get().map(k=>i.get(k).get())),f=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:d.get(),location:o.get(),resolvedLocation:c.get()}));function p(k){let v=i.get(k);return v||(v=t(void 0),i.set(k,v)),v}const m={status:a,location:o,resolvedLocation:c,ids:u,matches:d,byRoute:i,__store:f,getMatchStore:p,setMatches:w};function w(k){const v=u.get(),y=k.map(x=>x.routeId);s(()=>{bW(v,y)||u.set(y);for(const x of v)y.includes(x)||i.get(x).set(()=>{});for(const x of k){const b=p(x.routeId);b.get()!==x&&b.set(x)}})}return m}var Ju="__TSR_index",FE="popstate",HE="beforeunload";function ZW(e){let n=e.getLocation();const t=new Set,r=a=>{n=e.getLocation(),t.forEach(o=>o({location:n,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):n=e.getLocation()},i=async({task:a,navigateOpts:o,...c})=>{var f,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((f=e.getBlockers)==null?void 0:f.call(e))??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&d)for(const m of u){const w=Wv(c.path,c.state);if(await m.blockerFn({currentLocation:n,nextLocation:w,action:c.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,o,c)=>{const u=n.state[Ju];o=qE(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=n.state[Ju];o=qE(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>n.state[Ju]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const o=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...o,a]),()=>{var d,f;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(f=e.setBlockers)==null||f.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function qE(e,n){n||(n={});const t=_S();return{...n,key:t,__TSR_key:t,[Ju]:e}}function JW(e){var A,j;const n=typeof document<"u"?window:void 0,t=n.history.pushState,r=n.history.replaceState;let s=[];const i=()=>s,a=M=>s=M,o=(M=>M),c=(()=>Wv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((j=n.history.state)!=null&&j.key)){const M=_S();n.history.replaceState({[Ju]:0,key:M,__TSR_key:M},"")}let u=c(),d,f=!1,p=!1,m=!1,w=!1;const k=()=>u;let v;const y=()=>{v&&(z._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),z._ignoreSubscribers=!1,v=void 0,d=void 0)},x=(M,D,L)=>{const B=o(D),U=!!v;U||(d=u),u=Wv(D,L),v=[B,L,(v==null?void 0:v[2])||M],U||queueMicrotask(()=>y())},b=M=>{u=c(),z.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[Ju]-u.state[Ju],L=D===1,B=D===-1,U=!L&&!B||f;f=!1;const H=U?"GO":B?"BACK":"FORWARD",Q=U?{type:"GO",index:D}:{type:B?"BACK":"FORWARD"};if(m)m=!1;else{const K=i();if(typeof document<"u"&&K.length){for(const Z of K)if(await Z.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,n.history.go(1),z.notify(Q);return}}}u=c(),z.notify(Q)},N=M=>{if(w){w=!1;return}let D=!1;const L=i();if(typeof document<"u"&&L.length)for(const B of L){const U=B.enableBeforeUnload??!0;if(U===!0){D=!0;break}if(typeof U=="function"&&U()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},z=ZW({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>x(!0,M,D),replaceState:(M,D)=>x(!1,M,D),back:M=>(M&&(m=!0),w=!0,n.history.back()),forward:M=>{M&&(m=!0),w=!0,n.history.forward()},go:M=>{f=!0,n.history.go(M)},createHref:M=>o(M),flush:y,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(HE,N,{capture:!0}),n.removeEventListener(FE,C)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(HE,N,{capture:!0}),n.addEventListener(FE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return z._ignoreSubscribers||b("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return z._ignoreSubscribers||b("REPLACE"),D},z}function eQ(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function Wv(e,n){const t=eQ(e),r=t.indexOf("#"),s=t.indexOf("?"),i=_S();return{href:t,pathname:t.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:t.length),hash:r>-1?t.substring(r):"",search:s>-1?t.slice(s,r===-1?void 0:r):"",state:n||{[Ju]:0,key:i,__TSR_key:i}}}function _S(){return(Math.random()+1).toString(36).substring(7)}function UE(e){var n,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((n=e.options.component)==null?void 0:n.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function ey(e,n){return{fromLocation:n,toLocation:e,pathChanged:(n==null?void 0:n.pathname)!==e.pathname,hrefChanged:(n==null?void 0:n.href)!==e.href,hashChanged:(n==null?void 0:n.hash)!==e.hash}}function GE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function tQ(e,n,t,r){var s,i,a,o;for(const c of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===c.routeId)||(i=(s=e.routesById[c.routeId].options).onLeave)==null||i.call(s,c)}for(const c of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[c.routeId].options)[n.some(u=>u.routeId===c.routeId)?"onStay":"onEnter"])==null||o.call(a,c)}}var nQ=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...t},this.isServer=this.options.isServer??uW??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=RW(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=JW()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=Vv(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=YW(this.latestLocation,u),PW(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],d=xD(o);d&&d!=="/"&&u.push(XW({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:QW(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=EW(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&xW(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,r)=>{const s={eventType:t,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const r of this.subscribers)if(r.eventType===t.type)try{r.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,r)=>{const s=({pathname:c,search:u,hash:d,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const y=this.options.parseSearch(u),x=this.options.stringifySearch(y);return{href:c+x+d,publicHref:c+x+d,pathname:i0(c).path,external:!1,searchStr:x,search:P_(r==null?void 0:r.search,y),hash:i0(d.slice(1)).path,state:J_(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),w=E3(this.rewrite,m),k=this.options.parseSearch(w.search),v=this.options.stringifySearch(k);return w.search=v,{href:w.href.replace(w.origin,""),publicHref:f,pathname:i0(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:v,search:P_(r==null?void 0:r.search,k),hash:i0(w.hash.slice(1)).path,state:J_(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>TW({base:t,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,r,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:r},s):this.matchRoutesInternal(t,r),this.getMatchedRoutes=t=>{const r=Object.create(null),s=SW(Rl(t),this.processedTree,!0);return s&&Object.assign(r,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],r,s==null?void 0:s.route]},this.buildLocation=t=>{const r=(i={})=>{var M,D;if(i.href){const L=Wv(i.href,{});i={...i,to:E3(this.rewrite,new URL(L.pathname,this.origin)).pathname,search:this.options.parseSearch(L.search),hash:L.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],d=o[3],f=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=VE(i.params,d);const m=this.routesByPath[Rl(f)];let w;if(m)w=this.getRouteBranch(m);else if(f.includes("$"))w=[];else{const[L,B,U]=this.getMatchedRoutes(f);w=L,this.options.notFoundRoute&&(!U||U.path!=="/"&&B["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&hD(p))for(const L of w){const B=((M=L.options.params)==null?void 0:M.stringify)??L.options.stringifyParams;if(B){p===d&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?f:i0(IE({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=u;if(t._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const L={};w.forEach(B=>{if(B.options.validateSearch)try{Object.assign(L,vv(B.options.validateSearch,{...L,...v}))}catch{}}),v=L}v=sQ(v,i,w,t._includeValidateSearch),v=P_(u,v);const y=this.options.stringifySearch(v),x=i.hash===!0?a.hash:i.hash?Dh(i.hash,a.hash):void 0,b=x?`#${x}`:"";let C=i.state===!0?a.state:i.state?Dh(i.state,a.state):{};i.state&&(C=J_(a.state,C));const N=`${k}${y}${b}`;let z,A,j=!1;if(this.rewrite){const L=new URL(N,this.origin),B=kD(this.rewrite,L);z=L.href.replace(L.origin,""),B.origin!==this.origin?(A=B.href,j=!0):A=B.pathname+B.search+B.hash}else z=vW(N),A=z;return{publicHref:A,href:z,pathname:k,search:v,searchStr:y,state:C,hash:x??"",external:j,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=wW(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,d=VE(c,a);s.maskedLocation=r({from:t.from,...u,params:d})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=Rl(this.latestLocation.href)===Rl(s.href)&&Zu(GE(s.state),GE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(d=>{c=d});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,i=s.replace?"REPLACE":"PUSH",this.history[i==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,...o}={})=>{const c=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=c;const u=this.commitLocation({...c,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var c,u;let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(t!==void 0||!s){const f=this.buildLocation({to:t,...a});s=s??f.publicHref,i=i??f.publicHref}const d=!o&&i?i:s;if(Gv(d,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=((u=(c=this.history).getBlockers)==null?void 0:u.call(c))??[];for(const p of f)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await dQ(this,t)},this.startViewTransition=t=>{var s,i;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&((i=(s=window.CSS)==null?void 0:s.supports)!=null&&i.call(s,"selector(:active-view-transition-type(a))"))){const o=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(ey(o,c)):r.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,d;const r=this._committed,s=t==null?void 0:t.filter,i=this._preloads,a=new Set([...r,...this._cache.values(),...[...(i==null?void 0:i.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(f=>!s||s(f)).map(f=>f.id)),o=[];for(const[f,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(f),o.push(f));const c=f=>{if(a.has(f.id)){const p=this.routesById[f.routeId],m={...f,invalid:!0,...(t!=null&&t.forcePending||f.status==="error"||f.status==="notFound")&&UE(p)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,m}return f};this._committed=r.map(c);for(const[f,p]of this._cache)a.has(f)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const f of a)(d=this._flights)==null||d.delete(f);for(const f of o)f.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t.headers.get("Location");if(t.options.href){if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;t.options.href=i,t.headers.set("Location",i)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&Gv(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const r=this._cache,s=this._preloads,i=t==null?void 0:t.filter,a=[],o=[];for(const[d,f]of r)(!i||i(f))&&(o.push(d),a.push(f));const c=[];for(const[d,f]of s??[])(!i||f.some(i))&&(c.push(d),a.push(...f));for(const d of o)r.delete(d);for(const d of c)s.delete(d);for(const d of a){const f=d._flight;d._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(d.id))===f&&this._flights.delete(d.id),c.push(f[1]))}for(const d of c)d.abort()},this.loadRouteChunk=oh,this.preloadRoute=t=>hQ(this,t),this.matchRoute=(t,r)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},i=this.buildLocation(s),a=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!a)return!1;const o=(r==null?void 0:r.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=kW(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!Zu(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Zu(o.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??GW,parseSearch:e.parseSearch??UW,protocolAllowlist:e.protocolAllowlist??gW}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:t}){this.routesById=e,this.routesByPath=n,this.processedTree=t;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=bD(e),this.routeBranchCache.set(e,n)),n}matchRoutesInternal(e,n){var p,m;const[t,r,s]=this.getMatchedRoutes(e.pathname);let i=t,a=!1;(s?s.path!=="/"&&r["**"]:Rl(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?iQ(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,d=(w,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===w.id?v:w===this.options.notFoundRoute?u.find(y=>y.routeId===w.id):void 0};let f;for(let w=0;w{const m=p(c.preSearchFilters?c.preSearchFilters.reduce((w,k)=>k(w),f):f);return c.postSearchFilters?c.postSearchFilters.reduce((w,k)=>k(w),m):m};s.push(d)}const u=c.validateSearch;if(r&&u){const d=({search:f,next:p,meta:m})=>{const w=p(f);try{const k=vv(u,w);if(m&&k)for(const v in k)v in w||(m.defaulted||(m.defaulted=new Map)).set(v,k[v]);return{...w,...k}}catch{}return w};s.push(d)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const f=Dh(n.search,c);return u&&(u.explicit=f),f}const d=(f,p)=>{if(p){const m=u||{};return{search:i(o+1,f,m),meta:m}}return i(o+1,f,u)};return s[o]({search:c,next:d,meta:u})};return i(0,e)}function iQ(e,n){if(e!=="root"){let t;for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return ah}function VE(e,n){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return n;const t=Object.assign(Object.create(null),n);return Object.assign(t,Dh(e,t))}function KE(e,n){var r;const t=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;t&&Object.assign(n,t(n))}function N3(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function aQ(e,n){const t=N3(e,"component");let r=N3(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function oh(e,n,t){const r=()=>n===!1?void 0:n?N3(e,n):aQ(e,t),s=e._lazy;if(s)return s===!0?r():s.then(r);if(!e.lazyFn)return r();const i=e.lazyFn().then(a=>{{const{id:o,...c}=a.options;Object.assign(e.options,c),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function fS(e){const n=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return n&&n{const s=()=>r(n);n.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,r).finally(()=>n.removeEventListener("abort",s))})}function Gf(e,n){return e.routesById[n.routeId]}function W0(e,n,t){return wD(e)?[za,e]:Lh(e)?(e.routeId||(e.routeId=t),[ty,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Bl,e]):[Tc,e]}function dS(e,n){var r,s;let t=W0(n,!0,e.id);if(t[0]!==Bl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=W0(i,!0,e.id)}return t}function T0(e,n,t,r,s){return s[0].signal.aborted?n_:mS(e,n,t,dS(t,r),s)}async function oQ(e,n,t,r,s,i){var d,f;const[a,o]=n,c=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...C,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:o,routeId:w.id};try{const C=m._ctx||(m._ctx=w.options.context?w.options.context({...v,deps:m.loaderDeps,context:k})||{}:void 0);m.context={...k,...C}}catch(C){return Ol(e,m),[p,T0(e,n,w,C,t)]}if(c.aborted)return[p,n_];const y=m.paramsError??m.searchError;if(y!==void 0)return Ol(e,m),[p,T0(e,n,w,y,t)];const x=w.options.beforeLoad;if(!x)continue;const b=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{Q0(e,m,"beforeLoad",t[0]);const C=await Uf(x({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,n_];const N=mS(e,n,w,W0(C,!1,w.id),t);if(N[0]!==Tc)return Ol(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Ol(e,m),[p,T0(e,n,w,C,t)]}finally{m.status=b,Q0(e,m,!1,t[0])}}s()}function hS(e,n,t){var r;if(!(!t||--t[2])){if(((r=e._flights)==null?void 0:r.get(n.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(n)&&s[3].some(i=>i.id===n.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(n.id)}return t[1]}}function Ol(e,n){var r;const t=n._flight;n._flight=void 0,(r=hS(e,n,t))==null||r.abort()}function ta(e,n,t,r){var i;const s=[];for(const a of n)if(!(t!=null&&t.includes(a))){const o=a._flight;if(a._flight=void 0,r&&(o==null?void 0:o[2])===1&&((i=e._flights)==null?void 0:i.get(a.id))===o&&(t!=null&&t.some(c=>c.id===a.id)))o[2]=0;else{const c=hS(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function pS(e){for(const n of e){const t=n._flight;t&&t[2]++}}function Q0(e,n,t,r){var a;if(n.isFetching=t,r&&((a=e._tx)==null?void 0:a[0])!==r)return;const s=e.stores.byRoute.get(n.routeId),i=s==null?void 0:s.get();(i==null?void 0:i.id)===n.id&&s.set({...i,isFetching:t})}function SD(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:c=>e.navigate({...c,_fromLocation:o}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:i,context:t.context,route:r,...e.options.additionalContext}}async function WE(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return n_;if(!s)return[Tc,void 0];let u=t._flight;Q0(e,t,"loader",o);try{if(!u){const d=new AbortController;u=[Promise.resolve().then(()=>s(SD(e,n,t,r,d,i,!!a[3]))).then(f=>W0(f,!1,r.id),f=>W0(f,!0,r.id)).then(f=>{var p;return f[0]!==Tc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||d.abort()),f[0]===Bl&&u[2]?dS(r,f[1]):f}),d,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],mS(e,n,r,await Uf(u[0],c),a)}catch(d){if(d!==c||!c.aborted)throw d;return Ol(e,t),n_}finally{Q0(e,t,!1,o)}}function QE(e,n,t){n[0]!==za&&(e.status="success",e.error=void 0,n[0]===Tc?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function cQ(e,n,t){const r=e._cache.get(n.id);if(r!==t||e._committed.some(i=>i.id===n.id&&i._flight===n._flight))return;const s={...n,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(n.id,s),r&&Ol(e,r)}function XE(e,n){return n[0]===Bl||n[0]===ty?{...e,status:n[0]===Bl?"error":"notFound",error:n[1],_flight:void 0}:e}function lQ(e,n,t,r,s,i,a){var B,U;const o=n[1][t],c=Gf(e,o),u=!!i[3],d=e._cache.get(o.id);let f,p=!1,m;try{if(o.status==="success"&&(f=c.options.shouldReload,typeof f=="function"&&(f=f(SD(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=n_)),!m)if(o.status!=="success")p=!0;else{const H=u||o.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||f||f===void 0&&Date.now()-o.updatedAt>=H&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(H){o.invalid=!0,Ol(e,o),m=T0(e,n,c,H,i)}const w=c.options.loader,k=typeof w=="function",v=k?w:w==null?void 0:w.handler,y=!u||c.options.preload!==!1;let x=y&&w?(B=e._flights)==null?void 0:B.get(o.id):void 0;x===o._flight||m?x=void 0:x&&!p&&!u&&f===void 0?p=!0:p||(x=void 0);const b=!!(w&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&y,N=C&&!b&&(o.status!=="success"||!!w),z=t>=a?i[7]:void 0,A=c.lazyFn&&c._lazy!==!0?z:void 0;if(C&&!w&&(o.invalid=!1,o.updatedAt=Date.now()),x&&x[2]++,N){const H=o._flight;o._flight=x,(U=hS(e,o,H))==null||U.abort(),t>=a&&(o.status="pending"),z==null||z()}C||(o.isFetching=!1);const j=(m?Promise.resolve(m):N?WE(e,n,o,c,v,s,i):Promise.resolve([Tc,o.loaderData])).then(H=>(N&&(QE(o,H,u),H[0]===Tc&&(w&&!i[0].signal.aborted&&cQ(e,o,d),t>=a&&(o.status="pending"))),H)),M=Uf(Promise.resolve().then(()=>oh(c,void 0,A)),i[0].signal).then(()=>{},H=>n[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,T0(e,n,c,H,i)]).then(H=>j.then(Q=>(N&&!H&&Q[0]===Tc&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",z==null||z()),H)));if(r.push([t,j,M]),!b)return j.then(H=>XE(o,H));const D={...o,status:"pending",preload:!1,_flight:x};o.invalid=!1,o.isFetching="loader";const L=WE(e,n,D,c,v,s,i).then(H=>(o.isFetching=!1,QE(D,H,!1),H));return(n[2]??(n[2]=[])).push([t,L,M,D]),L.then(H=>XE(D,H))}async function z3(e,n,t,r,s=0){const i=t==null?void 0:t[1][1];let a=i!=null&&i.routeId?n.findIndex(o=>o.routeId===i.routeId):(t==null?void 0:t[0])??n.length-1;a<0&&(a=0);for(let o=a;o>=0;o--){const c=Gf(e,n[o]);try{const u=oh(c,!1);u&&await Uf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(c.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function vf(e,n){n[2]&&(ta(e,n[2].map(t=>t[3])),n[2]=void 0)}async function YE(e,n,t,r){let s;try{await Promise.all(e.map(i=>i[1].then(async a=>{const o=i[0];if(!(r&&o>=await r)){if(a[0]>=za)throw[o,a];!s&&a[0]!==Tc&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===za)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function mS(e,n,t,r,s,i){for(;r[0]===za;){const a=r[1],o=a.options;if(o.reloadDocument?s[3]:s[1]>=20)return r;try{return o.href&&o.reloadDocument?(e.resolveRedirect(a),r):[za,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[Bl,c]:dS(t,c),i=!0}}return r}async function CD(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),d=m=>m[1][0]===ty?z3(e,a,m,r.signal):m[0];let f=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=za)f=0;else if(o){f=o[2]??(o[2]=await d(o));for(const m of t){if(m[0]>=f)break;const w=await m[1];if(w[0]!==Tc&&w[0]=f)break;const w=await m[2];if(w){o=w;break}}if(((o==null?void 0:o[1][0])??0)>=za){const m=o[1];if(m[0]!==za||m[1].options.reloadDocument||m[2])return vf(e,n),m;c=!0,o=[0,[Bl,new Error("Too many redirects")]]}const p=o?o[2]??await d(o):u;if(p>=0){const m=o==null?void 0:o[1],w=m==null?void 0:m[0],k=a[p],v=m==null?void 0:m[1],y=()=>{m&&(k._notFound=void 0,w===Bl?k.status="error":(v.routeId=k.routeId,k.routeId===e.routeTree.id?(k.status="success",k._notFound=!0):k.status="notFound"),k.error=v,k.isFetching=!1)};y(),m||i==null||i();const x=Gf(e,k);try{await Uf(m?Promise.resolve().then(()=>oh(x,w===Bl?"errorComponent":"notFoundComponent")):Promise.all([oh(x),oh(x,"notFoundComponent")]),r.signal)}catch(b){if(b===r.signal&&r.signal.aborted)return vf(e,n),n_}m?c&&(r.abort(),await Promise.all([...t.map(b=>b[1]),...t.map(b=>b[2]),...(n[2]??[]).map(b=>b[1])]),vf(e,n),ta(e,a),y()):k.status="success"}return n}async function ED(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cx._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const x=await z3(e,t,void 0,i,u);t[u]._notFound=void 0,t[x]._notFound=!0,u=x}let d=u<0?t.length:u+1,f=0;for(;f{for(let x=m;x=za&&(d=0);k()}if(!i.aborted&&!r[3]){const x=[];for(const[b,C]of e._flights??[])C[2]||(e._flights.delete(b),x.push(C[1]));for(const b of x)b.abort()}const y=CD(e,s,p,r[0],YE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=YE(s[2],void 0,void 0,y.then(x=>K0(x)?0:fS(t).length,()=>0))),a=await y}catch(c){if(vf(e,s),c===i&&i.aborted)return n_;throw c}return K0(a)?a:ED(e,a,i,r[6]===t.length?r[6]:0)}function j3(e,n){var i,a;if(e._tx!==n)return;const t=n[3],r=e.stores.matches.get();let s=e._pending;for(let o=0;o0){s[3]=setTimeout(()=>j3(e,n),x);return}s[2]=0}const v=t.map(x=>({...x,_flight:void 0}));v[o].status="pending";const y=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(x=>(x&&e._pending===s&&s[4]===y&&!s[2]&&(s[2]=Date.now()+w),x));return}}function a0(e,n){var r;const t=e._pending;(e._tx===n||!((r=e._tx)!=null&&r[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function ZE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!fS(n[3]).some(i=>i.id===t[1]))return;let s;try{await Uf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function zD(e,n){e._committed=n,e.stores.setMatches(n)}function uQ(e,n,t,r){const s=e._committed,i=e._cache;for(const c of t)c.preload=!1,r&&(c._assetEnd=void 0);const a=fS(t).length,o=new Map;{const c=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((f,p)=>f.id===u.id&&(p=(u.preload?d.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:d.options.gcTime??e.options.defaultGcTime??3e5)||o.set(u.id,i.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}n[3]=[],e._cache=o,zD(e,t),ta(e,[...i.values(),...s],[...t,...o.values()]),tQ(e,s,t,n)}async function y1(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function jD(e,n,t){const r=t[1].options,s=t[2];if(!s)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=n[1]+1,e._pendingLocation=s;const i=e.commitLocation({...s,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),i}async function _Q(e,n,t,r,s){const i=t.map(c=>({...c}));pS(i);for(const c of r)Ol(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await CD(e,a,r,n[0],s)}catch(c){throw ta(e,i),c}if(K0(o)){ta(e,i),o[0]===za&&e._tx===n&&e._committed===t&&await jD(e,n,o);return}if(await ED(e,o,n[0].signal),e._tx!==n||e._committed!==t){ta(e,i);return}for(const c of i){const u=e._cache.get(c.id);u!=null&&u._flight&&u._flight===c._flight&&(e._cache.delete(c.id),Ol(e,u))}zD(e,i),ta(e,t,i)}async function fQ(e,n,t,r,s,i){const a=await ND(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(K0(a)){const f=a[0]===za&&e._tx===n;if((!f||a[1].options.reloadDocument)&&a0(e,n),ta(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){a0(e,n);return}await jD(e,n,a);return}const o=a[1];if(e._tx===n&&await ZE(e,n),e._tx!==n){a0(e,n),ta(e,o),vf(e,a);return}const c=n[2],u=ey(c,e.stores.resolvedLocation.get()),d=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await ZE(e,n),e._tx!==n){a0(e,n),ta(e,o),vf(e,a);return}const f=()=>{a0(e,n),uQ(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(f,o);if(e._tx!==n){vf(e,a);return}d!=null&&d.length&&_Q(e,n,o,d,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set("idle"),e._tx===n&&e.emit({type:"onResolved",...u}),p&&e._tx===n&&e.emit({type:"onRendered",...u})}),e._tx===n&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function dQ(e,n){var C;const t=e._tx,r=e.stores.resolvedLocation.get(),s=r??e.stores.location.get(),i=e.latestLocation,a=e._pendingLocation,o=(a==null?void 0:a.href)===i.href?a._redirects??0:0,c=e._handoff,u=c==null?void 0:c[0](),d=new AbortController,f=e._preflight;if(e._preflight=d,u||c==null||c[1](),f==null||f.abort(),!d.signal.aborted){const N=ey(i,r);e.emit({type:"onBeforeNavigate",...N}),d.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(d.signal.aborted){await y1(e,t);return}const p=s.href===i.href;let m=d;const w=e.matchRoutes(i,{_controller:d});pS(w);const k=u?c[1](w):void 0;if(k?m=u:u==null||u.abort(),d.signal.aborted){ta(e,w),await y1(e,t);return}e._preflight=void 0;let v;const y=()=>fQ(e,b,p,()=>j3(e,b),n==null?void 0:n.sync,k),x=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(y).then(),b=[m,o,i,w,Date.now(),x];if(e._tx=b,t){for(const N of e.stores.matches.get()){if(e._tx!==b)break;N.isFetching&&Q0(e,N,!1)}t[0].abort(),ta(e,t[3],b[3],!0)}if(e._tx!==b){ta(e,b[3]),b[3]=[],v==null||v(),await y1(e,b);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(k||!e._committed.length&&((C=w[0])==null?void 0:C.status)!=="success"&&!w.some(N=>N._notFound))&&j3(e,b),v==null||v(y()),await x,await y1(e,b)}async function hQ(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,c;try{try{a=e.matchRoutes(t,{_controller:i}),pS(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await ND(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),ta(e,a)),i.abort()}if(!K0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){Lh(u)||console.error(u);return}}}const pQ="Error preloading route! ☝️";var AD=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{var c,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(c=this.options).getParentRoute)==null?void 0:u.call(c),r?this._path=ah:this.parentRoute||lS();let s=r?ah:t==null?void 0:t.path;s&&s!=="/"&&(s=yD(s));const i=(t==null?void 0:t.id)||s;let a=r?ah:pv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=pv(["/",a]));const o=a==="__root__"?"/":pv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=Rl(o)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>WW({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},mQ=class extends AD{constructor(e){super(e)}},gS=class extends T.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,n){const t=e.getResetKey();return n.error&&n.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,n){var t,r;(r=(t=this.props).onCatch)==null||r.call(t,e,n)}render(){const e=this.state.error;return e?T.createElement(this.props.errorComponent??gQ,{error:e,reset:this.reset}):this.props.children}};function gQ({error:e}){const[n,t]=T.useState(!1);return _.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[_.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),_.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:n?"Hide Error":"Show Error"})]}),_.jsx("div",{style:{height:".25rem"}}),n?_.jsx("div",{children:_.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?_.jsx("code",{children:e.message}):null})}):null]})}function vQ({children:e,fallback:n=null}){return _.jsx(rt.Fragment,{children:TD()?e:n})}function TD(){return rt.useSyncExternalStore(bQ,()=>!0,()=>!1)}function bQ(){return()=>{}}var RD=T.createContext(null);function Oi(e){return T.useContext(RD)}var ny=T.createContext(void 0),yQ=T.createContext(void 0),Rr=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Rr||{});function xQ({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,d,f){const p=d.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:d.deps;if(m!==void 0&&m.dep===u){m.version=f,d.depsTail=m;return}const w=u.subsTail;if(w!==void 0&&w.version===f&&w.sub===d)return;const k=d.depsTail=u.subsTail={version:f,dep:u,sub:d,prevDep:p,nextDep:m,prevSub:w,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:d.deps=k,w!==void 0?w.nextSub=k:u.subs=k}function s(u,d=u.sub){const f=u.dep,p=u.prevDep,m=u.nextDep,w=u.nextSub,k=u.prevSub;return m!==void 0?m.prevDep=p:d.depsTail=p,p!==void 0?p.nextDep=m:d.deps=m,w!==void 0?w.prevSub=k:f.subsTail=k,k!==void 0?k.nextSub=w:(f.subs=w)===void 0&&t(f),m}function i(u){let d=u.nextSub,f;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&c(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&n(p),m&1){const w=p.subs;if(w!==void 0){const k=(u=w).nextSub;k!==void 0&&(f={value:d,prev:f},d=k);continue}}if((u=d)!==void 0){d=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){d=u.nextSub;continue e}break}while(!0)}function a(u,d){let f,p=0,m=!1;e:do{const w=u.dep,k=w.flags;if(d.flags&16)m=!0;else if((k&17)===17){if(e(w)){const v=w.subs;v.nextSub!==void 0&&o(v),m=!0}}else if((k&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=w.deps,d=w,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=d.subs,y=v.nextSub!==void 0;if(y?(u=f.value,f=f.prev):u=v,m){if(e(d)){y&&o(v),d=u.sub;continue}m=!1}else d.flags&=-33;d=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function o(u){do{const d=u.sub,f=d.flags;(f&48)===32&&(d.flags=f|16,(f&6)===2&&n(d))}while((u=u.nextSub)!==void 0)}function c(u,d){let f=d.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function wQ(e,n,t){var i,a,o;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(a=r?e.error:n)==null?void 0:a.bind(s),complete:(o=r?e.complete:t)==null?void 0:o.bind(s)}}const A3=[];let bv=0;const{link:JE,unlink:kQ,propagate:SQ,checkDirty:MD,shallowPropagate:eN}=xQ({update(e){return e._update()},notify(e){A3[T3++]=e,e.flags&=~Rr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Rr.Mutable|Rr.Dirty,Xv(e))}});let x1=0,T3=0,xc,R3=0;function CQ(e){try{++R3,e()}finally{--R3||OD()}}function Xv(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=kQ(t,e)}function OD(){if(!(R3>0)){for(;x1{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=xc,o=(n==null?void 0:n.compare)??Object.is;if(t)xc=s,++bv,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=Rr.Mutable|Rr.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&t?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{xc=a,t&&(s.flags&=~Rr.RecursedCheck),Xv(s)}}};return t?(s.flags=Rr.Mutable|Rr.Dirty,s.get=function(){const i=s.flags;if(i&Rr.Dirty||i&Rr.Pending&&MD(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&eN(a)}}else i&Rr.Pending&&(s.flags=i&~Rr.Pending);return xc!==void 0&&JE(s,xc,bv),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(SQ(a),eN(a),OD())}},s}function EQ(e){const n=()=>{const r=xc;xc=t,++bv,t.depsTail=void 0,t.flags=Rr.Watching|Rr.RecursedCheck;try{return e()}finally{xc=r,t.flags&=~Rr.RecursedCheck,Xv(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Rr.Watching|Rr.RecursedCheck,notify(){const r=this.flags;r&Rr.Dirty||r&Rr.Pending&&MD(this.deps,this)?n():this.flags=Rr.Watching},stop(){this.flags=Rr.None,this.depsTail=void 0,Xv(this)}};return n(),t}var uw={exports:{}},_w={},fw={exports:{}},dw={};/** * @license React * use-sync-external-store-shim.production.js * @@ -55,7 +55,7 @@ Error generating stack: `+S.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var nN;function NQ(){if(nN)return fw;nN=1;var e=Um();function n(_,p){return _===p&&(_!==0||1/_===1/p)||_!==_&&p!==p}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(_,p){var m=p(),w=r({inst:{value:m,getSnapshot:p}}),k=w[0].inst,v=w[1];return i(function(){k.value=m,k.getSnapshot=p,c(k)&&v({inst:k})},[_,m,p]),s(function(){return c(k)&&v({inst:k}),_(function(){c(k)&&v({inst:k})})},[_]),a(m),m}function c(_){var p=_.getSnapshot;_=_.value;try{var m=p();return!t(_,m)}catch{return!0}}function u(_,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return fw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,fw}var rN;function zQ(){return rN||(rN=1,_w.exports=NQ()),_w.exports}/** + */var nN;function NQ(){if(nN)return dw;nN=1;var e=Gm();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(f,p){var m=p(),w=r({inst:{value:m,getSnapshot:p}}),k=w[0].inst,v=w[1];return i(function(){k.value=m,k.getSnapshot=p,c(k)&&v({inst:k})},[f,m,p]),s(function(){return c(k)&&v({inst:k}),f(function(){c(k)&&v({inst:k})})},[f]),a(m),m}function c(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!t(f,m)}catch{return!0}}function u(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return dw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,dw}var rN;function zQ(){return rN||(rN=1,fw.exports=NQ()),fw.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -63,7 +63,7 @@ Error generating stack: `+S.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var sN;function jQ(){if(sN)return uw;sN=1;var e=Um(),n=zQ();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return uw.useSyncExternalStoreWithSelector=function(u,d,_,p,m){var w=i(null);if(w.current===null){var k={hasValue:!1,value:null};w.current=k}else k=w.current;w=o(function(){function y(z){if(!x){if(x=!0,b=z,z=p(z),m!==void 0&&k.hasValue){var A=k.value;if(m(A,z))return C=A}return C=z}if(A=C,r(b,z))return A;var j=p(z);return m!==void 0&&m(A,j)?(b=z,A):(b=z,C=j)}var x=!1,b,C,N=_===void 0?null:_;return[function(){return y(d())},N===null?void 0:function(){return y(N())}]},[d,_,p,m]);var v=s(u,w[0],w[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},uw}var iN;function AQ(){return iN||(iN=1,lw.exports=jQ()),lw.exports}var DD=AQ();const TQ=qm(DD);function RQ(e,n){return e===n}function Oc(e,n,t=RQ){const r=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return DD.useSyncExternalStoreWithSelector(r,s,s,n,t)}var aN={};function vS(e,n){const t=T.useRef();return r=>{const s=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??n.options.defaultStructuralSharing?t.current=J_(t.current,s):s}}function Vf(e){const n=Oi(),t=T.useContext(e.from?yQ:ty),r=e.from??t,s=n.stores.getMatchStore(r),i=vS(e,n),a=Oc(s,o=>o?i(o):aN);if(a!==aN)return a;(e.shouldThrow??!0)&&lS()}function LD(e){return Vf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function ID(e){const{select:n,...t}=e;return Vf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function $D(e){return Vf({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function BD(e){return Vf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Vm(e){const n=Oi();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function bS(e){return Vf({...e,select:n=>e.select?e.select(n.context):n.context})}function dw(e){const n=T.useRef(e);return Zu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function MQ(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function OQ(e,n,t){if(e!=null&&e.external)return Uv(e.href,t)?void 0:e.href;if(!FQ(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),Uv(n,t)?void 0:n}catch{}}function DQ(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!AW(e.pathname,n.pathname,r))return!1}else{const a=Vv(e.pathname,r),o=Vv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!Zu(e.search,n.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===n.hash:!0}function LQ(e,n){const t=Oi(),r=fW(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:_,replace:p,startTransition:m,resetScroll:w,viewTransition:k,children:v,target:y,disabled:x,style:b,className:C,onClick:N,onBlur:z,onFocus:A,onMouseEnter:j,onMouseLeave:M,onTouchStart:D,ignoreBlocker:L,params:B,search:U,hash:H,state:Q,mask:K,reloadDocument:Z,unsafeRelative:ee,from:$,_fromLocation:I,...F}=e,q=TD(),V=dw(e.search),ie=dw(e.params),oe=dw(a),ce=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,V,ie,e.state,e.mask,e.unsafeRelative]),ne=T.useCallback($e=>{const ot=t.buildLocation({_fromLocation:$e,...ce}),Ce=PQ(ot.maskedLocation?ot.maskedLocation.publicHref:ot.publicHref,ot.maskedLocation?ot.maskedLocation.external:ot.external,t.history,x),me=OQ(Ce,o,t.protocolAllowlist);return[Ce==null?void 0:Ce.href,me,DQ($e,ot,oe,t.basepath,q,me!==void 0)]},[oe,x,q,ce,t,o]),[G,ae,le]=Oc(t.stores.location,ne,MQ),ge=le?Dh(s,{})??IQ:hw,be=le?hw:Dh(i,{})??hw,Ee=[C,ge.className,be.className].filter(Boolean).join(" "),Fe=(b||ge.style||be.style)&&{...b,...ge.style,...be.style},Ye=T.useRef(!1),Me=e.reloadDocument||ae||x?!1:c??t.options.defaultPreload,Ue=u??t.options.defaultPreloadDelay??0,dt=T.useCallback(()=>{t.preloadRoute(ce).catch($e=>{console.warn($e),console.warn(pQ)})},[t,ce]),wt=T.useCallback($e=>{if(!$e){pw(r);return}if(!($e.isIntersecting??Me==="intent")){$e.isIntersecting===!1&&pw(r);return}if(!Ue){dt();return}T0.has(r)||T0.set(r,setTimeout(()=>{T0.delete(r),dt()},Ue))},[dt,r,Me,Ue]);_W(r,wt,Me!=="viewport"),T.useEffect(()=>{Ye.current||Me==="render"&&(dt(),Ye.current=!0)},[dt,Me]);const Ft=$e=>{const ot=$e.currentTarget.getAttribute("target"),Ce=y!==void 0?y:ot;!x&&!($e.metaKey||$e.altKey||$e.ctrlKey||$e.shiftKey)&&!$e.defaultPrevented&&(!Ce||Ce==="_self")&&$e.button===0&&($e.preventDefault(),t.navigate({...ce,replace:p,resetScroll:w,hashScrollIntoView:_,startTransition:m,viewTransition:k,ignoreBlocker:L}))};if(ae)return{...F,ref:r,href:ae,...v&&{children:v},...y&&{target:y},...x&&{disabled:x},...b&&{style:b},...C&&{className:C},...N&&{onClick:N},...z&&{onBlur:z},...A&&{onFocus:A},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const Ht=()=>{Me==="intent"&&dt()},qt=()=>{Me==="intent"&&pw(r)};return{...F,...ge,...be,href:G,ref:r,onClick:Ld([N,Ft]),onBlur:Ld([z,qt]),onFocus:Ld([A,wt]),onMouseEnter:Ld([j,wt]),onMouseLeave:Ld([M,qt]),onTouchStart:Ld([D,Ht]),disabled:!!x,target:y,...Fe&&{style:Fe},...Ee&&{className:Ee},...x&&$Q,...le&&BQ}}var hw={},IQ={className:"active"},$Q={role:"link","aria-disabled":!0},BQ={"data-status":"active","aria-current":"page"},T0=new WeakMap,pw=e=>{clearTimeout(T0.get(e)),T0.delete(e)},Ld=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function PQ(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function FQ(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var ny=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=LQ(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...c}=i;return T.createElement("a",c,a)}return T.createElement(t,i,a)}),HQ=class extends AD{constructor(n){super(n),this.useMatch=t=>Vf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>bS({...t,from:this.id}),this.useSearch=t=>BD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>$D({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>ID({...t,from:this.id}),this.useLoaderData=t=>LD({...t,from:this.id}),this.useNavigate=()=>Vm({from:this.fullPath}),this.Link=rt.forwardRef((t,r)=>f.jsx(ny,{ref:r,from:this.fullPath,...t}))}};function qQ(e){return new HQ(e)}function UQ(){return e=>VQ(e)}var GQ=class extends mQ{constructor(e){super(e),this.useMatch=n=>Vf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>bS({...n,from:this.id}),this.useSearch=n=>BD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>$D({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>ID({...n,from:this.id}),this.useLoaderData=n=>LD({...n,from:this.id}),this.useNavigate=()=>Vm({from:this.fullPath}),this.Link=rt.forwardRef((n,t)=>f.jsx(ny,{ref:t,from:this.fullPath,...n}))}};function VQ(e){return new GQ(e)}function Fc(e){return n=>{const t=qQ(n);return t.isRoot=!1,t}}function KQ(e){const n=Oi(),t=`not-found-${Oc(n.stores.location,r=>r.pathname)}-${Oc(n.stores.status,r=>r)}`;return f.jsx(gS,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Lh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Lh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function WQ(){return f.jsx("p",{children:"Not Found"})}function Gd(e){return f.jsx(f.Fragment,{children:e.children})}function PD(e,n,t){return n.options.notFoundComponent?f.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?f.jsx(e.options.defaultNotFoundComponent,{...t}):f.jsx(WQ,{})}function ry(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?f.jsx(t,{}):null}var QQ=(e,n)=>e[0]===n[0]&&e[1]===n[1],FD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,HD=T.memo(function({routeId:n}){const t=Oi();return f.jsx(XQ,{router:t,match:Oc(t.stores.getMatchStore(n),r=>r)})});function XQ({router:e,match:n}){var _,p;const t=e.routesById[n.routeId],r=ry(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((_=e.options.notFoundRoute)==null?void 0:_.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",c=FD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:Gd,u=s?gS:Gd,d=a?KQ:Gd;return f.jsxs(t.isRoot?t.options.shellComponent??Gd:Gd,{children:[f.jsx(ty.Provider,{value:n.routeId,children:f.jsx(c,{fallback:r,children:f.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,w)=>{if(Lh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,w)},children:f.jsx(d,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?f.jsx(vQ,{fallback:r,children:f.jsx(oN,{match:n})}):f.jsx(oN,{match:n})})})})}),null]})}var oN=T.memo(function({match:n}){const t=Oi(),r=n.routeId,s=t.routesById[r],i=T.useMemo(()=>{var c;const o=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({routeId:r,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return o?JSON.stringify(o):void 0},[r,n.loaderDeps,n._strictParams,n._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?f.jsx(o,{},i):f.jsx(Q0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!FD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return ry(t,s)}if(n.status==="notFound")return PD(t,s,n.error);if(n.status==="error")throw n.error;return a}),Q0=T.memo(function(){const n=Oi(),t=T.useContext(ty);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Oc(o,c=>[!!c._notFound,c.error],QQ),i=Oc(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return PD(n,n.routesById[t],s);if(!i)return null;const a=f.jsx(HD,{routeId:i});return t===ah?f.jsx(T.Suspense,{fallback:ry(n),children:a}):a});function qD(e,n){const t=e[1];e.length=0,t==null||t(n)}function YQ({t:e}){const n=Oi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{qD(t,!1),t.push(s,i),e(n),T.startTransition(r)}),fD(()=>{const r=n.history.subscribe(n.load);n.updateLatestLocation();const s=n.latestLocation,i=n.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Rl(s.publicHref)!==Rl(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),r;const a=n.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(n.stores.matches.get(),o=>{o&&n.emit({type:"onRendered",...Jb(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function ZQ(){const e=Oi(),n=e.routesById[ah],t=ry(e,n),r=e.ssr?Gd:T.Suspense,s=f.jsxs(f.Fragment,{children:[f.jsx(YQ,{t:T.useState()[1]}),f.jsx(r,{fallback:t,children:f.jsx(JQ,{})})]});return e.options.InnerWrap?f.jsx(e.options.InnerWrap,{children:s}):s}function JQ(){const e=Oi(),n=e._rendered,t=Oc(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;fD(()=>{n[0]===t&&qD(n,!0)},[n,t]);const i=s?f.jsx(HD,{routeId:s}):null;return f.jsx(ty.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:f.jsx(gS,{getResetKey:()=>r,onCatch:void 0,children:i})})}var eX=e=>({createMutableStore:tN,createReadonlyStore:tN,batch:CQ}),tX=e=>new nX(e),nX=class extends nQ{constructor(e){super(e,eX)}};function rX({router:e,children:n,...t}){hD(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=f.jsx(RD.Provider,{value:e,children:n});return e.options.Wrap?f.jsx(e.options.Wrap,{children:r}):r}function sX({router:e,...n}){return f.jsx(rX,{router:e,...n,children:f.jsx(ZQ,{})})}function iX(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function aX(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=iX(e),a=Oi(),{history:o}=a,[c,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const d=async _=>{function p(y){const x=a.parseLocation(y),[,b,C]=a.getMatchedRoutes(x.pathname);return C===void 0?{routeId:"__notFound__",fullPath:x.pathname,pathname:x.pathname,params:b,search:a.options.parseSearch(y.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:x.pathname,params:b,search:a.options.parseSearch(y.search)}}const m=p(_.currentLocation),w=p(_.nextLocation);if(m.routeId==="__notFound__"&&w.routeId!=="__notFound__")return!1;const k=await t({action:_.action,current:m,next:w});if(!i)return k;if(!k)return!1;const v=await new Promise(y=>{u({status:"blocked",current:m,next:w,action:_.action,proceed:()=>y(!1),reset:()=>y(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:d,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function UD(e){const n=Oi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Oc(t.stores.__store,vS(e,t))}function oX(e){const n=Oi();return Oc(n.stores.location,vS(e,n))}const Xv=new WeakMap,bv=new WeakMap;function _o(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))Xv.set(s,(Xv.get(s)??0)+1),(r=bv.get(s))==null||r.add(t)}function Km(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(c=>[c.id,c])),i=new Set(e.map(c=>c.id)),a=n.filter(c=>t.has(c.id)&&!i.has(c.id)),o=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return r?[...a,...o]:[...o,...a]}async function tp(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?Xv.get(s):void 0,a=await t();if(!s||Xv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,c=>c??a);const o=new Set;bv.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{bv.get(s)===o&&bv.delete(s)}}const Ih=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function GD(e){const n=e.queryKey[2];if(n==="resolvedFile")return Ih(e.queryKey[7]);const t=n==="getProjectFile"?e.queryKey[5]:n==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&Ih(t.ref)}function Sa(e,n=go(),t,r=!1){if(!Un(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!GD(i)&&(!t||t(i))};r?Ze.cancelQueries(s).then(()=>{Un(n)&&Ze.invalidateQueries(s)}):Ze.invalidateQueries(s)}const VD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],yS=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],cX=["listProjects","listProjectActivity","listSidebarChatSessions","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...yS,...VD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function lX(e,n=go(),t=!1){const r=Ze.getQueryData([...n,"listChatSessions",e])??[],s=Ze.getQueryData([...n,"listRuns",e])??[],i=Ze.getQueryData([...n,"listExperiments",e])??[];Sa([...VD,...yS,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(c=>c.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(c=>c.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function sy(e){const n=go();Ac.add(e),_o(Ze,[...n,"listChatSessions"],e),Ze.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])cS({queryKey:[...n,t,e]})}function uX(e){const n=go(),t=Ze.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])sy(r.id);cS({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const _X={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function fX(e,n){var a;if(!Un(n))return;const t=(o,c=n,u)=>Sa(o,c,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t(_X[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],n);return}if(r==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],n);return}if(r==="/api/latex-templates"){t(["listLatexTemplates"],n);return}if(r==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],n);return}if(r.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],n);return}if(r.startsWith("/api/remote/")||r.startsWith("/_orx/")){t(["listRemoteSessions"],n),Ze.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){t(["listSidebarChatSessions"],n),r==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],n);return}const i=/^\/api\/projects\/([^/]+)(.*)$/.exec(r);if(i){const[,o,c]=i;if(c.startsWith("/file")){lX(o,n,!0);return}t(["listProjects","listProjectActivity","listSidebarChatSessions"],n),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],n,u=>u.queryKey[3]===o);return}(r==="/api/projects"||r==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],n)}const dX={},hX="en",xS=["en","zh-CN","fa","ar","es","hi"],KD="orx:locale",wS=["localStorage","preferredLanguage","baseLocale"],cN=[],X0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let lN=!1,E=()=>{var t;let e=wS;!X0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=XD(window.location.href));const n=pX(e);if(n)return lN||(lN=!0,WD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function pX(e,n){let t;for(const r of e){if(r==="baseLocale")t=hX;else if(r==="preferredLanguage"&&!X0)t=yX();else if(r==="localStorage"&&!X0)t=localStorage.getItem(KD)??void 0;else if(YD(r)&&Yv.has(r)){const i=Yv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return vX(a)}}const s=Y0(t);if(s)return s}}const mX=e=>{window.location.reload()};let WD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=wS;!X0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=XD(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(KD,e);else if(YD(c)&&Yv.has(c)){const u=Yv.get(c);if(u){let d=u.setLocale(e);d instanceof Promise&&(d=d.catch(_=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:_})}),s.push(d))}}}const a=()=>{!X0&&t.reload&&window.location&&e!==r&&mX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},gX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function Y0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of xS)if(t.toLowerCase()===n)return t}function QD(e){return!!e&&xS.some(n=>n===e)}function vX(e){const n=Y0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${xS.join(", ")}`)}function bX(e,n){return e.exec(n.href)}function yX(){var n;if(!((n=navigator==null?void 0:navigator.languages)!=null&&n.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const r=Y0(t.fullTag);if(r)return r;const s=Y0(t.baseTag);if(s)return s}}function xX(e){return wX(e)}function wX(e){const n=typeof e=="string"?new URL(e,gX()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&Y0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let uN,_N;function kX(e){if(cN.length===0)return;const n=typeof e=="string"?e:e.href;if(uN===n)return _N;const t=new URL(n,"http://example.com"),r=xX(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of cN){const c=new dX(o.match,a.href);if(bX(c,a)){i=o;break}}if(i)break}return uN=n,_N=i,i}function XD(e){const n=kX(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:wS}const Yv=new Map;function YD(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const SX=e=>`Actions for ${e==null?void 0:e.name}`,CX=e=>`${e==null?void 0:e.name} 的操作`,EX=e=>`عملیات ${e==null?void 0:e.name}`,NX=e=>`إجراءات ${e==null?void 0:e.name}`,zX=e=>`Acciones para ${e==null?void 0:e.name}`,jX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,AX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CX(e):t==="fa"?EX(e):t==="ar"?NX(e):t==="es"?zX(e):t==="hi"?jX(e):SX(e)}),TX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,RX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,MX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,OX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,DX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,LX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,IX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RX(e):t==="fa"?MX(e):t==="ar"?OX(e):t==="es"?DX(e):t==="hi"?LX(e):TX(e)}),$X=e=>`Branch: ${e==null?void 0:e.branch}`,BX=e=>`分支:${e==null?void 0:e.branch}`,PX=e=>`شاخه: ${e==null?void 0:e.branch}`,FX=e=>`الفرع: ${e==null?void 0:e.branch}`,HX=e=>`Rama: ${e==null?void 0:e.branch}`,qX=e=>`ब्रांच: ${e==null?void 0:e.branch}`,UX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BX(e):t==="fa"?PX(e):t==="ar"?FX(e):t==="es"?HX(e):t==="hi"?qX(e):$X(e)}),GX=e=>`Browse code on ${e==null?void 0:e.branch}`,VX=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,KX=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,WX=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,QX=e=>`Explorar el código en ${e==null?void 0:e.branch}`,XX=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,ZD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VX(e):t==="fa"?KX(e):t==="ar"?WX(e):t==="es"?QX(e):t==="hi"?XX(e):GX(e)}),YX=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,ZX=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,JX=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,eY=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,tY=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,nY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,rY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZX(e):t==="fa"?JX(e):t==="ar"?eY(e):t==="es"?tY(e):t==="hi"?nY(e):YX(e)}),sY=e=>`Collapse ${e==null?void 0:e.name}`,iY=e=>`折叠 ${e==null?void 0:e.name}`,aY=e=>`بستن ${e==null?void 0:e.name}`,oY=e=>`طيّ ${e==null?void 0:e.name}`,cY=e=>`Contraer ${e==null?void 0:e.name}`,lY=e=>`${e==null?void 0:e.name} समेटें`,uY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iY(e):t==="fa"?aY(e):t==="ar"?oY(e):t==="es"?cY(e):t==="hi"?lY(e):sY(e)}),_Y=e=>`Committed changes versus ${e==null?void 0:e.parent}`,fY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,dY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,hY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,pY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,mY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,gY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fY(e):t==="fa"?dY(e):t==="ar"?hY(e):t==="es"?pY(e):t==="hi"?mY(e):_Y(e)}),vY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,bY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,yY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,xY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,wY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,kY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,SY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bY(e):t==="fa"?yY(e):t==="ar"?xY(e):t==="es"?wY(e):t==="hi"?kY(e):vY(e)}),CY=e=>`Copy ${e==null?void 0:e.value}`,EY=e=>`复制 ${e==null?void 0:e.value}`,NY=e=>`کپی ${e==null?void 0:e.value}`,zY=e=>`نسخ ${e==null?void 0:e.value}`,jY=e=>`Copiar ${e==null?void 0:e.value}`,AY=e=>`${e==null?void 0:e.value} कॉपी करें`,TY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EY(e):t==="fa"?NY(e):t==="ar"?zY(e):t==="es"?jY(e):t==="hi"?AY(e):CY(e)}),RY=e=>`Delete ${e==null?void 0:e.name}`,MY=e=>`删除 ${e==null?void 0:e.name}`,OY=e=>`حذف ${e==null?void 0:e.name}`,DY=e=>`حذف ${e==null?void 0:e.name}`,LY=e=>`Eliminar ${e==null?void 0:e.name}`,IY=e=>`${e==null?void 0:e.name} हटाएं`,fN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MY(e):t==="fa"?OY(e):t==="ar"?DY(e):t==="es"?LY(e):t==="hi"?IY(e):RY(e)}),$Y=e=>`Download ${e==null?void 0:e.name}`,BY=e=>`下载 ${e==null?void 0:e.name}`,PY=e=>`بارگیری ${e==null?void 0:e.name}`,FY=e=>`تنزيل ${e==null?void 0:e.name}`,HY=e=>`Descargar ${e==null?void 0:e.name}`,qY=e=>`${e==null?void 0:e.name} डाउनलोड करें`,Zv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BY(e):t==="fa"?PY(e):t==="ar"?FY(e):t==="es"?HY(e):t==="hi"?qY(e):$Y(e)}),UY=e=>`Expand ${e==null?void 0:e.name}`,GY=e=>`展开 ${e==null?void 0:e.name}`,VY=e=>`باز کردن ${e==null?void 0:e.name}`,KY=e=>`توسيع ${e==null?void 0:e.name}`,WY=e=>`Expandir ${e==null?void 0:e.name}`,QY=e=>`${e==null?void 0:e.name} फैलाएं`,XY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GY(e):t==="fa"?VY(e):t==="ar"?KY(e):t==="es"?WY(e):t==="hi"?QY(e):UY(e)}),YY=e=>`Hide additional ${e==null?void 0:e.target}`,ZY=e=>`隐藏其余${e==null?void 0:e.target}`,JY=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,eZ=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,tZ=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,nZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,rZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZY(e):t==="fa"?JY(e):t==="ar"?eZ(e):t==="es"?tZ(e):t==="hi"?nZ(e):YY(e)}),sZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,iZ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,aZ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,oZ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,cZ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,lZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,uZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iZ(e):t==="fa"?aZ(e):t==="ar"?oZ(e):t==="es"?cZ(e):t==="hi"?lZ(e):sZ(e)}),_Z=e=>`${e==null?void 0:e.count} consecutive identical calls`,fZ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,dZ=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,hZ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,pZ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,mZ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,gZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fZ(e):t==="fa"?dZ(e):t==="ar"?hZ(e):t==="es"?pZ(e):t==="hi"?mZ(e):_Z(e)}),vZ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,bZ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,yZ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,xZ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,wZ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,kZ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,SZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bZ(e):t==="fa"?yZ(e):t==="ar"?xZ(e):t==="es"?wZ(e):t==="hi"?kZ(e):vZ(e)}),CZ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,EZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,NZ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,zZ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,jZ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,AZ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,JD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EZ(e):t==="fa"?NZ(e):t==="ar"?zZ(e):t==="es"?jZ(e):t==="hi"?AZ(e):CZ(e)}),TZ=e=>`Open experiment ${e==null?void 0:e.name}`,RZ=e=>`打开实验 ${e==null?void 0:e.name}`,MZ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,OZ=e=>`فتح التجربة ${e==null?void 0:e.name}`,DZ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,LZ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,IZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RZ(e):t==="fa"?MZ(e):t==="ar"?OZ(e):t==="es"?DZ(e):t==="hi"?LZ(e):TZ(e)}),$Z=e=>`Open ${e==null?void 0:e.path} in the right pane`,BZ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,PZ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,FZ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,HZ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,qZ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,UZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BZ(e):t==="fa"?PZ(e):t==="ar"?FZ(e):t==="es"?HZ(e):t==="hi"?qZ(e):$Z(e)}),GZ=e=>`Open logs for run ${e==null?void 0:e.run}`,VZ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,KZ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,WZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,QZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,XZ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,YZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VZ(e):t==="fa"?KZ(e):t==="ar"?WZ(e):t==="es"?QZ(e):t==="hi"?XZ(e):GZ(e)}),ZZ=e=>`Open ${e==null?void 0:e.name} on GitHub`,JZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,eJ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,tJ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,nJ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,rJ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,M3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JZ(e):t==="fa"?eJ(e):t==="ar"?tJ(e):t==="es"?nJ(e):t==="hi"?rJ(e):ZZ(e)}),sJ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,iJ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,aJ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,oJ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,cJ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,lJ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,uJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iJ(e):t==="fa"?aJ(e):t==="ar"?oJ(e):t==="es"?cJ(e):t==="hi"?lJ(e):sJ(e)}),_J=e=>`Overleaf — ${e==null?void 0:e.status}`,fJ=e=>`Overleaf — ${e==null?void 0:e.status}`,dJ=e=>`Overleaf — ${e==null?void 0:e.status}`,hJ=e=>`Overleaf — ${e==null?void 0:e.status}`,pJ=e=>`Overleaf — ${e==null?void 0:e.status}`,mJ=e=>`Overleaf — ${e==null?void 0:e.status}`,gJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fJ(e):t==="fa"?dJ(e):t==="ar"?hJ(e):t==="es"?pJ(e):t==="hi"?mJ(e):_J(e)}),vJ=e=>`Preview /${e==null?void 0:e.name} skill`,bJ=e=>`预览 /${e==null?void 0:e.name} 技能`,yJ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,xJ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,wJ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,kJ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,SJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bJ(e):t==="fa"?yJ(e):t==="ar"?xJ(e):t==="es"?wJ(e):t==="hi"?kJ(e):vJ(e)}),CJ=e=>`Remove annotation ${e==null?void 0:e.number}`,EJ=e=>`移除批注 ${e==null?void 0:e.number}`,NJ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,zJ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,jJ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,AJ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,TJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EJ(e):t==="fa"?NJ(e):t==="ar"?zJ(e):t==="es"?jJ(e):t==="hi"?AJ(e):CJ(e)}),RJ=e=>`Remove ${e==null?void 0:e.name}`,MJ=e=>`移除 ${e==null?void 0:e.name}`,OJ=e=>`حذف ${e==null?void 0:e.name}`,DJ=e=>`إزالة ${e==null?void 0:e.name}`,LJ=e=>`Quitar ${e==null?void 0:e.name}`,IJ=e=>`${e==null?void 0:e.name} हटाएं`,$J=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MJ(e):t==="fa"?OJ(e):t==="ar"?DJ(e):t==="es"?LJ(e):t==="hi"?IJ(e):RJ(e)}),BJ=e=>`Remove queued message: ${e==null?void 0:e.text}`,PJ=e=>`移除排队消息:${e==null?void 0:e.text}`,FJ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,HJ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,qJ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,UJ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,GJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PJ(e):t==="fa"?FJ(e):t==="ar"?HJ(e):t==="es"?qJ(e):t==="hi"?UJ(e):BJ(e)}),VJ=e=>`Retry queued message: ${e==null?void 0:e.text}`,KJ=e=>`重试排队消息:${e==null?void 0:e.text}`,WJ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,QJ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,XJ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,YJ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,ZJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KJ(e):t==="fa"?WJ(e):t==="ar"?QJ(e):t==="es"?XJ(e):t==="hi"?YJ(e):VJ(e)}),JJ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,eee=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,tee=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,nee=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,ree=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,see=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,dN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eee(e):t==="fa"?tee(e):t==="ar"?nee(e):t==="es"?ree(e):t==="hi"?see(e):JJ(e)}),iee=e=>`Run ${e==null?void 0:e.id}`,aee=e=>`运行 ${e==null?void 0:e.id}`,oee=e=>`اجرای ${e==null?void 0:e.id}`,cee=e=>`تشغيل ${e==null?void 0:e.id}`,lee=e=>`Ejecución ${e==null?void 0:e.id}`,uee=e=>`रन ${e==null?void 0:e.id}`,_ee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aee(e):t==="fa"?oee(e):t==="ar"?cee(e):t==="es"?lee(e):t==="hi"?uee(e):iee(e)}),fee=e=>`Show error details for ${e==null?void 0:e.activity}`,dee=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,hee=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,pee=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,mee=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,gee=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,vee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dee(e):t==="fa"?hee(e):t==="ar"?pee(e):t==="es"?mee(e):t==="hi"?gee(e):fee(e)}),bee=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,yee=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,xee=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,wee=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,kee=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,See=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,Cee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yee(e):t==="fa"?xee(e):t==="ar"?wee(e):t==="es"?kee(e):t==="hi"?See(e):bee(e)}),Eee=e=>`${e==null?void 0:e.name} skill`,Nee=e=>`${e==null?void 0:e.name} 技能`,zee=e=>`مهارت ${e==null?void 0:e.name}`,jee=e=>`مهارة ${e==null?void 0:e.name}`,Aee=e=>`Skill ${e==null?void 0:e.name}`,Tee=e=>`${e==null?void 0:e.name} स्किल`,Ree=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nee(e):t==="fa"?zee(e):t==="ar"?jee(e):t==="es"?Aee(e):t==="hi"?Tee(e):Eee(e)}),Mee=e=>`Value for ${e==null?void 0:e.name}`,Oee=e=>`${e==null?void 0:e.name} 的值`,Dee=e=>`مقدار ${e==null?void 0:e.name}`,Lee=e=>`قيمة ${e==null?void 0:e.name}`,Iee=e=>`Valor de ${e==null?void 0:e.name}`,$ee=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Bee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oee(e):t==="fa"?Dee(e):t==="ar"?Lee(e):t==="es"?Iee(e):t==="hi"?$ee(e):Mee(e)}),Pee=()=>"Agent reported back",Fee=()=>"智能体已返回结果",Hee=()=>"عامل نتیجه را گزارش کرد",qee=()=>"أبلغ الوكيل بالنتيجة",Uee=()=>"El agente informó de los resultados",Gee=()=>"एजेंट ने रिपोर्ट भेजी",Vee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fee():t==="fa"?Hee():t==="ar"?qee():t==="es"?Uee():t==="hi"?Gee():Pee()}),Kee=()=>"Browse",Wee=()=>"浏览",Qee=()=>"مرور",Xee=()=>"تصفّح",Yee=()=>"Navegar",Zee=()=>"ब्राउज़ करें",Jee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wee():t==="fa"?Qee():t==="ar"?Xee():t==="es"?Yee():t==="hi"?Zee():Kee()}),ete=()=>"Browsing…",tte=()=>"正在浏览…",nte=()=>"در حال مرور…",rte=()=>"جارٍ التصفّح…",ste=()=>"Navegando…",ite=()=>"ब्राउज़ कर रहा है…",ate=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tte():t==="fa"?nte():t==="ar"?rte():t==="es"?ste():t==="hi"?ite():ete()}),ote=()=>"Checked experiment status and updated notes",cte=()=>"已检查实验状态并更新笔记",lte=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",ute=()=>"فحص حالة التجربة وحدّث الملاحظات",_te=()=>"Consultó el estado del experimento y actualizó las notas",fte=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",dte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cte():t==="fa"?lte():t==="ar"?ute():t==="es"?_te():t==="hi"?fte():ote()}),hte=()=>"Closed an agent",pte=()=>"已关闭智能体",mte=()=>"عامل بسته شد",gte=()=>"أغلق وكيلًا",vte=()=>"Cerró un agente",bte=()=>"एक एजेंट बंद किया",yte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pte():t==="fa"?mte():t==="ar"?gte():t==="es"?vte():t==="hi"?bte():hte()}),xte=()=>"Context compacted",wte=()=>"上下文已压缩",kte=()=>"زمینه فشرده شد",Ste=()=>"تم ضغط السياق",Cte=()=>"Contexto comprimido",Ete=()=>"कॉन्टेक्स्ट छोटा किया गया",Nte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wte():t==="fa"?kte():t==="ar"?Ste():t==="es"?Cte():t==="hi"?Ete():xte()}),zte=()=>"Compacting conversation…",jte=()=>"正在压缩对话…",Ate=()=>"در حال فشرده‌سازی گفت‌وگو…",Tte=()=>"جارٍ ضغط المحادثة…",Rte=()=>"Comprimiendo la conversación…",Mte=()=>"बातचीत छोटी की जा रही है…",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jte():t==="fa"?Ate():t==="ar"?Tte():t==="es"?Rte():t==="hi"?Mte():zte()}),Ote=()=>"Compacting failed",Dte=()=>"压缩失败",Lte=()=>"فشرده‌سازی ناموفق بود",Ite=()=>"فشل الضغط",$te=()=>"Error al comprimir",Bte=()=>"छोटा करना विफल",Pte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dte():t==="fa"?Lte():t==="ar"?Ite():t==="es"?$te():t==="hi"?Bte():Ote()}),Fte=e=>`Created ${e==null?void 0:e.target}`,Hte=e=>`已创建 ${e==null?void 0:e.target}`,qte=e=>`${e==null?void 0:e.target} ایجاد شد`,Ute=e=>`أنشأ ${e==null?void 0:e.target}`,Gte=e=>`Creó ${e==null?void 0:e.target}`,Vte=e=>`${e==null?void 0:e.target} बनाया`,Kte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hte(e):t==="fa"?qte(e):t==="ar"?Ute(e):t==="es"?Gte(e):t==="hi"?Vte(e):Fte(e)}),Wte=()=>"Delegate",Qte=()=>"委派",Xte=()=>"واگذاری",Yte=()=>"تفويض",Zte=()=>"Delegar",Jte=()=>"सौंपें",ene=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qte():t==="fa"?Xte():t==="ar"?Yte():t==="es"?Zte():t==="hi"?Jte():Wte()}),tne=()=>"Delegating…",nne=()=>"正在委派…",rne=()=>"در حال واگذاری…",sne=()=>"جارٍ التفويض…",ine=()=>"Delegando…",ane=()=>"सौंप रहा है…",one=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nne():t==="fa"?rne():t==="ar"?sne():t==="es"?ine():t==="hi"?ane():tne()}),cne=e=>`Deleted ${e==null?void 0:e.target}`,lne=e=>`已删除 ${e==null?void 0:e.target}`,une=e=>`${e==null?void 0:e.target} حذف شد`,_ne=e=>`حذف ${e==null?void 0:e.target}`,fne=e=>`Eliminó ${e==null?void 0:e.target}`,dne=e=>`${e==null?void 0:e.target} हटाया`,hne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lne(e):t==="fa"?une(e):t==="ar"?_ne(e):t==="es"?fne(e):t==="hi"?dne(e):cne(e)}),pne=()=>"Edit",mne=()=>"编辑",gne=()=>"ویرایش",vne=()=>"تعديل",bne=()=>"Editar",yne=()=>"संपादित करें",eL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mne():t==="fa"?gne():t==="ar"?vne():t==="es"?bne():t==="hi"?yne():pne()}),xne=e=>`Edited ${e==null?void 0:e.target}`,wne=e=>`已编辑 ${e==null?void 0:e.target}`,kne=e=>`${e==null?void 0:e.target} ویرایش شد`,Sne=e=>`عدّل ${e==null?void 0:e.target}`,Cne=e=>`Editó ${e==null?void 0:e.target}`,Ene=e=>`${e==null?void 0:e.target} संपादित किया`,Nne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wne(e):t==="fa"?kne(e):t==="ar"?Sne(e):t==="es"?Cne(e):t==="hi"?Ene(e):xne(e)}),zne=()=>"Editing…",jne=()=>"正在编辑…",Ane=()=>"در حال ویرایش…",Tne=()=>"جارٍ التعديل…",Rne=()=>"Editando…",Mne=()=>"संपादित कर रहा है…",One=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jne():t==="fa"?Ane():t==="ar"?Tne():t==="es"?Rne():t==="hi"?Mne():zne()}),Dne=e=>`${e==null?void 0:e.activity} for ${e==null?void 0:e.count} queries`,Lne=e=>`${e==null?void 0:e.activity},共 ${e==null?void 0:e.count} 个查询`,Ine=e=>`${e==null?void 0:e.activity} برای ${e==null?void 0:e.count} جستجو`,$ne=e=>`${e==null?void 0:e.activity} لـ ${e==null?void 0:e.count} استعلامات`,Bne=e=>`${e==null?void 0:e.activity} para ${e==null?void 0:e.count} consultas`,Pne=e=>`${e==null?void 0:e.activity}: ${e==null?void 0:e.count} क्वेरी`,Fne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lne(e):t==="fa"?Ine(e):t==="ar"?$ne(e):t==="es"?Bne(e):t==="hi"?Pne(e):Dne(e)}),Hne=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,qne=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Une=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,Gne=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Vne=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Kne=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,pN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qne(e):t==="fa"?Une(e):t==="ar"?Gne(e):t==="es"?Vne(e):t==="hi"?Kne(e):Hne(e)}),Wne=()=>"Imported from your terminal — new turns continue in the agent's own history",Qne=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Xne=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Yne=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Zne=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",Jne=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",ere=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qne():t==="fa"?Xne():t==="ar"?Yne():t==="es"?Zne():t==="hi"?Jne():Wne()}),tre=e=>`Listed files matching ${e==null?void 0:e.pattern}`,nre=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,rre=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,sre=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,ire=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,are=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,ore=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nre(e):t==="fa"?rre(e):t==="ar"?sre(e):t==="es"?ire(e):t==="hi"?are(e):tre(e)}),cre=()=>"Load",lre=()=>"加载",ure=()=>"بارگیری",_re=()=>"تحميل",fre=()=>"Cargar",dre=()=>"लोड करें",hre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lre():t==="fa"?ure():t==="ar"?_re():t==="es"?fre():t==="hi"?dre():cre()}),pre=()=>"Loaded a skill",mre=()=>"已加载技能",gre=()=>"یک مهارت بارگیری شد",vre=()=>"حمّل مهارة",bre=()=>"Cargó una skill",yre=()=>"एक स्किल लोड की",xre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mre():t==="fa"?gre():t==="ar"?vre():t==="es"?bre():t==="hi"?yre():pre()}),wre=e=>`Loaded ${e==null?void 0:e.name} skill`,kre=e=>`已加载技能 ${e==null?void 0:e.name}`,Sre=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Cre=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Ere=e=>`Cargó la skill ${e==null?void 0:e.name}`,Nre=e=>`${e==null?void 0:e.name} स्किल लोड की`,zre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kre(e):t==="fa"?Sre(e):t==="ar"?Cre(e):t==="es"?Ere(e):t==="hi"?Nre(e):wre(e)}),jre=()=>"Loading…",Are=()=>"正在加载…",Tre=()=>"در حال بارگیری…",Rre=()=>"جارٍ التحميل…",Mre=()=>"Cargando…",Ore=()=>"लोड हो रहा है…",Dre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Are():t==="fa"?Tre():t==="ar"?Rre():t==="es"?Mre():t==="hi"?Ore():jre()}),Lre=e=>`Opened ${e==null?void 0:e.target}`,Ire=e=>`已打开 ${e==null?void 0:e.target}`,$re=e=>`${e==null?void 0:e.target} باز شد`,Bre=e=>`فتح ${e==null?void 0:e.target}`,Pre=e=>`Abrió ${e==null?void 0:e.target}`,Fre=e=>`${e==null?void 0:e.target} खोला`,Hre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ire(e):t==="fa"?$re(e):t==="ar"?Bre(e):t==="es"?Pre(e):t==="hi"?Fre(e):Lre(e)}),qre=e=>`Ran ${e==null?void 0:e.command}`,Ure=e=>`已运行 ${e==null?void 0:e.command}`,Gre=e=>`${e==null?void 0:e.command} اجرا شد`,Vre=e=>`نفّذ ${e==null?void 0:e.command}`,Kre=e=>`Ejecutó ${e==null?void 0:e.command}`,Wre=e=>`${e==null?void 0:e.command} चलाया`,Qre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ure(e):t==="fa"?Gre(e):t==="ar"?Vre(e):t==="es"?Kre(e):t==="hi"?Wre(e):qre(e)}),Xre=()=>"Ran a sub-agent",Yre=()=>"已运行子智能体",Zre=()=>"یک عامل فرعی اجرا شد",Jre=()=>"شغّل وكيلًا فرعيًا",ese=()=>"Ejecutó un subagente",tse=()=>"एक सब-एजेंट चलाया",nse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yre():t==="fa"?Zre():t==="ar"?Jre():t==="es"?ese():t==="hi"?tse():Xre()}),rse=()=>"Read",sse=()=>"读取",ise=()=>"خواندن",ase=()=>"قراءة",ose=()=>"Leer",cse=()=>"पढ़ें",lse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sse():t==="fa"?ise():t==="ar"?ase():t==="es"?ose():t==="hi"?cse():rse()}),use=()=>"Read experiment notes",_se=()=>"已读取实验笔记",fse=()=>"یادداشت‌های آزمایش خوانده شد",dse=()=>"قرأ ملاحظات التجربة",hse=()=>"Leyó las notas del experimento",pse=()=>"प्रयोग के नोट्स पढ़े",mse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_se():t==="fa"?fse():t==="ar"?dse():t==="es"?hse():t==="hi"?pse():use()}),gse=()=>"Read a paper",vse=()=>"已读取论文",bse=()=>"یک مقاله خوانده شد",yse=()=>"قرأ ورقة",xse=()=>"Leyó un paper",wse=()=>"एक पेपर पढ़ा",kse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vse():t==="fa"?bse():t==="ar"?yse():t==="es"?xse():t==="hi"?wse():gse()}),Sse=e=>`Read ${e==null?void 0:e.name} skill`,Cse=e=>`已读取技能 ${e==null?void 0:e.name}`,Ese=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Nse=e=>`قرأ مهارة ${e==null?void 0:e.name}`,zse=e=>`Leyó la skill ${e==null?void 0:e.name}`,jse=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,mw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cse(e):t==="fa"?Ese(e):t==="ar"?Nse(e):t==="es"?zse(e):t==="hi"?jse(e):Sse(e)}),Ase=e=>`Read ${e==null?void 0:e.target}`,Tse=e=>`已读取 ${e==null?void 0:e.target}`,Rse=e=>`${e==null?void 0:e.target} خوانده شد`,Mse=e=>`قرأ ${e==null?void 0:e.target}`,Ose=e=>`Leyó ${e==null?void 0:e.target}`,Dse=e=>`${e==null?void 0:e.target} पढ़ा`,o0=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tse(e):t==="fa"?Rse(e):t==="ar"?Mse(e):t==="es"?Ose(e):t==="hi"?Dse(e):Ase(e)}),Lse=()=>"Read a web page",Ise=()=>"已读取网页",$se=()=>"یک صفحهٔ وب خوانده شد",Bse=()=>"قرأ صفحة ويب",Pse=()=>"Leyó una página web",Fse=()=>"एक वेब पेज पढ़ा",Hse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ise():t==="fa"?$se():t==="ar"?Bse():t==="es"?Pse():t==="hi"?Fse():Lse()}),qse=()=>"Reading…",Use=()=>"正在读取…",Gse=()=>"در حال خواندن…",Vse=()=>"جارٍ القراءة…",Kse=()=>"Leyendo…",Wse=()=>"पढ़ रहा है…",Qse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Use():t==="fa"?Gse():t==="ar"?Vse():t==="es"?Kse():t==="hi"?Wse():qse()}),Xse=()=>"Resumed an agent",Yse=()=>"已恢复智能体",Zse=()=>"عامل از سر گرفته شد",Jse=()=>"استأنف عمل وكيل",eie=()=>"Reanudó un agente",tie=()=>"एक एजेंट फिर से शुरू किया",nie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yse():t==="fa"?Zse():t==="ar"?Jse():t==="es"?eie():t==="hi"?tie():Xse()}),rie=()=>"Review",sie=()=>"查看",iie=()=>"بازبینی",aie=()=>"مراجعة",oie=()=>"Revisar",cie=()=>"समीक्षा करें",lie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sie():t==="fa"?iie():t==="ar"?aie():t==="es"?oie():t==="hi"?cie():rie()}),uie=()=>"Reviewed run log",_ie=()=>"已查看运行日志",fie=()=>"گزارش اجرا بازبینی شد",die=()=>"راجع سجل التشغيل",hie=()=>"Revisó el log de la ejecución",pie=()=>"रन लॉग की समीक्षा की",mie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ie():t==="fa"?fie():t==="ar"?die():t==="es"?hie():t==="hi"?pie():uie()}),gie=()=>"Reviewed run logs",vie=()=>"已查看运行日志",bie=()=>"گزارش‌های اجرا بازبینی شد",yie=()=>"راجع سجلات التشغيل",xie=()=>"Revisó los logs de las ejecuciones",wie=()=>"रन लॉग की समीक्षा की",kie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vie():t==="fa"?bie():t==="ar"?yie():t==="es"?xie():t==="hi"?wie():gie()}),Sie=()=>"Reviewed experiment status and notes",Cie=()=>"已查看实验状态和笔记",Eie=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Nie=()=>"راجع حالة التجربة وملاحظاتها",zie=()=>"Revisó el estado y las notas del experimento",jie=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Aie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cie():t==="fa"?Eie():t==="ar"?Nie():t==="es"?zie():t==="hi"?jie():Sie()}),Tie=()=>"Reviewing…",Rie=()=>"正在查看…",Mie=()=>"در حال بازبینی…",Oie=()=>"جارٍ المراجعة…",Die=()=>"Revisando…",Lie=()=>"समीक्षा कर रहा है…",Iie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rie():t==="fa"?Mie():t==="ar"?Oie():t==="es"?Die():t==="hi"?Lie():Tie()}),$ie=()=>"Run",Bie=()=>"运行",Pie=()=>"اجرا",Fie=()=>"تشغيل",Hie=()=>"Ejecutar",qie=()=>"चलाएं",Uie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bie():t==="fa"?Pie():t==="ar"?Fie():t==="es"?Hie():t==="hi"?qie():$ie()}),Gie=()=>"Running…",Vie=()=>"正在运行…",Kie=()=>"در حال اجرا…",Wie=()=>"جارٍ التشغيل…",Qie=()=>"Ejecutando…",Xie=()=>"चल रहा है…",tL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vie():t==="fa"?Kie():t==="ar"?Wie():t==="es"?Qie():t==="hi"?Xie():Gie()}),Yie=()=>"Search",Zie=()=>"搜索",Jie=()=>"جست‌وجو",eae=()=>"بحث",tae=()=>"Buscar",nae=()=>"खोजें",rae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?eae():t==="es"?tae():t==="hi"?nae():Yie()}),sae=()=>"Searched alphaXiv full text",iae=()=>"已搜索 alphaXiv 全文",aae=()=>"متن کامل alphaXiv جست‌وجو شد",oae=()=>"بحث في نص alphaXiv الكامل",cae=()=>"Buscó en el texto completo de alphaXiv",lae=()=>"alphaXiv का पूरा टेक्स्ट खोजा",uae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iae():t==="fa"?aae():t==="ar"?oae():t==="es"?cae():t==="hi"?lae():sae()}),_ae=()=>"Searched alphaXiv semantically",fae=()=>"已对 alphaXiv 进行语义搜索",dae=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",hae=()=>"أجرى بحثًا دلاليًا في alphaXiv",pae=()=>"Hizo una búsqueda semántica en alphaXiv",mae=()=>"alphaXiv को सिमेंटिक रूप से खोजा",gae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fae():t==="fa"?dae():t==="ar"?hae():t==="es"?pae():t==="hi"?mae():_ae()}),vae=()=>"Searched bioRxiv",bae=()=>"已搜索 bioRxiv",yae=()=>"bioRxiv جست‌وجو شد",xae=()=>"بحث في bioRxiv",wae=()=>"Buscó en bioRxiv",kae=()=>"bioRxiv खोजा",Sae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bae():t==="fa"?yae():t==="ar"?xae():t==="es"?wae():t==="hi"?kae():vae()}),Cae=()=>"Searched code",Eae=()=>"已搜索代码",Nae=()=>"کد جست‌وجو شد",zae=()=>"بحث في الشيفرة",jae=()=>"Buscó en el código",Aae=()=>"कोड खोजा",gw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eae():t==="fa"?Nae():t==="ar"?zae():t==="es"?jae():t==="hi"?Aae():Cae()}),Tae=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Rae=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Mae=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Oae=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Dae=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Lae=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,vw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rae(e):t==="fa"?Mae(e):t==="ar"?Oae(e):t==="es"?Dae(e):t==="hi"?Lae(e):Tae(e)}),Iae=e=>`Searched images for “${e==null?void 0:e.query}”`,$ae=e=>`已搜索图片“${e==null?void 0:e.query}”`,Bae=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,Pae=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Fae=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,Hae=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,qae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$ae(e):t==="fa"?Bae(e):t==="ar"?Pae(e):t==="es"?Fae(e):t==="hi"?Hae(e):Iae(e)}),Uae=()=>"Searched the literature",Gae=()=>"已搜索文献",Vae=()=>"منابع علمی جست‌وجو شد",Kae=()=>"بحث في الأدبيات",Wae=()=>"Buscó en la literatura",Qae=()=>"साहित्य खोजा",x1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gae():t==="fa"?Vae():t==="ar"?Kae():t==="es"?Wae():t==="hi"?Qae():Uae()}),Xae=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Yae=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Zae=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Jae=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,eoe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,toe=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,noe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yae(e):t==="fa"?Zae(e):t==="ar"?Jae(e):t==="es"?eoe(e):t==="hi"?toe(e):Xae(e)}),roe=()=>"Searched OpenAlex",soe=()=>"已搜索 OpenAlex",ioe=()=>"OpenAlex جست‌وجو شد",aoe=()=>"بحث في OpenAlex",ooe=()=>"Buscó en OpenAlex",coe=()=>"OpenAlex खोजा",loe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?soe():t==="fa"?ioe():t==="ar"?aoe():t==="es"?ooe():t==="hi"?coe():roe()}),uoe=()=>"Searched PubMed",_oe=()=>"已搜索 PubMed",foe=()=>"PubMed جست‌وجو شد",doe=()=>"بحث في PubMed",hoe=()=>"Buscó en PubMed",poe=()=>"PubMed खोजा",moe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_oe():t==="fa"?foe():t==="ar"?doe():t==="es"?hoe():t==="hi"?poe():uoe()}),goe=e=>`Searched the web for “${e==null?void 0:e.query}”`,voe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,boe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,yoe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,xoe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,woe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,mN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?voe(e):t==="fa"?boe(e):t==="ar"?yoe(e):t==="es"?xoe(e):t==="hi"?woe(e):goe(e)}),koe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Soe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Coe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Eoe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Noe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,zoe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,joe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Soe(e):t==="fa"?Coe(e):t==="ar"?Eoe(e):t==="es"?Noe(e):t==="hi"?zoe(e):koe(e)}),Aoe=()=>"Searching…",Toe=()=>"正在搜索…",Roe=()=>"در حال جست‌وجو…",Moe=()=>"جارٍ البحث…",Ooe=()=>"Buscando…",Doe=()=>"खोज रहा है…",Loe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Toe():t==="fa"?Roe():t==="ar"?Moe():t==="es"?Ooe():t==="hi"?Doe():Aoe()}),Ioe=()=>"Sent input to an agent",$oe=()=>"已向智能体发送输入",Boe=()=>"ورودی به عامل فرستاده شد",Poe=()=>"أرسل مدخلًا إلى وكيل",Foe=()=>"Envió información a un agente",Hoe=()=>"एक एजेंट को इनपुट भेजा",qoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$oe():t==="fa"?Boe():t==="ar"?Poe():t==="es"?Foe():t==="hi"?Hoe():Ioe()}),Uoe=()=>"Spawned an agent",Goe=()=>"已创建智能体",Voe=()=>"یک عامل ساخته شد",Koe=()=>"أنشأ وكيلًا",Woe=()=>"Creó un agente",Qoe=()=>"एक एजेंट शुरू किया",Xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Goe():t==="fa"?Voe():t==="ar"?Koe():t==="es"?Woe():t==="hi"?Qoe():Uoe()}),Yoe=()=>"Sub-agent",Zoe=()=>"子智能体",Joe=()=>"عامل فرعی",ece=()=>"وكيل فرعي",tce=()=>"Subagente",nce=()=>"सब-एजेंट",rce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zoe():t==="fa"?Joe():t==="ar"?ece():t==="es"?tce():t==="hi"?nce():Yoe()}),sce=()=>"Sub-agent interrupted",ice=()=>"子智能体已中断",ace=()=>"عامل فرعی متوقف شد",oce=()=>"قُوطع الوكيل الفرعي",cce=()=>"Subagente interrumpido",lce=()=>"सब-एजेंट बाधित हुआ",uce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ice():t==="fa"?ace():t==="ar"?oce():t==="es"?cce():t==="hi"?lce():sce()}),_ce=()=>"Sub-agent started",fce=()=>"子智能体已启动",dce=()=>"عامل فرعی آغاز شد",hce=()=>"بدأ الوكيل الفرعي",pce=()=>"Subagente iniciado",mce=()=>"सब-एजेंट शुरू हुआ",gce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fce():t==="fa"?dce():t==="ar"?hce():t==="es"?pce():t==="hi"?mce():_ce()}),vce=()=>"Updated experiment notes",bce=()=>"已更新实验笔记",yce=()=>"یادداشت‌های آزمایش به‌روز شد",xce=()=>"حدّث ملاحظات التجربة",wce=()=>"Actualizó las notas del experimento",kce=()=>"प्रयोग के नोट्स अपडेट किए",Sce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bce():t==="fa"?yce():t==="ar"?xce():t==="es"?wce():t==="hi"?kce():vce()}),Cce=()=>"Waiting on an agent",Ece=()=>"正在等待智能体",Nce=()=>"در انتظار عامل",zce=()=>"في انتظار وكيل",jce=()=>"Esperando a un agente",Ace=()=>"एजेंट का इंतज़ार है",Tce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ece():t==="fa"?Nce():t==="ar"?zce():t==="es"?jce():t==="hi"?Ace():Cce()}),Rce=e=>`Approval required: ${e==null?void 0:e.label}`,Mce=e=>`需要批准:${e==null?void 0:e.label}`,Oce=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Dce=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Lce=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Ice=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,gN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mce(e):t==="fa"?Oce(e):t==="ar"?Dce(e):t==="es"?Lce(e):t==="hi"?Ice(e):Rce(e)}),$ce=()=>"The CLI is retrying the turn.",Bce=()=>"CLI 正在重试本轮。",Pce=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Fce=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Hce=()=>"La CLI está reintentando el turno.",qce=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Uce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bce():t==="fa"?Pce():t==="ar"?Fce():t==="es"?Hce():t==="hi"?qce():$ce()}),Gce=()=>"Continue is available.",Vce=()=>"可以继续。",Kce=()=>"ادامه در دسترس است.",Wce=()=>"المتابعة متاحة.",Qce=()=>"Puedes continuar.",Xce=()=>"जारी रखना उपलब्ध है।",Yce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vce():t==="fa"?Kce():t==="ar"?Wce():t==="es"?Qce():t==="hi"?Xce():Gce()}),Zce=()=>"Retry is available.",Jce=()=>"可以重试。",ele=()=>"تلاش دوباره در دسترس است.",tle=()=>"إعادة المحاولة متاحة.",nle=()=>"Puedes reintentarlo.",rle=()=>"फिर से कोशिश करना उपलब्ध है।",sle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jce():t==="fa"?ele():t==="ar"?tle():t==="es"?nle():t==="hi"?rle():Zce()}),ile=()=>"Running a tool",ale=()=>"正在运行工具",ole=()=>"در حال اجرای ابزار",cle=()=>"جارٍ تشغيل أداة",lle=()=>"Ejecutando una herramienta",ule=()=>"एक टूल चल रहा है",_le=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ale():t==="fa"?ole():t==="ar"?cle():t==="es"?lle():t==="hi"?ule():ile()}),fle=()=>"Tool activity completed",dle=()=>"工具活动已完成",hle=()=>"فعالیت ابزار کامل شد",ple=()=>"اكتمل نشاط الأداة",mle=()=>"Actividad de la herramienta completada",gle=()=>"टूल गतिविधि पूरी हुई",vle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dle():t==="fa"?hle():t==="ar"?ple():t==="es"?mle():t==="hi"?gle():fle()}),ble=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,yle=e=>`工具活动失败:${e==null?void 0:e.labels}`,xle=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,wle=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,kle=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,Sle=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,Cle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yle(e):t==="fa"?xle(e):t==="ar"?wle(e):t==="es"?kle(e):t==="hi"?Sle(e):ble(e)}),Ele=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Nle=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,zle=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jle=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Ale=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Tle=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,Rle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nle(e):t==="fa"?zle(e):t==="ar"?jle(e):t==="es"?Ale(e):t==="hi"?Tle(e):Ele(e)}),Mle=()=>"Turn did not finish.",Ole=()=>"本轮未完成。",Dle=()=>"این نوبت کامل نشد.",Lle=()=>"لم تكتمل الجولة.",Ile=()=>"El turno no terminó.",$le=()=>"यह टर्न पूरा नहीं हुआ।",Ble=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ole():t==="fa"?Dle():t==="ar"?Lle():t==="es"?Ile():t==="hi"?$le():Mle()}),Ple=()=>"Artifacts",Fle=()=>"产物",Hle=()=>"خروجی‌ها",qle=()=>"المُخرَجات",Ule=()=>"Artefactos",Gle=()=>"आर्टिफ़ैक्ट",nL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fle():t==="fa"?Hle():t==="ar"?qle():t==="es"?Ule():t==="hi"?Gle():Ple()}),Vle=()=>"Close panel",Kle=()=>"关闭面板",Wle=()=>"بستن پنل",Qle=()=>"إغلاق اللوحة",Xle=()=>"Cerrar panel",Yle=()=>"पैनल बंद करें",Z0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kle():t==="fa"?Wle():t==="ar"?Qle():t==="es"?Xle():t==="hi"?Yle():Vle()}),Zle=()=>"Current task",Jle=()=>"当前任务",eue=()=>"وظیفهٔ فعلی",tue=()=>"المهمة الحالية",nue=()=>"Tarea actual",rue=()=>"मौजूदा टास्क",vN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jle():t==="fa"?eue():t==="ar"?tue():t==="es"?nue():t==="hi"?rue():Zle()}),sue=()=>"Drag to resize panel",iue=()=>"拖动以调整面板大小",aue=()=>"برای تغییر اندازهٔ پنل بکشید",oue=()=>"اسحب لتغيير حجم اللوحة",cue=()=>"Arrastra para cambiar el tamaño del panel",lue=()=>"पैनल का आकार बदलने के लिए खींचें",uue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iue():t==="fa"?aue():t==="ar"?oue():t==="es"?cue():t==="hi"?lue():sue()}),_ue=()=>"Drag toward the center to restore panel",fue=()=>"向中央拖动以恢复面板",due=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",hue=()=>"اسحب نحو المنتصف لاستعادة اللوحة",pue=()=>"Arrastra hacia el centro para restaurar el panel",mue=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",gue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fue():t==="fa"?due():t==="ar"?hue():t==="es"?pue():t==="hi"?mue():_ue()}),vue=()=>"Entire project",bue=()=>"整个项目",yue=()=>"کل پروژه",xue=()=>"المشروع بالكامل",wue=()=>"Todo el proyecto",kue=()=>"पूरा प्रोजेक्ट",bN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bue():t==="fa"?yue():t==="ar"?xue():t==="es"?wue():t==="hi"?kue():vue()}),Sue=()=>"Expand panel",Cue=()=>"展开面板",Eue=()=>"گسترش پنل",Nue=()=>"توسيع اللوحة",zue=()=>"Expandir panel",jue=()=>"पैनल फैलाएं",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?zue():t==="hi"?jue():Sue()}),Aue=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Tue=e=>`实验筛选:${e==null?void 0:e.scope}`,Rue=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Mue=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,Oue=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Due=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Lue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tue(e):t==="fa"?Rue(e):t==="ar"?Mue(e):t==="es"?Oue(e):t==="hi"?Due(e):Aue(e)}),Iue=()=>"Experiment view",$ue=()=>"实验视图",Bue=()=>"نمای آزمایش",Pue=()=>"عرض التجربة",Fue=()=>"Vista de experimento",Hue=()=>"प्रयोग व्यू",que=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ue():t==="fa"?Bue():t==="ar"?Pue():t==="es"?Fue():t==="hi"?Hue():Iue()}),Uue=()=>"Experiments",Gue=()=>"实验",Vue=()=>"آزمایش‌ها",Kue=()=>"التجارب",Wue=()=>"Experimentos",Que=()=>"प्रयोग",rL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gue():t==="fa"?Vue():t==="ar"?Kue():t==="es"?Wue():t==="hi"?Que():Uue()}),Xue=()=>"Files",Yue=()=>"文件",Zue=()=>"فایل‌ها",Jue=()=>"الملفات",e_e=()=>"Archivos",t_e=()=>"फ़ाइलें",O3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yue():t==="fa"?Zue():t==="ar"?Jue():t==="es"?e_e():t==="hi"?t_e():Xue()}),n_e=()=>"Filter experiments",r_e=()=>"筛选实验",s_e=()=>"فیلتر آزمایش‌ها",i_e=()=>"تصفية التجارب",a_e=()=>"Filtrar experimentos",o_e=()=>"प्रयोग फ़िल्टर करें",c_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r_e():t==="fa"?s_e():t==="ar"?i_e():t==="es"?a_e():t==="hi"?o_e():n_e()}),l_e=()=>"Current task filtering is unavailable for unattributed experiments",u_e=()=>"存在无法归属的实验时,不能按当前任务筛选",__e=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",f_e=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",d_e=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",h_e=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",p_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u_e():t==="fa"?__e():t==="ar"?f_e():t==="es"?d_e():t==="hi"?h_e():l_e()}),m_e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",g_e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",v_e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",b_e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",y_e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",x_e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",w_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g_e():t==="fa"?v_e():t==="ar"?b_e():t==="es"?y_e():t==="hi"?x_e():m_e()}),k_e=()=>"Open a task to filter to its experiments",S_e=()=>"请打开一个任务以筛选其实验",C_e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",E_e=()=>"افتح مهمة لعرض تجاربها فقط",N_e=()=>"Abre una tarea para filtrar por sus experimentos",z_e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",j_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S_e():t==="fa"?C_e():t==="ar"?E_e():t==="es"?N_e():t==="hi"?z_e():k_e()}),A_e=()=>"projects",T_e=()=>"项目",R_e=()=>"پروژه‌ها",M_e=()=>"المشاريع",O_e=()=>"los proyectos",D_e=()=>"प्रोजेक्ट",R0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?D_e():A_e()}),L_e=()=>"Restore panel",I_e=()=>"还原面板",$_e=()=>"بازگرداندن اندازهٔ پنل",B_e=()=>"استعادة اللوحة",P_e=()=>"Restaurar panel",F_e=()=>"पैनल वापस लाएं",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I_e():t==="fa"?$_e():t==="ar"?B_e():t==="es"?P_e():t==="hi"?F_e():L_e()}),H_e=()=>"Retry",q_e=()=>"重试",U_e=()=>"تلاش دوباره",G_e=()=>"إعادة المحاولة",V_e=()=>"Reintentar",K_e=()=>"फिर से कोशिश करें",Ks=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e():t==="fa"?U_e():t==="ar"?G_e():t==="es"?V_e():t==="hi"?K_e():H_e()}),W_e=()=>"Select a project to browse its files.",Q_e=()=>"选择一个项目以浏览其文件。",X_e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Y_e=()=>"اختر مشروعًا لتصفح ملفاته.",Z_e=()=>"Selecciona un proyecto para explorar sus archivos.",J_e=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",efe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q_e():t==="fa"?X_e():t==="ar"?Y_e():t==="es"?Z_e():t==="hi"?J_e():W_e()}),tfe=()=>"settings",nfe=()=>"设置",rfe=()=>"تنظیمات",sfe=()=>"الإعدادات",ife=()=>"la configuración",afe=()=>"सेटिंग्स",ofe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nfe():t==="fa"?rfe():t==="ar"?sfe():t==="es"?ife():t==="hi"?afe():tfe()}),cfe=()=>"Show archived",lfe=()=>"显示已归档",ufe=()=>"نمایش بایگانی‌شده‌ها",_fe=()=>"إظهار المؤرشف",ffe=()=>"Mostrar archivados",dfe=()=>"संग्रहीत दिखाएँ",hfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lfe():t==="fa"?ufe():t==="ar"?_fe():t==="es"?ffe():t==="hi"?dfe():cfe()}),pfe=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,mfe=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,gfe=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,vfe=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,bfe=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,yfe=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,xfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mfe(e):t==="fa"?gfe(e):t==="ar"?vfe(e):t==="es"?bfe(e):t==="hi"?yfe(e):pfe(e)}),wfe=()=>"Sub-agent",kfe=()=>"子智能体",Sfe=()=>"عامل فرعی",Cfe=()=>"وكيل فرعي",Efe=()=>"Subagente",Nfe=()=>"सब-एजेंट",zfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kfe():t==="fa"?Sfe():t==="ar"?Cfe():t==="es"?Efe():t==="hi"?Nfe():wfe()}),jfe=()=>"Table",Afe=()=>"表格",Tfe=()=>"جدول",Rfe=()=>"جدول",Mfe=()=>"Tabla",Ofe=()=>"टेबल",Dfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Afe():t==="fa"?Tfe():t==="ar"?Rfe():t==="es"?Mfe():t==="hi"?Ofe():jfe()}),Lfe=()=>"Tree",Ife=()=>"树状图",$fe=()=>"درخت",Bfe=()=>"شجرة",Pfe=()=>"Árbol",Ffe=()=>"ट्री",Hfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ife():t==="fa"?$fe():t==="ar"?Bfe():t==="es"?Pfe():t==="hi"?Ffe():Lfe()}),qfe=e=>`Collapse ${e==null?void 0:e.name}`,Ufe=e=>`折叠 ${e==null?void 0:e.name}`,Gfe=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Vfe=e=>`طيّ ${e==null?void 0:e.name}`,Kfe=e=>`Contraer ${e==null?void 0:e.name}`,Wfe=e=>`${e==null?void 0:e.name} समेटें`,Qfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ufe(e):t==="fa"?Gfe(e):t==="ar"?Vfe(e):t==="es"?Kfe(e):t==="hi"?Wfe(e):qfe(e)}),Xfe=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Yfe=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Zfe=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Jfe=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,ede=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,tde=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,kS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yfe(e):t==="fa"?Zfe(e):t==="ar"?Jfe(e):t==="es"?ede(e):t==="hi"?tde(e):Xfe(e)}),nde=e=>`Delete folder ${e==null?void 0:e.name}`,rde=e=>`删除文件夹 ${e==null?void 0:e.name}`,sde=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,ide=e=>`حذف المجلد ${e==null?void 0:e.name}`,ade=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,ode=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,cde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rde(e):t==="fa"?sde(e):t==="ar"?ide(e):t==="es"?ade(e):t==="hi"?ode(e):nde(e)}),lde=e=>`Expand ${e==null?void 0:e.name}`,ude=e=>`展开 ${e==null?void 0:e.name}`,_de=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,fde=e=>`توسيع ${e==null?void 0:e.name}`,dde=e=>`Expandir ${e==null?void 0:e.name}`,hde=e=>`${e==null?void 0:e.name} फैलाएं`,pde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ude(e):t==="fa"?_de(e):t==="ar"?fde(e):t==="es"?dde(e):t==="hi"?hde(e):lde(e)}),mde=()=>"Binary or unsupported file — no inline preview.",gde=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",vde=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",bde=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",yde=()=>"Archivo binario o no compatible — sin vista previa.",xde=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",wde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gde():t==="fa"?vde():t==="ar"?bde():t==="es"?yde():t==="hi"?xde():mde()}),kde=()=>"Copy path",Sde=()=>"复制路径",Cde=()=>"کپی مسیر",Ede=()=>"نسخ المسار",Nde=()=>"Copiar ruta",zde=()=>"पथ कॉपी करें",jde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sde():t==="fa"?Cde():t==="ar"?Ede():t==="es"?Nde():t==="hi"?zde():kde()}),Ade=()=>"Artifact not found",Tde=()=>"找不到产物",Rde=()=>"خروجی پیدا نشد",Mde=()=>"لم يُعثر على المُخرَج",Ode=()=>"No se encontró el artefacto",Dde=()=>"आर्टिफ़ैक्ट नहीं मिला",Lde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tde():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?Dde():Ade()}),Ide=()=>"Open raw",$de=()=>"打开原始文件",Bde=()=>"باز کردن فایل خام",Pde=()=>"فتح الملف الخام",Fde=()=>"Abrir sin formato",Hde=()=>"रॉ खोलें",qde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$de():t==="fa"?Bde():t==="ar"?Pde():t==="es"?Fde():t==="hi"?Hde():Ide()}),Ude=()=>"Click an artifact to view it",Gde=()=>"点击产物即可查看",Vde=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Kde=()=>"انقر على مُخرَج لعرضه",Wde=()=>"Selecciona un artefacto para verlo",Qde=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gde():t==="fa"?Vde():t==="ar"?Kde():t==="es"?Wde():t==="hi"?Qde():Ude()}),Yde=()=>"Delete artifact",Zde=()=>"删除产物",Jde=()=>"حذف خروجی",ehe=()=>"حذف المُخرَج",the=()=>"Eliminar artefacto",nhe=()=>"आर्टिफ़ैक्ट हटाएं",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zde():t==="fa"?Jde():t==="ar"?ehe():t==="es"?the():t==="hi"?nhe():Yde()}),rhe=()=>"Delete folder",she=()=>"删除文件夹",ihe=()=>"حذف پوشه",ahe=()=>"حذف المجلد",ohe=()=>"Eliminar carpeta",che=()=>"फ़ोल्डर हटाएं",lhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?she():t==="fa"?ihe():t==="ar"?ahe():t==="es"?ohe():t==="hi"?che():rhe()}),uhe=()=>"Failed to load:",_he=()=>"加载失败:",fhe=()=>"بارگیری ناموفق بود:",dhe=()=>"تعذّر التحميل:",hhe=()=>"Error al cargar:",phe=()=>"लोड नहीं हो सका:",mhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_he():t==="fa"?fhe():t==="ar"?dhe():t==="es"?hhe():t==="hi"?phe():uhe()}),ghe=()=>"File truncated — showing the first 512 KB.",vhe=()=>"文件已截断——仅显示前 512 KB。",bhe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",yhe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",xhe=()=>"Archivo truncado — se muestran los primeros 512 KB.",whe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",khe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vhe():t==="fa"?bhe():t==="ar"?yhe():t==="es"?xhe():t==="hi"?whe():ghe()}),She=()=>"Listing truncated — the folder has more artifacts.",Che=()=>"列表已截断——文件夹中还有更多产物。",Ehe=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Nhe=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",zhe=()=>"Listado truncado — la carpeta tiene más artefactos.",jhe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Ahe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Che():t==="fa"?Ehe():t==="ar"?Nhe():t==="es"?zhe():t==="hi"?jhe():She()}),The=()=>"Loading…",Rhe=()=>"正在加载…",Mhe=()=>"در حال بارگیری…",Ohe=()=>"جارٍ التحميل…",Dhe=()=>"Cargando…",Lhe=()=>"लोड हो रहा है…",sL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rhe():t==="fa"?Mhe():t==="ar"?Ohe():t==="es"?Dhe():t==="hi"?Lhe():The()}),Ihe=()=>"Loading artifacts…",$he=()=>"正在加载产物…",Bhe=()=>"در حال بارگیری خروجی‌ها…",Phe=()=>"جارٍ تحميل المُخرَجات…",Fhe=()=>"Cargando artefactos…",Hhe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",qhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$he():t==="fa"?Bhe():t==="ar"?Phe():t==="es"?Fhe():t==="hi"?Hhe():Ihe()}),Uhe=()=>"Modified",Ghe=()=>"修改时间",Vhe=()=>"ویرایش‌شده",Khe=()=>"عُدّل",Whe=()=>"Modificado",Qhe=()=>"बदला गया",Xhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghe():t==="fa"?Vhe():t==="ar"?Khe():t==="es"?Whe():t==="hi"?Qhe():Uhe()}),Yhe=()=>"No artifacts yet",Zhe=()=>"尚无产物",Jhe=()=>"هنوز خروجی‌ای وجود ندارد",epe=()=>"لا توجد مُخرَجات بعد",tpe=()=>"Aún no hay artefactos",npe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",rpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zhe():t==="fa"?Jhe():t==="ar"?epe():t==="es"?tpe():t==="hi"?npe():Yhe()}),spe=()=>"Open raw in new tab",ipe=()=>"在新标签页中打开原始文件",ape=()=>"باز کردن فایل خام در زبانهٔ جدید",ope=()=>"فتح الملف الخام في تبويب جديد",cpe=()=>"Abrir sin formato en una pestaña nueva",lpe=()=>"नए टैब में रॉ खोलें",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ipe():t==="fa"?ape():t==="ar"?ope():t==="es"?cpe():t==="hi"?lpe():spe()}),upe=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",_pe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",fpe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",dpe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",hpe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",ppe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",mpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pe():t==="fa"?fpe():t==="ar"?dpe():t==="es"?hpe():t==="hi"?ppe():upe()}),gpe=()=>"File too large to preview inline.",vpe=()=>"文件太大,无法内嵌预览。",bpe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",ype=()=>"الملف كبير جدًا للمعاينة المضمّنة.",xpe=()=>"El archivo es demasiado grande para previsualizarlo.",wpe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",kpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpe():t==="fa"?bpe():t==="ar"?ype():t==="es"?xpe():t==="hi"?wpe():gpe()}),Spe=()=>"This is the baseline branch, so there is no parent comparison.",Cpe=()=>"这是基线分支,因此没有父分支可供比较。",Epe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",Npe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",zpe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",jpe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",Ape=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cpe():t==="fa"?Epe():t==="ar"?Npe():t==="es"?zpe():t==="hi"?jpe():Spe()}),Tpe=()=>"Failed to load changes:",Rpe=()=>"加载更改失败:",Mpe=()=>"بارگیری تغییرات ناموفق بود:",Ope=()=>"تعذّر تحميل التغييرات:",Dpe=()=>"Error al cargar los cambios:",Lpe=()=>"बदलाव लोड नहीं हो सके:",Ipe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?Dpe():t==="hi"?Lpe():Tpe()}),$pe=()=>"Loading changes…",Bpe=()=>"正在加载更改…",Ppe=()=>"در حال بارگیری تغییرات…",Fpe=()=>"جارٍ تحميل التغييرات…",Hpe=()=>"Cargando cambios…",qpe=()=>"बदलाव लोड हो रहे हैं…",Upe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bpe():t==="fa"?Ppe():t==="ar"?Fpe():t==="es"?Hpe():t==="hi"?qpe():$pe()}),Gpe=()=>"No committed changes from the parent branch.",Vpe=()=>"与父分支相比没有已提交的更改。",Kpe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Wpe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Qpe=()=>"No hay cambios confirmados respecto a la rama padre.",Xpe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Ype=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpe():t==="fa"?Kpe():t==="ar"?Wpe():t==="es"?Qpe():t==="hi"?Xpe():Gpe()}),Zpe=e=>`agent ${e==null?void 0:e.number}`,Jpe=e=>`智能体 ${e==null?void 0:e.number}`,e0e=e=>`عامل ${e==null?void 0:e.number}`,t0e=e=>`وكيل ${e==null?void 0:e.number}`,n0e=e=>`agente ${e==null?void 0:e.number}`,r0e=e=>`एजेंट ${e==null?void 0:e.number}`,SN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jpe(e):t==="fa"?e0e(e):t==="ar"?t0e(e):t==="es"?n0e(e):t==="hi"?r0e(e):Zpe(e)}),s0e=()=>"agent sessions",i0e=()=>"智能体会话",a0e=()=>"نشست‌های عامل‌ها",o0e=()=>"جلسات الوكلاء",c0e=()=>"sesiones de agente",l0e=()=>"एजेंट सेशन",u0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0e():t==="fa"?a0e():t==="ar"?o0e():t==="es"?c0e():t==="hi"?l0e():s0e()}),_0e=()=>"All sessions",f0e=()=>"所有会话",d0e=()=>"همهٔ نشست‌ها",h0e=()=>"كل الجلسات",p0e=()=>"Todas las sesiones",m0e=()=>"सभी सेशन",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f0e():t==="fa"?d0e():t==="ar"?h0e():t==="es"?p0e():t==="hi"?m0e():_0e()}),g0e=e=>`${e==null?void 0:e.count} annotations`,v0e=e=>`${e==null?void 0:e.count} 条批注`,b0e=e=>`${e==null?void 0:e.count} یادداشت`,y0e=e=>`التعليقات: ${e==null?void 0:e.count}`,x0e=e=>`${e==null?void 0:e.count} anotaciones`,w0e=e=>`${e==null?void 0:e.count} एनोटेशन`,k0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?v0e(e):t==="fa"?b0e(e):t==="ar"?y0e(e):t==="es"?x0e(e):t==="hi"?w0e(e):g0e(e)}),S0e=()=>"Archive",C0e=()=>"归档",E0e=()=>"بایگانی",N0e=()=>"أرشفة",z0e=()=>"Archivar",j0e=()=>"आर्काइव करें",A0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C0e():t==="fa"?E0e():t==="ar"?N0e():t==="es"?z0e():t==="hi"?j0e():S0e()}),T0e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",R0e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",M0e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",O0e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",D0e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",L0e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",I0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?D0e():t==="hi"?L0e():T0e()}),$0e=()=>"Asked about selected text",B0e=()=>"已询问所选文本",P0e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",F0e=()=>"سأل عن النص المحدد",H0e=()=>"Preguntó sobre el texto seleccionado",q0e=()=>"चयनित टेक्स्ट के बारे में पूछा",U0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0e():t==="fa"?P0e():t==="ar"?F0e():t==="es"?H0e():t==="hi"?q0e():$0e()}),G0e=()=>"Attachment",V0e=()=>"附件",K0e=()=>"پیوست",W0e=()=>"مرفق",Q0e=()=>"Adjunto",X0e=()=>"अटैचमेंट",Y0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V0e():t==="fa"?K0e():t==="ar"?W0e():t==="es"?Q0e():t==="hi"?X0e():G0e()}),Z0e=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,J0e=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,eme=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,tme=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,nme=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,rme=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,sme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J0e(e):t==="fa"?eme(e):t==="ar"?tme(e):t==="es"?nme(e):t==="hi"?rme(e):Z0e(e)}),ime=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",ame=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",ome=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",cme=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",lme=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",ume=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",_me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ame():t==="fa"?ome():t==="ar"?cme():t==="es"?lme():t==="hi"?ume():ime()}),fme=()=>"Wait for the turn to finish before running a command.",dme=()=>"请等待本轮结束后再运行命令。",hme=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",pme=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",mme=()=>"Espera a que termine el turno antes de ejecutar un comando.",gme=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",vme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dme():t==="fa"?hme():t==="ar"?pme():t==="es"?mme():t==="hi"?gme():fme()}),bme=e=>`Exited with code ${e==null?void 0:e.code}`,yme=e=>`退出码 ${e==null?void 0:e.code}`,xme=e=>`با کد ${e==null?void 0:e.code} خارج شد`,wme=e=>`خرج برمز ${e==null?void 0:e.code}`,kme=e=>`Terminó con el código ${e==null?void 0:e.code}`,Sme=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Cme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yme(e):t==="fa"?xme(e):t==="ar"?wme(e):t==="es"?kme(e):t==="hi"?Sme(e):bme(e)}),Eme=e=>`Command not run: ${e==null?void 0:e.error}`,Nme=e=>`命令未运行:${e==null?void 0:e.error}`,zme=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,jme=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,Ame=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,Tme=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,CN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nme(e):t==="fa"?zme(e):t==="ar"?jme(e):t==="es"?Ame(e):t==="hi"?Tme(e):Eme(e)}),Rme=()=>"Collapse tool activity",Mme=()=>"折叠工具活动",Ome=()=>"بستن فعالیت ابزارها",Dme=()=>"طيّ نشاط الأداة",Lme=()=>"Contraer actividad de herramientas",Ime=()=>"टूल गतिविधि समेटें",$me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mme():t==="fa"?Ome():t==="ar"?Dme():t==="es"?Lme():t==="hi"?Ime():Rme()}),Bme=()=>"Wait for the turn to finish before compacting.",Pme=()=>"请等待本轮结束后再压缩。",Fme=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",Hme=()=>"انتظر انتهاء الجولة قبل الضغط.",qme=()=>"Espera a que termine el turno antes de comprimir.",Ume=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",Gme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pme():t==="fa"?Fme():t==="ar"?Hme():t==="es"?qme():t==="hi"?Ume():Bme()}),Vme=e=>`Compacting failed: ${e==null?void 0:e.error}`,Kme=e=>`压缩失败:${e==null?void 0:e.error}`,Wme=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,Qme=e=>`فشل الضغط: ${e==null?void 0:e.error}`,Xme=e=>`Error al comprimir: ${e==null?void 0:e.error}`,Yme=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,Zme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kme(e):t==="fa"?Wme(e):t==="ar"?Qme(e):t==="es"?Xme(e):t==="hi"?Yme(e):Vme(e)}),Jme=()=>"Continue",ege=()=>"继续",tge=()=>"ادامه",nge=()=>"متابعة",rge=()=>"Continuar",sge=()=>"जारी रखें",ige=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ege():t==="fa"?tge():t==="ar"?nge():t==="es"?rge():t==="hi"?sge():Jme()}),age=()=>"Copy response",oge=()=>"复制回复",cge=()=>"کپی پاسخ",lge=()=>"نسخ الرد",uge=()=>"Copiar respuesta",_ge=()=>"जवाब कॉपी करें",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oge():t==="fa"?cge():t==="ar"?lge():t==="es"?uge():t==="hi"?_ge():age()}),fge=e=>`Delete “${e==null?void 0:e.title}”? + */var sN;function jQ(){if(sN)return _w;sN=1;var e=Gm(),n=zQ();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return _w.useSyncExternalStoreWithSelector=function(u,d,f,p,m){var w=i(null);if(w.current===null){var k={hasValue:!1,value:null};w.current=k}else k=w.current;w=o(function(){function y(z){if(!x){if(x=!0,b=z,z=p(z),m!==void 0&&k.hasValue){var A=k.value;if(m(A,z))return C=A}return C=z}if(A=C,r(b,z))return A;var j=p(z);return m!==void 0&&m(A,j)?(b=z,A):(b=z,C=j)}var x=!1,b,C,N=f===void 0?null:f;return[function(){return y(d())},N===null?void 0:function(){return y(N())}]},[d,f,p,m]);var v=s(u,w[0],w[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},_w}var iN;function AQ(){return iN||(iN=1,uw.exports=jQ()),uw.exports}var DD=AQ();const TQ=Um(DD);function RQ(e,n){return e===n}function Oc(e,n,t=RQ){const r=T.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=T.useCallback(()=>e==null?void 0:e.get(),[e]);return DD.useSyncExternalStoreWithSelector(r,s,s,n,t)}var aN={};function vS(e,n){const t=T.useRef();return r=>{const s=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??n.options.defaultStructuralSharing?t.current=J_(t.current,s):s}}function Vf(e){const n=Oi(),t=T.useContext(e.from?yQ:ny),r=e.from??t,s=n.stores.getMatchStore(r),i=vS(e,n),a=Oc(s,o=>o?i(o):aN);if(a!==aN)return a;(e.shouldThrow??!0)&&lS()}function LD(e){return Vf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function ID(e){const{select:n,...t}=e;return Vf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function $D(e){return Vf({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function BD(e){return Vf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Km(e){const n=Oi();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function bS(e){return Vf({...e,select:n=>e.select?e.select(n.context):n.context})}function hw(e){const n=T.useRef(e);return Zu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function MQ(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function OQ(e,n,t){if(e!=null&&e.external)return Gv(e.href,t)?void 0:e.href;if(!FQ(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),Gv(n,t)?void 0:n}catch{}}function DQ(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!AW(e.pathname,n.pathname,r))return!1}else{const a=Kv(e.pathname,r),o=Kv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!Zu(e.search,n.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===n.hash:!0}function LQ(e,n){const t=Oi(),r=fW(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:w,viewTransition:k,children:v,target:y,disabled:x,style:b,className:C,onClick:N,onBlur:z,onFocus:A,onMouseEnter:j,onMouseLeave:M,onTouchStart:D,ignoreBlocker:L,params:B,search:U,hash:H,state:Q,mask:K,reloadDocument:Z,unsafeRelative:ee,from:$,_fromLocation:I,...F}=e,q=TD(),V=hw(e.search),ie=hw(e.params),oe=hw(a),ce=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,V,ie,e.state,e.mask,e.unsafeRelative]),ne=T.useCallback($e=>{const ot=t.buildLocation({_fromLocation:$e,...ce}),ct=PQ(ot.maskedLocation?ot.maskedLocation.publicHref:ot.publicHref,ot.maskedLocation?ot.maskedLocation.external:ot.external,t.history,x),ye=OQ(ct,o,t.protocolAllowlist);return[ct==null?void 0:ct.href,ye,DQ($e,ot,oe,t.basepath,q,ye!==void 0)]},[oe,x,q,ce,t,o]),[G,ae,le]=Oc(t.stores.location,ne,MQ),me=le?Dh(s,{})??IQ:pw,ve=le?pw:Dh(i,{})??pw,Ee=[C,me.className,ve.className].filter(Boolean).join(" "),Fe=(b||me.style||ve.style)&&{...b,...me.style,...ve.style},We=T.useRef(!1),Oe=e.reloadDocument||ae||x?!1:c??t.options.defaultPreload,He=u??t.options.defaultPreloadDelay??0,ht=T.useCallback(()=>{t.preloadRoute(ce).catch($e=>{console.warn($e),console.warn(pQ)})},[t,ce]),xt=T.useCallback($e=>{if(!$e){mw(r);return}if(!($e.isIntersecting??Oe==="intent")){$e.isIntersecting===!1&&mw(r);return}if(!He){ht();return}R0.has(r)||R0.set(r,setTimeout(()=>{R0.delete(r),ht()},He))},[ht,r,Oe,He]);_W(r,xt,Oe!=="viewport"),T.useEffect(()=>{We.current||Oe==="render"&&(ht(),We.current=!0)},[ht,Oe]);const Kt=$e=>{const ot=$e.currentTarget.getAttribute("target"),ct=y!==void 0?y:ot;!x&&!($e.metaKey||$e.altKey||$e.ctrlKey||$e.shiftKey)&&!$e.defaultPrevented&&(!ct||ct==="_self")&&$e.button===0&&($e.preventDefault(),t.navigate({...ce,replace:p,resetScroll:w,hashScrollIntoView:f,startTransition:m,viewTransition:k,ignoreBlocker:L}))};if(ae)return{...F,ref:r,href:ae,...v&&{children:v},...y&&{target:y},...x&&{disabled:x},...b&&{style:b},...C&&{className:C},...N&&{onClick:N},...z&&{onBlur:z},...A&&{onFocus:A},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const Ut=()=>{Oe==="intent"&&ht()},Ht=()=>{Oe==="intent"&&mw(r)};return{...F,...me,...ve,href:G,ref:r,onClick:Ld([N,Kt]),onBlur:Ld([z,Ht]),onFocus:Ld([A,xt]),onMouseEnter:Ld([j,xt]),onMouseLeave:Ld([M,Ht]),onTouchStart:Ld([D,Ut]),disabled:!!x,target:y,...Fe&&{style:Fe},...Ee&&{className:Ee},...x&&$Q,...le&&BQ}}var pw={},IQ={className:"active"},$Q={role:"link","aria-disabled":!0},BQ={"data-status":"active","aria-current":"page"},R0=new WeakMap,mw=e=>{clearTimeout(R0.get(e)),R0.delete(e)},Ld=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function PQ(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function FQ(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var ry=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=LQ(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...c}=i;return T.createElement("a",c,a)}return T.createElement(t,i,a)}),HQ=class extends AD{constructor(n){super(n),this.useMatch=t=>Vf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>bS({...t,from:this.id}),this.useSearch=t=>BD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>$D({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>ID({...t,from:this.id}),this.useLoaderData=t=>LD({...t,from:this.id}),this.useNavigate=()=>Km({from:this.fullPath}),this.Link=rt.forwardRef((t,r)=>_.jsx(ry,{ref:r,from:this.fullPath,...t}))}};function qQ(e){return new HQ(e)}function UQ(){return e=>VQ(e)}var GQ=class extends mQ{constructor(e){super(e),this.useMatch=n=>Vf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>bS({...n,from:this.id}),this.useSearch=n=>BD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>$D({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>ID({...n,from:this.id}),this.useLoaderData=n=>LD({...n,from:this.id}),this.useNavigate=()=>Km({from:this.fullPath}),this.Link=rt.forwardRef((n,t)=>_.jsx(ry,{ref:t,from:this.fullPath,...n}))}};function VQ(e){return new GQ(e)}function Fc(e){return n=>{const t=qQ(n);return t.isRoot=!1,t}}function KQ(e){const n=Oi(),t=`not-found-${Oc(n.stores.location,r=>r.pathname)}-${Oc(n.stores.status,r=>r)}`;return _.jsx(gS,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Lh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Lh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function WQ(){return _.jsx("p",{children:"Not Found"})}function Gd(e){return _.jsx(_.Fragment,{children:e.children})}function PD(e,n,t){return n.options.notFoundComponent?_.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...t}):_.jsx(WQ,{})}function sy(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?_.jsx(t,{}):null}var QQ=(e,n)=>e[0]===n[0]&&e[1]===n[1],FD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,HD=T.memo(function({routeId:n}){const t=Oi();return _.jsx(XQ,{router:t,match:Oc(t.stores.getMatchStore(n),r=>r)})});function XQ({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=sy(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((f=e.options.notFoundRoute)==null?void 0:f.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",c=FD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:Gd,u=s?gS:Gd,d=a?KQ:Gd;return _.jsxs(t.isRoot?t.options.shellComponent??Gd:Gd,{children:[_.jsx(ny.Provider,{value:n.routeId,children:_.jsx(c,{fallback:r,children:_.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,w)=>{if(Lh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,w)},children:_.jsx(d,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?_.jsx(vQ,{fallback:r,children:_.jsx(oN,{match:n})}):_.jsx(oN,{match:n})})})})}),null]})}var oN=T.memo(function({match:n}){const t=Oi(),r=n.routeId,s=t.routesById[r],i=T.useMemo(()=>{var c;const o=(c=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:c({routeId:r,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return o?JSON.stringify(o):void 0},[r,n.loaderDeps,n._strictParams,n._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=T.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?_.jsx(o,{},i):_.jsx(X0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!FD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return sy(t,s)}if(n.status==="notFound")return PD(t,s,n.error);if(n.status==="error")throw n.error;return a}),X0=T.memo(function(){const n=Oi(),t=T.useContext(ny);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Oc(o,c=>[!!c._notFound,c.error],QQ),i=Oc(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return PD(n,n.routesById[t],s);if(!i)return null;const a=_.jsx(HD,{routeId:i});return t===ah?_.jsx(T.Suspense,{fallback:sy(n),children:a}):a});function qD(e,n){const t=e[1];e.length=0,t==null||t(n)}function YQ({t:e}){const n=Oi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{qD(t,!1),t.push(s,i),e(n),T.startTransition(r)}),fD(()=>{const r=n.history.subscribe(n.load);n.updateLatestLocation();const s=n.latestLocation,i=n.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Rl(s.publicHref)!==Rl(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),r;const a=n.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(n.stores.matches.get(),o=>{o&&n.emit({type:"onRendered",...ey(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function ZQ(){const e=Oi(),n=e.routesById[ah],t=sy(e,n),r=e.ssr?Gd:T.Suspense,s=_.jsxs(_.Fragment,{children:[_.jsx(YQ,{t:T.useState()[1]}),_.jsx(r,{fallback:t,children:_.jsx(JQ,{})})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:s}):s}function JQ(){const e=Oi(),n=e._rendered,t=Oc(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;fD(()=>{n[0]===t&&qD(n,!0)},[n,t]);const i=s?_.jsx(HD,{routeId:s}):null;return _.jsx(ny.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:_.jsx(gS,{getResetKey:()=>r,onCatch:void 0,children:i})})}var eX=e=>({createMutableStore:tN,createReadonlyStore:tN,batch:CQ}),tX=e=>new nX(e),nX=class extends nQ{constructor(e){super(e,eX)}};function rX({router:e,children:n,...t}){hD(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=_.jsx(RD.Provider,{value:e,children:n});return e.options.Wrap?_.jsx(e.options.Wrap,{children:r}):r}function sX({router:e,...n}){return _.jsx(rX,{router:e,...n,children:_.jsx(ZQ,{})})}function iX(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function aX(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=iX(e),a=Oi(),{history:o}=a,[c,u]=T.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return T.useEffect(()=>{const d=async f=>{function p(y){const x=a.parseLocation(y),[,b,C]=a.getMatchedRoutes(x.pathname);return C===void 0?{routeId:"__notFound__",fullPath:x.pathname,pathname:x.pathname,params:b,search:a.options.parseSearch(y.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:x.pathname,params:b,search:a.options.parseSearch(y.search)}}const m=p(f.currentLocation),w=p(f.nextLocation);if(m.routeId==="__notFound__"&&w.routeId!=="__notFound__")return!1;const k=await t({action:f.action,current:m,next:w});if(!i)return k;if(!k)return!1;const v=await new Promise(y=>{u({status:"blocked",current:m,next:w,action:f.action,proceed:()=>y(!1),reset:()=>y(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),v};return s?void 0:o.block({blockerFn:d,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function UD(e){const n=Oi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Oc(t.stores.__store,vS(e,t))}function oX(e){const n=Oi();return Oc(n.stores.location,vS(e,n))}const Yv=new WeakMap,yv=new WeakMap;function _o(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))Yv.set(s,(Yv.get(s)??0)+1),(r=yv.get(s))==null||r.add(t)}function Wm(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(c=>[c.id,c])),i=new Set(e.map(c=>c.id)),a=n.filter(c=>t.has(c.id)&&!i.has(c.id)),o=e.filter(c=>!t.has(c.id)||s.has(c.id)).map(c=>t.has(c.id)?s.get(c.id)??c:c);return r?[...a,...o]:[...o,...a]}async function tp(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?Yv.get(s):void 0,a=await t();if(!s||Yv.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,c=>c??a);const o=new Set;yv.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{yv.get(s)===o&&yv.delete(s)}}const Ih=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function GD(e){const n=e.queryKey[2];if(n==="resolvedFile")return Ih(e.queryKey[7]);const t=n==="getProjectFile"?e.queryKey[5]:n==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&Ih(t.ref)}function Sa(e,n=go(),t,r=!1){if(!Gn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!GD(i)&&(!t||t(i))};r?Ze.cancelQueries(s).then(()=>{Gn(n)&&Ze.invalidateQueries(s)}):Ze.invalidateQueries(s)}const VD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],yS=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],cX=["listProjects","listProjectActivity","listSidebarChatSessions","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...yS,...VD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function lX(e,n=go(),t=!1){const r=Ze.getQueryData([...n,"listChatSessions",e])??[],s=Ze.getQueryData([...n,"listRuns",e])??[],i=Ze.getQueryData([...n,"listExperiments",e])??[];Sa([...VD,...yS,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(c=>c.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(c=>c.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(c=>c.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function iy(e){const n=go();Ac.add(e),_o(Ze,[...n,"listChatSessions"],e),Ze.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])cS({queryKey:[...n,t,e]})}function uX(e){const n=go(),t=Ze.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])iy(r.id);cS({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const _X={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshSettings","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function fX(e,n){var a;if(!Gn(n))return;const t=(o,c=n,u)=>Sa(o,c,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|reveal|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t(_X[s]??[],n);return}if(r.startsWith("/api/local-models")&&!/\/(discover|check)$/.test(r)){t(["getLocalModels","getHarnesses"],n);return}if(r==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],n);return}if(r==="/api/latex-templates"){t(["listLatexTemplates"],n);return}if(r==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],n);return}if(r.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],n);return}if(r.startsWith("/api/remote/")||r.startsWith("/_orx/")){t(["listRemoteSessions"],n),Ze.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){t(["listSidebarChatSessions"],n),r==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],n);return}const i=/^\/api\/projects\/([^/]+)(.*)$/.exec(r);if(i){const[,o,c]=i;if(c.startsWith("/file")){lX(o,n,!0);return}t(["listProjects","listProjectActivity","listSidebarChatSessions"],n),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],n,u=>u.queryKey[3]===o);return}(r==="/api/projects"||r==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],n)}const dX={},hX="en",xS=["en","zh-CN","fa","ar","es","hi"],KD="orx:locale",wS=["localStorage","preferredLanguage","baseLocale"],cN=[],Y0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let lN=!1,E=()=>{var t;let e=wS;!Y0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=XD(window.location.href));const n=pX(e);if(n)return lN||(lN=!0,WD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function pX(e,n){let t;for(const r of e){if(r==="baseLocale")t=hX;else if(r==="preferredLanguage"&&!Y0)t=yX();else if(r==="localStorage"&&!Y0)t=localStorage.getItem(KD)??void 0;else if(YD(r)&&Zv.has(r)){const i=Zv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return vX(a)}}const s=Z0(t);if(s)return s}}const mX=e=>{window.location.reload()};let WD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=wS;!Y0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=XD(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(KD,e);else if(YD(c)&&Zv.has(c)){const u=Zv.get(c);if(u){let d=u.setLocale(e);d instanceof Promise&&(d=d.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(d))}}}const a=()=>{!Y0&&t.reload&&window.location&&e!==r&&mX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},gX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function Z0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of xS)if(t.toLowerCase()===n)return t}function QD(e){return!!e&&xS.some(n=>n===e)}function vX(e){const n=Z0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${xS.join(", ")}`)}function bX(e,n){return e.exec(n.href)}function yX(){var n;if(!((n=navigator==null?void 0:navigator.languages)!=null&&n.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const r=Z0(t.fullTag);if(r)return r;const s=Z0(t.baseTag);if(s)return s}}function xX(e){return wX(e)}function wX(e){const n=typeof e=="string"?new URL(e,gX()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&Z0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let uN,_N;function kX(e){if(cN.length===0)return;const n=typeof e=="string"?e:e.href;if(uN===n)return _N;const t=new URL(n,"http://example.com"),r=xX(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of cN){const c=new dX(o.match,a.href);if(bX(c,a)){i=o;break}}if(i)break}return uN=n,_N=i,i}function XD(e){const n=kX(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:wS}const Zv=new Map;function YD(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const SX=e=>`Actions for ${e==null?void 0:e.name}`,CX=e=>`${e==null?void 0:e.name} 的操作`,EX=e=>`عملیات ${e==null?void 0:e.name}`,NX=e=>`إجراءات ${e==null?void 0:e.name}`,zX=e=>`Acciones para ${e==null?void 0:e.name}`,jX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,AX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CX(e):t==="fa"?EX(e):t==="ar"?NX(e):t==="es"?zX(e):t==="hi"?jX(e):SX(e)}),TX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,RX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,MX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,OX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,DX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,LX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,IX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RX(e):t==="fa"?MX(e):t==="ar"?OX(e):t==="es"?DX(e):t==="hi"?LX(e):TX(e)}),$X=e=>`Branch: ${e==null?void 0:e.branch}`,BX=e=>`分支:${e==null?void 0:e.branch}`,PX=e=>`شاخه: ${e==null?void 0:e.branch}`,FX=e=>`الفرع: ${e==null?void 0:e.branch}`,HX=e=>`Rama: ${e==null?void 0:e.branch}`,qX=e=>`ब्रांच: ${e==null?void 0:e.branch}`,UX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BX(e):t==="fa"?PX(e):t==="ar"?FX(e):t==="es"?HX(e):t==="hi"?qX(e):$X(e)}),GX=e=>`Browse code on ${e==null?void 0:e.branch}`,VX=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,KX=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,WX=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,QX=e=>`Explorar el código en ${e==null?void 0:e.branch}`,XX=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,ZD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VX(e):t==="fa"?KX(e):t==="ar"?WX(e):t==="es"?QX(e):t==="hi"?XX(e):GX(e)}),YX=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,ZX=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,JX=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,eY=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,tY=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,nY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,rY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZX(e):t==="fa"?JX(e):t==="ar"?eY(e):t==="es"?tY(e):t==="hi"?nY(e):YX(e)}),sY=e=>`Collapse ${e==null?void 0:e.name}`,iY=e=>`折叠 ${e==null?void 0:e.name}`,aY=e=>`بستن ${e==null?void 0:e.name}`,oY=e=>`طيّ ${e==null?void 0:e.name}`,cY=e=>`Contraer ${e==null?void 0:e.name}`,lY=e=>`${e==null?void 0:e.name} समेटें`,uY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iY(e):t==="fa"?aY(e):t==="ar"?oY(e):t==="es"?cY(e):t==="hi"?lY(e):sY(e)}),_Y=e=>`Committed changes versus ${e==null?void 0:e.parent}`,fY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,dY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,hY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,pY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,mY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,gY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fY(e):t==="fa"?dY(e):t==="ar"?hY(e):t==="es"?pY(e):t==="hi"?mY(e):_Y(e)}),vY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,bY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,yY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,xY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,wY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,kY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,SY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bY(e):t==="fa"?yY(e):t==="ar"?xY(e):t==="es"?wY(e):t==="hi"?kY(e):vY(e)}),CY=e=>`Copy ${e==null?void 0:e.value}`,EY=e=>`复制 ${e==null?void 0:e.value}`,NY=e=>`کپی ${e==null?void 0:e.value}`,zY=e=>`نسخ ${e==null?void 0:e.value}`,jY=e=>`Copiar ${e==null?void 0:e.value}`,AY=e=>`${e==null?void 0:e.value} कॉपी करें`,TY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EY(e):t==="fa"?NY(e):t==="ar"?zY(e):t==="es"?jY(e):t==="hi"?AY(e):CY(e)}),RY=e=>`Delete ${e==null?void 0:e.name}`,MY=e=>`删除 ${e==null?void 0:e.name}`,OY=e=>`حذف ${e==null?void 0:e.name}`,DY=e=>`حذف ${e==null?void 0:e.name}`,LY=e=>`Eliminar ${e==null?void 0:e.name}`,IY=e=>`${e==null?void 0:e.name} हटाएं`,fN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MY(e):t==="fa"?OY(e):t==="ar"?DY(e):t==="es"?LY(e):t==="hi"?IY(e):RY(e)}),$Y=e=>`Download ${e==null?void 0:e.name}`,BY=e=>`下载 ${e==null?void 0:e.name}`,PY=e=>`بارگیری ${e==null?void 0:e.name}`,FY=e=>`تنزيل ${e==null?void 0:e.name}`,HY=e=>`Descargar ${e==null?void 0:e.name}`,qY=e=>`${e==null?void 0:e.name} डाउनलोड करें`,Jv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BY(e):t==="fa"?PY(e):t==="ar"?FY(e):t==="es"?HY(e):t==="hi"?qY(e):$Y(e)}),UY=e=>`Expand ${e==null?void 0:e.name}`,GY=e=>`展开 ${e==null?void 0:e.name}`,VY=e=>`باز کردن ${e==null?void 0:e.name}`,KY=e=>`توسيع ${e==null?void 0:e.name}`,WY=e=>`Expandir ${e==null?void 0:e.name}`,QY=e=>`${e==null?void 0:e.name} फैलाएं`,XY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GY(e):t==="fa"?VY(e):t==="ar"?KY(e):t==="es"?WY(e):t==="hi"?QY(e):UY(e)}),YY=e=>`Hide additional ${e==null?void 0:e.target}`,ZY=e=>`隐藏其余${e==null?void 0:e.target}`,JY=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,eZ=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,tZ=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,nZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,rZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZY(e):t==="fa"?JY(e):t==="ar"?eZ(e):t==="es"?tZ(e):t==="hi"?nZ(e):YY(e)}),sZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,iZ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,aZ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,oZ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,cZ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,lZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,uZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iZ(e):t==="fa"?aZ(e):t==="ar"?oZ(e):t==="es"?cZ(e):t==="hi"?lZ(e):sZ(e)}),_Z=e=>`${e==null?void 0:e.count} consecutive identical calls`,fZ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,dZ=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,hZ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,pZ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,mZ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,gZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fZ(e):t==="fa"?dZ(e):t==="ar"?hZ(e):t==="es"?pZ(e):t==="hi"?mZ(e):_Z(e)}),vZ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,bZ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,yZ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,xZ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,wZ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,kZ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,SZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bZ(e):t==="fa"?yZ(e):t==="ar"?xZ(e):t==="es"?wZ(e):t==="hi"?kZ(e):vZ(e)}),CZ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,EZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,NZ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,zZ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,jZ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,AZ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,JD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EZ(e):t==="fa"?NZ(e):t==="ar"?zZ(e):t==="es"?jZ(e):t==="hi"?AZ(e):CZ(e)}),TZ=e=>`Open experiment ${e==null?void 0:e.name}`,RZ=e=>`打开实验 ${e==null?void 0:e.name}`,MZ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,OZ=e=>`فتح التجربة ${e==null?void 0:e.name}`,DZ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,LZ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,IZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RZ(e):t==="fa"?MZ(e):t==="ar"?OZ(e):t==="es"?DZ(e):t==="hi"?LZ(e):TZ(e)}),$Z=e=>`Open ${e==null?void 0:e.path} in the right pane`,BZ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,PZ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,FZ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,HZ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,qZ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,UZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BZ(e):t==="fa"?PZ(e):t==="ar"?FZ(e):t==="es"?HZ(e):t==="hi"?qZ(e):$Z(e)}),GZ=e=>`Open logs for run ${e==null?void 0:e.run}`,VZ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,KZ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,WZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,QZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,XZ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,YZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VZ(e):t==="fa"?KZ(e):t==="ar"?WZ(e):t==="es"?QZ(e):t==="hi"?XZ(e):GZ(e)}),ZZ=e=>`Open ${e==null?void 0:e.name} on GitHub`,JZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,eJ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,tJ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,nJ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,rJ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,M3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JZ(e):t==="fa"?eJ(e):t==="ar"?tJ(e):t==="es"?nJ(e):t==="hi"?rJ(e):ZZ(e)}),sJ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,iJ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,aJ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,oJ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,cJ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,lJ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,uJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iJ(e):t==="fa"?aJ(e):t==="ar"?oJ(e):t==="es"?cJ(e):t==="hi"?lJ(e):sJ(e)}),_J=e=>`Overleaf — ${e==null?void 0:e.status}`,fJ=e=>`Overleaf — ${e==null?void 0:e.status}`,dJ=e=>`Overleaf — ${e==null?void 0:e.status}`,hJ=e=>`Overleaf — ${e==null?void 0:e.status}`,pJ=e=>`Overleaf — ${e==null?void 0:e.status}`,mJ=e=>`Overleaf — ${e==null?void 0:e.status}`,gJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fJ(e):t==="fa"?dJ(e):t==="ar"?hJ(e):t==="es"?pJ(e):t==="hi"?mJ(e):_J(e)}),vJ=e=>`Preview /${e==null?void 0:e.name} skill`,bJ=e=>`预览 /${e==null?void 0:e.name} 技能`,yJ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,xJ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,wJ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,kJ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,SJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bJ(e):t==="fa"?yJ(e):t==="ar"?xJ(e):t==="es"?wJ(e):t==="hi"?kJ(e):vJ(e)}),CJ=e=>`Remove annotation ${e==null?void 0:e.number}`,EJ=e=>`移除批注 ${e==null?void 0:e.number}`,NJ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,zJ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,jJ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,AJ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,TJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EJ(e):t==="fa"?NJ(e):t==="ar"?zJ(e):t==="es"?jJ(e):t==="hi"?AJ(e):CJ(e)}),RJ=e=>`Remove ${e==null?void 0:e.name}`,MJ=e=>`移除 ${e==null?void 0:e.name}`,OJ=e=>`حذف ${e==null?void 0:e.name}`,DJ=e=>`إزالة ${e==null?void 0:e.name}`,LJ=e=>`Quitar ${e==null?void 0:e.name}`,IJ=e=>`${e==null?void 0:e.name} हटाएं`,$J=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MJ(e):t==="fa"?OJ(e):t==="ar"?DJ(e):t==="es"?LJ(e):t==="hi"?IJ(e):RJ(e)}),BJ=e=>`Remove queued message: ${e==null?void 0:e.text}`,PJ=e=>`移除排队消息:${e==null?void 0:e.text}`,FJ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,HJ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,qJ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,UJ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,GJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PJ(e):t==="fa"?FJ(e):t==="ar"?HJ(e):t==="es"?qJ(e):t==="hi"?UJ(e):BJ(e)}),VJ=e=>`Retry queued message: ${e==null?void 0:e.text}`,KJ=e=>`重试排队消息:${e==null?void 0:e.text}`,WJ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,QJ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,XJ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,YJ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,ZJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KJ(e):t==="fa"?WJ(e):t==="ar"?QJ(e):t==="es"?XJ(e):t==="hi"?YJ(e):VJ(e)}),JJ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,eee=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,tee=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,nee=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,ree=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,see=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,dN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eee(e):t==="fa"?tee(e):t==="ar"?nee(e):t==="es"?ree(e):t==="hi"?see(e):JJ(e)}),iee=e=>`Run ${e==null?void 0:e.id}`,aee=e=>`运行 ${e==null?void 0:e.id}`,oee=e=>`اجرای ${e==null?void 0:e.id}`,cee=e=>`تشغيل ${e==null?void 0:e.id}`,lee=e=>`Ejecución ${e==null?void 0:e.id}`,uee=e=>`रन ${e==null?void 0:e.id}`,_ee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aee(e):t==="fa"?oee(e):t==="ar"?cee(e):t==="es"?lee(e):t==="hi"?uee(e):iee(e)}),fee=e=>`Show error details for ${e==null?void 0:e.activity}`,dee=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,hee=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,pee=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,mee=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,gee=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,vee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dee(e):t==="fa"?hee(e):t==="ar"?pee(e):t==="es"?mee(e):t==="hi"?gee(e):fee(e)}),bee=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,yee=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,xee=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,wee=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,kee=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,See=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,Cee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yee(e):t==="fa"?xee(e):t==="ar"?wee(e):t==="es"?kee(e):t==="hi"?See(e):bee(e)}),Eee=e=>`${e==null?void 0:e.name} skill`,Nee=e=>`${e==null?void 0:e.name} 技能`,zee=e=>`مهارت ${e==null?void 0:e.name}`,jee=e=>`مهارة ${e==null?void 0:e.name}`,Aee=e=>`Skill ${e==null?void 0:e.name}`,Tee=e=>`${e==null?void 0:e.name} स्किल`,Ree=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nee(e):t==="fa"?zee(e):t==="ar"?jee(e):t==="es"?Aee(e):t==="hi"?Tee(e):Eee(e)}),Mee=e=>`Value for ${e==null?void 0:e.name}`,Oee=e=>`${e==null?void 0:e.name} 的值`,Dee=e=>`مقدار ${e==null?void 0:e.name}`,Lee=e=>`قيمة ${e==null?void 0:e.name}`,Iee=e=>`Valor de ${e==null?void 0:e.name}`,$ee=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Bee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Oee(e):t==="fa"?Dee(e):t==="ar"?Lee(e):t==="es"?Iee(e):t==="hi"?$ee(e):Mee(e)}),Pee=()=>"Agent reported back",Fee=()=>"智能体已返回结果",Hee=()=>"عامل نتیجه را گزارش کرد",qee=()=>"أبلغ الوكيل بالنتيجة",Uee=()=>"El agente informó de los resultados",Gee=()=>"एजेंट ने रिपोर्ट भेजी",Vee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fee():t==="fa"?Hee():t==="ar"?qee():t==="es"?Uee():t==="hi"?Gee():Pee()}),Kee=()=>"Browse",Wee=()=>"浏览",Qee=()=>"مرور",Xee=()=>"تصفّح",Yee=()=>"Navegar",Zee=()=>"ब्राउज़ करें",Jee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wee():t==="fa"?Qee():t==="ar"?Xee():t==="es"?Yee():t==="hi"?Zee():Kee()}),ete=()=>"Browsing…",tte=()=>"正在浏览…",nte=()=>"در حال مرور…",rte=()=>"جارٍ التصفّح…",ste=()=>"Navegando…",ite=()=>"ब्राउज़ कर रहा है…",ate=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tte():t==="fa"?nte():t==="ar"?rte():t==="es"?ste():t==="hi"?ite():ete()}),ote=()=>"Checked experiment status and updated notes",cte=()=>"已检查实验状态并更新笔记",lte=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",ute=()=>"فحص حالة التجربة وحدّث الملاحظات",_te=()=>"Consultó el estado del experimento y actualizó las notas",fte=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",dte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cte():t==="fa"?lte():t==="ar"?ute():t==="es"?_te():t==="hi"?fte():ote()}),hte=()=>"Closed an agent",pte=()=>"已关闭智能体",mte=()=>"عامل بسته شد",gte=()=>"أغلق وكيلًا",vte=()=>"Cerró un agente",bte=()=>"एक एजेंट बंद किया",yte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pte():t==="fa"?mte():t==="ar"?gte():t==="es"?vte():t==="hi"?bte():hte()}),xte=()=>"Context compacted",wte=()=>"上下文已压缩",kte=()=>"زمینه فشرده شد",Ste=()=>"تم ضغط السياق",Cte=()=>"Contexto comprimido",Ete=()=>"कॉन्टेक्स्ट छोटा किया गया",Nte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wte():t==="fa"?kte():t==="ar"?Ste():t==="es"?Cte():t==="hi"?Ete():xte()}),zte=()=>"Compacting conversation…",jte=()=>"正在压缩对话…",Ate=()=>"در حال فشرده‌سازی گفت‌وگو…",Tte=()=>"جارٍ ضغط المحادثة…",Rte=()=>"Comprimiendo la conversación…",Mte=()=>"बातचीत छोटी की जा रही है…",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jte():t==="fa"?Ate():t==="ar"?Tte():t==="es"?Rte():t==="hi"?Mte():zte()}),Ote=()=>"Compacting failed",Dte=()=>"压缩失败",Lte=()=>"فشرده‌سازی ناموفق بود",Ite=()=>"فشل الضغط",$te=()=>"Error al comprimir",Bte=()=>"छोटा करना विफल",Pte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dte():t==="fa"?Lte():t==="ar"?Ite():t==="es"?$te():t==="hi"?Bte():Ote()}),Fte=e=>`Created ${e==null?void 0:e.target}`,Hte=e=>`已创建 ${e==null?void 0:e.target}`,qte=e=>`${e==null?void 0:e.target} ایجاد شد`,Ute=e=>`أنشأ ${e==null?void 0:e.target}`,Gte=e=>`Creó ${e==null?void 0:e.target}`,Vte=e=>`${e==null?void 0:e.target} बनाया`,Kte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hte(e):t==="fa"?qte(e):t==="ar"?Ute(e):t==="es"?Gte(e):t==="hi"?Vte(e):Fte(e)}),Wte=()=>"Delegate",Qte=()=>"委派",Xte=()=>"واگذاری",Yte=()=>"تفويض",Zte=()=>"Delegar",Jte=()=>"सौंपें",ene=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qte():t==="fa"?Xte():t==="ar"?Yte():t==="es"?Zte():t==="hi"?Jte():Wte()}),tne=()=>"Delegating…",nne=()=>"正在委派…",rne=()=>"در حال واگذاری…",sne=()=>"جارٍ التفويض…",ine=()=>"Delegando…",ane=()=>"सौंप रहा है…",one=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nne():t==="fa"?rne():t==="ar"?sne():t==="es"?ine():t==="hi"?ane():tne()}),cne=e=>`Deleted ${e==null?void 0:e.target}`,lne=e=>`已删除 ${e==null?void 0:e.target}`,une=e=>`${e==null?void 0:e.target} حذف شد`,_ne=e=>`حذف ${e==null?void 0:e.target}`,fne=e=>`Eliminó ${e==null?void 0:e.target}`,dne=e=>`${e==null?void 0:e.target} हटाया`,hne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lne(e):t==="fa"?une(e):t==="ar"?_ne(e):t==="es"?fne(e):t==="hi"?dne(e):cne(e)}),pne=()=>"Edit",mne=()=>"编辑",gne=()=>"ویرایش",vne=()=>"تعديل",bne=()=>"Editar",yne=()=>"संपादित करें",eL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mne():t==="fa"?gne():t==="ar"?vne():t==="es"?bne():t==="hi"?yne():pne()}),xne=e=>`Edited ${e==null?void 0:e.target}`,wne=e=>`已编辑 ${e==null?void 0:e.target}`,kne=e=>`${e==null?void 0:e.target} ویرایش شد`,Sne=e=>`عدّل ${e==null?void 0:e.target}`,Cne=e=>`Editó ${e==null?void 0:e.target}`,Ene=e=>`${e==null?void 0:e.target} संपादित किया`,Nne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wne(e):t==="fa"?kne(e):t==="ar"?Sne(e):t==="es"?Cne(e):t==="hi"?Ene(e):xne(e)}),zne=()=>"Editing…",jne=()=>"正在编辑…",Ane=()=>"در حال ویرایش…",Tne=()=>"جارٍ التعديل…",Rne=()=>"Editando…",Mne=()=>"संपादित कर रहा है…",One=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jne():t==="fa"?Ane():t==="ar"?Tne():t==="es"?Rne():t==="hi"?Mne():zne()}),Dne=e=>`${e==null?void 0:e.activity} for ${e==null?void 0:e.count} queries`,Lne=e=>`${e==null?void 0:e.activity},共 ${e==null?void 0:e.count} 个查询`,Ine=e=>`${e==null?void 0:e.activity} برای ${e==null?void 0:e.count} جستجو`,$ne=e=>`${e==null?void 0:e.activity} لـ ${e==null?void 0:e.count} استعلامات`,Bne=e=>`${e==null?void 0:e.activity} para ${e==null?void 0:e.count} consultas`,Pne=e=>`${e==null?void 0:e.activity}: ${e==null?void 0:e.count} क्वेरी`,Fne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lne(e):t==="fa"?Ine(e):t==="ar"?$ne(e):t==="es"?Bne(e):t==="hi"?Pne(e):Dne(e)}),Hne=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,qne=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Une=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,Gne=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Vne=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Kne=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,pN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qne(e):t==="fa"?Une(e):t==="ar"?Gne(e):t==="es"?Vne(e):t==="hi"?Kne(e):Hne(e)}),Wne=()=>"Imported from your terminal — new turns continue in the agent's own history",Qne=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Xne=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Yne=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Zne=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",Jne=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",ere=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qne():t==="fa"?Xne():t==="ar"?Yne():t==="es"?Zne():t==="hi"?Jne():Wne()}),tre=e=>`Listed files matching ${e==null?void 0:e.pattern}`,nre=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,rre=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,sre=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,ire=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,are=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,ore=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nre(e):t==="fa"?rre(e):t==="ar"?sre(e):t==="es"?ire(e):t==="hi"?are(e):tre(e)}),cre=()=>"Load",lre=()=>"加载",ure=()=>"بارگیری",_re=()=>"تحميل",fre=()=>"Cargar",dre=()=>"लोड करें",hre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lre():t==="fa"?ure():t==="ar"?_re():t==="es"?fre():t==="hi"?dre():cre()}),pre=()=>"Loaded a skill",mre=()=>"已加载技能",gre=()=>"یک مهارت بارگیری شد",vre=()=>"حمّل مهارة",bre=()=>"Cargó una skill",yre=()=>"एक स्किल लोड की",xre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mre():t==="fa"?gre():t==="ar"?vre():t==="es"?bre():t==="hi"?yre():pre()}),wre=e=>`Loaded ${e==null?void 0:e.name} skill`,kre=e=>`已加载技能 ${e==null?void 0:e.name}`,Sre=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,Cre=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Ere=e=>`Cargó la skill ${e==null?void 0:e.name}`,Nre=e=>`${e==null?void 0:e.name} स्किल लोड की`,zre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kre(e):t==="fa"?Sre(e):t==="ar"?Cre(e):t==="es"?Ere(e):t==="hi"?Nre(e):wre(e)}),jre=()=>"Loading…",Are=()=>"正在加载…",Tre=()=>"در حال بارگیری…",Rre=()=>"جارٍ التحميل…",Mre=()=>"Cargando…",Ore=()=>"लोड हो रहा है…",Dre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Are():t==="fa"?Tre():t==="ar"?Rre():t==="es"?Mre():t==="hi"?Ore():jre()}),Lre=e=>`Opened ${e==null?void 0:e.target}`,Ire=e=>`已打开 ${e==null?void 0:e.target}`,$re=e=>`${e==null?void 0:e.target} باز شد`,Bre=e=>`فتح ${e==null?void 0:e.target}`,Pre=e=>`Abrió ${e==null?void 0:e.target}`,Fre=e=>`${e==null?void 0:e.target} खोला`,Hre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ire(e):t==="fa"?$re(e):t==="ar"?Bre(e):t==="es"?Pre(e):t==="hi"?Fre(e):Lre(e)}),qre=e=>`Ran ${e==null?void 0:e.command}`,Ure=e=>`已运行 ${e==null?void 0:e.command}`,Gre=e=>`${e==null?void 0:e.command} اجرا شد`,Vre=e=>`نفّذ ${e==null?void 0:e.command}`,Kre=e=>`Ejecutó ${e==null?void 0:e.command}`,Wre=e=>`${e==null?void 0:e.command} चलाया`,Qre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ure(e):t==="fa"?Gre(e):t==="ar"?Vre(e):t==="es"?Kre(e):t==="hi"?Wre(e):qre(e)}),Xre=()=>"Ran a sub-agent",Yre=()=>"已运行子智能体",Zre=()=>"یک عامل فرعی اجرا شد",Jre=()=>"شغّل وكيلًا فرعيًا",ese=()=>"Ejecutó un subagente",tse=()=>"एक सब-एजेंट चलाया",nse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yre():t==="fa"?Zre():t==="ar"?Jre():t==="es"?ese():t==="hi"?tse():Xre()}),rse=()=>"Read",sse=()=>"读取",ise=()=>"خواندن",ase=()=>"قراءة",ose=()=>"Leer",cse=()=>"पढ़ें",lse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sse():t==="fa"?ise():t==="ar"?ase():t==="es"?ose():t==="hi"?cse():rse()}),use=()=>"Read experiment notes",_se=()=>"已读取实验笔记",fse=()=>"یادداشت‌های آزمایش خوانده شد",dse=()=>"قرأ ملاحظات التجربة",hse=()=>"Leyó las notas del experimento",pse=()=>"प्रयोग के नोट्स पढ़े",mse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_se():t==="fa"?fse():t==="ar"?dse():t==="es"?hse():t==="hi"?pse():use()}),gse=()=>"Read a paper",vse=()=>"已读取论文",bse=()=>"یک مقاله خوانده شد",yse=()=>"قرأ ورقة",xse=()=>"Leyó un paper",wse=()=>"एक पेपर पढ़ा",kse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vse():t==="fa"?bse():t==="ar"?yse():t==="es"?xse():t==="hi"?wse():gse()}),Sse=e=>`Read ${e==null?void 0:e.name} skill`,Cse=e=>`已读取技能 ${e==null?void 0:e.name}`,Ese=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Nse=e=>`قرأ مهارة ${e==null?void 0:e.name}`,zse=e=>`Leyó la skill ${e==null?void 0:e.name}`,jse=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,gw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cse(e):t==="fa"?Ese(e):t==="ar"?Nse(e):t==="es"?zse(e):t==="hi"?jse(e):Sse(e)}),Ase=e=>`Read ${e==null?void 0:e.target}`,Tse=e=>`已读取 ${e==null?void 0:e.target}`,Rse=e=>`${e==null?void 0:e.target} خوانده شد`,Mse=e=>`قرأ ${e==null?void 0:e.target}`,Ose=e=>`Leyó ${e==null?void 0:e.target}`,Dse=e=>`${e==null?void 0:e.target} पढ़ा`,o0=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tse(e):t==="fa"?Rse(e):t==="ar"?Mse(e):t==="es"?Ose(e):t==="hi"?Dse(e):Ase(e)}),Lse=()=>"Read a web page",Ise=()=>"已读取网页",$se=()=>"یک صفحهٔ وب خوانده شد",Bse=()=>"قرأ صفحة ويب",Pse=()=>"Leyó una página web",Fse=()=>"एक वेब पेज पढ़ा",Hse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ise():t==="fa"?$se():t==="ar"?Bse():t==="es"?Pse():t==="hi"?Fse():Lse()}),qse=()=>"Reading…",Use=()=>"正在读取…",Gse=()=>"در حال خواندن…",Vse=()=>"جارٍ القراءة…",Kse=()=>"Leyendo…",Wse=()=>"पढ़ रहा है…",Qse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Use():t==="fa"?Gse():t==="ar"?Vse():t==="es"?Kse():t==="hi"?Wse():qse()}),Xse=()=>"Resumed an agent",Yse=()=>"已恢复智能体",Zse=()=>"عامل از سر گرفته شد",Jse=()=>"استأنف عمل وكيل",eie=()=>"Reanudó un agente",tie=()=>"एक एजेंट फिर से शुरू किया",nie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yse():t==="fa"?Zse():t==="ar"?Jse():t==="es"?eie():t==="hi"?tie():Xse()}),rie=()=>"Review",sie=()=>"查看",iie=()=>"بازبینی",aie=()=>"مراجعة",oie=()=>"Revisar",cie=()=>"समीक्षा करें",lie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sie():t==="fa"?iie():t==="ar"?aie():t==="es"?oie():t==="hi"?cie():rie()}),uie=()=>"Reviewed run log",_ie=()=>"已查看运行日志",fie=()=>"گزارش اجرا بازبینی شد",die=()=>"راجع سجل التشغيل",hie=()=>"Revisó el log de la ejecución",pie=()=>"रन लॉग की समीक्षा की",mie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ie():t==="fa"?fie():t==="ar"?die():t==="es"?hie():t==="hi"?pie():uie()}),gie=()=>"Reviewed run logs",vie=()=>"已查看运行日志",bie=()=>"گزارش‌های اجرا بازبینی شد",yie=()=>"راجع سجلات التشغيل",xie=()=>"Revisó los logs de las ejecuciones",wie=()=>"रन लॉग की समीक्षा की",kie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vie():t==="fa"?bie():t==="ar"?yie():t==="es"?xie():t==="hi"?wie():gie()}),Sie=()=>"Reviewed experiment status and notes",Cie=()=>"已查看实验状态和笔记",Eie=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Nie=()=>"راجع حالة التجربة وملاحظاتها",zie=()=>"Revisó el estado y las notas del experimento",jie=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",Aie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cie():t==="fa"?Eie():t==="ar"?Nie():t==="es"?zie():t==="hi"?jie():Sie()}),Tie=()=>"Reviewing…",Rie=()=>"正在查看…",Mie=()=>"در حال بازبینی…",Oie=()=>"جارٍ المراجعة…",Die=()=>"Revisando…",Lie=()=>"समीक्षा कर रहा है…",Iie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rie():t==="fa"?Mie():t==="ar"?Oie():t==="es"?Die():t==="hi"?Lie():Tie()}),$ie=()=>"Run",Bie=()=>"运行",Pie=()=>"اجرا",Fie=()=>"تشغيل",Hie=()=>"Ejecutar",qie=()=>"चलाएं",Uie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bie():t==="fa"?Pie():t==="ar"?Fie():t==="es"?Hie():t==="hi"?qie():$ie()}),Gie=()=>"Running…",Vie=()=>"正在运行…",Kie=()=>"در حال اجرا…",Wie=()=>"جارٍ التشغيل…",Qie=()=>"Ejecutando…",Xie=()=>"चल रहा है…",tL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vie():t==="fa"?Kie():t==="ar"?Wie():t==="es"?Qie():t==="hi"?Xie():Gie()}),Yie=()=>"Search",Zie=()=>"搜索",Jie=()=>"جست‌وجو",eae=()=>"بحث",tae=()=>"Buscar",nae=()=>"खोजें",rae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zie():t==="fa"?Jie():t==="ar"?eae():t==="es"?tae():t==="hi"?nae():Yie()}),sae=()=>"Searched alphaXiv full text",iae=()=>"已搜索 alphaXiv 全文",aae=()=>"متن کامل alphaXiv جست‌وجو شد",oae=()=>"بحث في نص alphaXiv الكامل",cae=()=>"Buscó en el texto completo de alphaXiv",lae=()=>"alphaXiv का पूरा टेक्स्ट खोजा",uae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iae():t==="fa"?aae():t==="ar"?oae():t==="es"?cae():t==="hi"?lae():sae()}),_ae=()=>"Searched alphaXiv semantically",fae=()=>"已对 alphaXiv 进行语义搜索",dae=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",hae=()=>"أجرى بحثًا دلاليًا في alphaXiv",pae=()=>"Hizo una búsqueda semántica en alphaXiv",mae=()=>"alphaXiv को सिमेंटिक रूप से खोजा",gae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fae():t==="fa"?dae():t==="ar"?hae():t==="es"?pae():t==="hi"?mae():_ae()}),vae=()=>"Searched bioRxiv",bae=()=>"已搜索 bioRxiv",yae=()=>"bioRxiv جست‌وجو شد",xae=()=>"بحث في bioRxiv",wae=()=>"Buscó en bioRxiv",kae=()=>"bioRxiv खोजा",Sae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bae():t==="fa"?yae():t==="ar"?xae():t==="es"?wae():t==="hi"?kae():vae()}),Cae=()=>"Searched code",Eae=()=>"已搜索代码",Nae=()=>"کد جست‌وجو شد",zae=()=>"بحث في الشيفرة",jae=()=>"Buscó en el código",Aae=()=>"कोड खोजा",vw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eae():t==="fa"?Nae():t==="ar"?zae():t==="es"?jae():t==="hi"?Aae():Cae()}),Tae=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Rae=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Mae=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Oae=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Dae=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Lae=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,bw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rae(e):t==="fa"?Mae(e):t==="ar"?Oae(e):t==="es"?Dae(e):t==="hi"?Lae(e):Tae(e)}),Iae=e=>`Searched images for “${e==null?void 0:e.query}”`,$ae=e=>`已搜索图片“${e==null?void 0:e.query}”`,Bae=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,Pae=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Fae=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,Hae=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,qae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$ae(e):t==="fa"?Bae(e):t==="ar"?Pae(e):t==="es"?Fae(e):t==="hi"?Hae(e):Iae(e)}),Uae=()=>"Searched the literature",Gae=()=>"已搜索文献",Vae=()=>"منابع علمی جست‌وجو شد",Kae=()=>"بحث في الأدبيات",Wae=()=>"Buscó en la literatura",Qae=()=>"साहित्य खोजा",w1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gae():t==="fa"?Vae():t==="ar"?Kae():t==="es"?Wae():t==="hi"?Qae():Uae()}),Xae=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Yae=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Zae=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Jae=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,eoe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,toe=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,noe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yae(e):t==="fa"?Zae(e):t==="ar"?Jae(e):t==="es"?eoe(e):t==="hi"?toe(e):Xae(e)}),roe=()=>"Searched OpenAlex",soe=()=>"已搜索 OpenAlex",ioe=()=>"OpenAlex جست‌وجو شد",aoe=()=>"بحث في OpenAlex",ooe=()=>"Buscó en OpenAlex",coe=()=>"OpenAlex खोजा",loe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?soe():t==="fa"?ioe():t==="ar"?aoe():t==="es"?ooe():t==="hi"?coe():roe()}),uoe=()=>"Searched PubMed",_oe=()=>"已搜索 PubMed",foe=()=>"PubMed جست‌وجو شد",doe=()=>"بحث في PubMed",hoe=()=>"Buscó en PubMed",poe=()=>"PubMed खोजा",moe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_oe():t==="fa"?foe():t==="ar"?doe():t==="es"?hoe():t==="hi"?poe():uoe()}),goe=e=>`Searched the web for “${e==null?void 0:e.query}”`,voe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,boe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,yoe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,xoe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,woe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,mN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?voe(e):t==="fa"?boe(e):t==="ar"?yoe(e):t==="es"?xoe(e):t==="hi"?woe(e):goe(e)}),koe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,Soe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,Coe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Eoe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Noe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,zoe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,joe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Soe(e):t==="fa"?Coe(e):t==="ar"?Eoe(e):t==="es"?Noe(e):t==="hi"?zoe(e):koe(e)}),Aoe=()=>"Searching…",Toe=()=>"正在搜索…",Roe=()=>"در حال جست‌وجو…",Moe=()=>"جارٍ البحث…",Ooe=()=>"Buscando…",Doe=()=>"खोज रहा है…",Loe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Toe():t==="fa"?Roe():t==="ar"?Moe():t==="es"?Ooe():t==="hi"?Doe():Aoe()}),Ioe=()=>"Sent input to an agent",$oe=()=>"已向智能体发送输入",Boe=()=>"ورودی به عامل فرستاده شد",Poe=()=>"أرسل مدخلًا إلى وكيل",Foe=()=>"Envió información a un agente",Hoe=()=>"एक एजेंट को इनपुट भेजा",qoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$oe():t==="fa"?Boe():t==="ar"?Poe():t==="es"?Foe():t==="hi"?Hoe():Ioe()}),Uoe=()=>"Spawned an agent",Goe=()=>"已创建智能体",Voe=()=>"یک عامل ساخته شد",Koe=()=>"أنشأ وكيلًا",Woe=()=>"Creó un agente",Qoe=()=>"एक एजेंट शुरू किया",Xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Goe():t==="fa"?Voe():t==="ar"?Koe():t==="es"?Woe():t==="hi"?Qoe():Uoe()}),Yoe=()=>"Sub-agent",Zoe=()=>"子智能体",Joe=()=>"عامل فرعی",ece=()=>"وكيل فرعي",tce=()=>"Subagente",nce=()=>"सब-एजेंट",rce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zoe():t==="fa"?Joe():t==="ar"?ece():t==="es"?tce():t==="hi"?nce():Yoe()}),sce=()=>"Sub-agent interrupted",ice=()=>"子智能体已中断",ace=()=>"عامل فرعی متوقف شد",oce=()=>"قُوطع الوكيل الفرعي",cce=()=>"Subagente interrumpido",lce=()=>"सब-एजेंट बाधित हुआ",uce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ice():t==="fa"?ace():t==="ar"?oce():t==="es"?cce():t==="hi"?lce():sce()}),_ce=()=>"Sub-agent started",fce=()=>"子智能体已启动",dce=()=>"عامل فرعی آغاز شد",hce=()=>"بدأ الوكيل الفرعي",pce=()=>"Subagente iniciado",mce=()=>"सब-एजेंट शुरू हुआ",gce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fce():t==="fa"?dce():t==="ar"?hce():t==="es"?pce():t==="hi"?mce():_ce()}),vce=()=>"Updated experiment notes",bce=()=>"已更新实验笔记",yce=()=>"یادداشت‌های آزمایش به‌روز شد",xce=()=>"حدّث ملاحظات التجربة",wce=()=>"Actualizó las notas del experimento",kce=()=>"प्रयोग के नोट्स अपडेट किए",Sce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bce():t==="fa"?yce():t==="ar"?xce():t==="es"?wce():t==="hi"?kce():vce()}),Cce=()=>"Waiting on an agent",Ece=()=>"正在等待智能体",Nce=()=>"در انتظار عامل",zce=()=>"في انتظار وكيل",jce=()=>"Esperando a un agente",Ace=()=>"एजेंट का इंतज़ार है",Tce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ece():t==="fa"?Nce():t==="ar"?zce():t==="es"?jce():t==="hi"?Ace():Cce()}),Rce=e=>`Approval required: ${e==null?void 0:e.label}`,Mce=e=>`需要批准:${e==null?void 0:e.label}`,Oce=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Dce=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Lce=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Ice=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,gN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mce(e):t==="fa"?Oce(e):t==="ar"?Dce(e):t==="es"?Lce(e):t==="hi"?Ice(e):Rce(e)}),$ce=()=>"The CLI is retrying the turn.",Bce=()=>"CLI 正在重试本轮。",Pce=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Fce=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Hce=()=>"La CLI está reintentando el turno.",qce=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Uce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bce():t==="fa"?Pce():t==="ar"?Fce():t==="es"?Hce():t==="hi"?qce():$ce()}),Gce=()=>"Continue is available.",Vce=()=>"可以继续。",Kce=()=>"ادامه در دسترس است.",Wce=()=>"المتابعة متاحة.",Qce=()=>"Puedes continuar.",Xce=()=>"जारी रखना उपलब्ध है।",Yce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vce():t==="fa"?Kce():t==="ar"?Wce():t==="es"?Qce():t==="hi"?Xce():Gce()}),Zce=()=>"Retry is available.",Jce=()=>"可以重试。",ele=()=>"تلاش دوباره در دسترس است.",tle=()=>"إعادة المحاولة متاحة.",nle=()=>"Puedes reintentarlo.",rle=()=>"फिर से कोशिश करना उपलब्ध है।",sle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jce():t==="fa"?ele():t==="ar"?tle():t==="es"?nle():t==="hi"?rle():Zce()}),ile=()=>"Running a tool",ale=()=>"正在运行工具",ole=()=>"در حال اجرای ابزار",cle=()=>"جارٍ تشغيل أداة",lle=()=>"Ejecutando una herramienta",ule=()=>"एक टूल चल रहा है",_le=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ale():t==="fa"?ole():t==="ar"?cle():t==="es"?lle():t==="hi"?ule():ile()}),fle=()=>"Tool activity completed",dle=()=>"工具活动已完成",hle=()=>"فعالیت ابزار کامل شد",ple=()=>"اكتمل نشاط الأداة",mle=()=>"Actividad de la herramienta completada",gle=()=>"टूल गतिविधि पूरी हुई",vle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dle():t==="fa"?hle():t==="ar"?ple():t==="es"?mle():t==="hi"?gle():fle()}),ble=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,yle=e=>`工具活动失败:${e==null?void 0:e.labels}`,xle=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,wle=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,kle=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,Sle=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,Cle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yle(e):t==="fa"?xle(e):t==="ar"?wle(e):t==="es"?kle(e):t==="hi"?Sle(e):ble(e)}),Ele=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Nle=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,zle=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jle=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,Ale=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,Tle=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,Rle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nle(e):t==="fa"?zle(e):t==="ar"?jle(e):t==="es"?Ale(e):t==="hi"?Tle(e):Ele(e)}),Mle=()=>"Turn did not finish.",Ole=()=>"本轮未完成。",Dle=()=>"این نوبت کامل نشد.",Lle=()=>"لم تكتمل الجولة.",Ile=()=>"El turno no terminó.",$le=()=>"यह टर्न पूरा नहीं हुआ।",Ble=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ole():t==="fa"?Dle():t==="ar"?Lle():t==="es"?Ile():t==="hi"?$le():Mle()}),Ple=()=>"Artifacts",Fle=()=>"产物",Hle=()=>"خروجی‌ها",qle=()=>"المُخرَجات",Ule=()=>"Artefactos",Gle=()=>"आर्टिफ़ैक्ट",nL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fle():t==="fa"?Hle():t==="ar"?qle():t==="es"?Ule():t==="hi"?Gle():Ple()}),Vle=()=>"Close panel",Kle=()=>"关闭面板",Wle=()=>"بستن پنل",Qle=()=>"إغلاق اللوحة",Xle=()=>"Cerrar panel",Yle=()=>"पैनल बंद करें",J0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kle():t==="fa"?Wle():t==="ar"?Qle():t==="es"?Xle():t==="hi"?Yle():Vle()}),Zle=()=>"Current task",Jle=()=>"当前任务",eue=()=>"وظیفهٔ فعلی",tue=()=>"المهمة الحالية",nue=()=>"Tarea actual",rue=()=>"मौजूदा टास्क",vN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jle():t==="fa"?eue():t==="ar"?tue():t==="es"?nue():t==="hi"?rue():Zle()}),sue=()=>"Drag to resize panel",iue=()=>"拖动以调整面板大小",aue=()=>"برای تغییر اندازهٔ پنل بکشید",oue=()=>"اسحب لتغيير حجم اللوحة",cue=()=>"Arrastra para cambiar el tamaño del panel",lue=()=>"पैनल का आकार बदलने के लिए खींचें",uue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iue():t==="fa"?aue():t==="ar"?oue():t==="es"?cue():t==="hi"?lue():sue()}),_ue=()=>"Drag toward the center to restore panel",fue=()=>"向中央拖动以恢复面板",due=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",hue=()=>"اسحب نحو المنتصف لاستعادة اللوحة",pue=()=>"Arrastra hacia el centro para restaurar el panel",mue=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",gue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fue():t==="fa"?due():t==="ar"?hue():t==="es"?pue():t==="hi"?mue():_ue()}),vue=()=>"Entire project",bue=()=>"整个项目",yue=()=>"کل پروژه",xue=()=>"المشروع بالكامل",wue=()=>"Todo el proyecto",kue=()=>"पूरा प्रोजेक्ट",bN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bue():t==="fa"?yue():t==="ar"?xue():t==="es"?wue():t==="hi"?kue():vue()}),Sue=()=>"Expand panel",Cue=()=>"展开面板",Eue=()=>"گسترش پنل",Nue=()=>"توسيع اللوحة",zue=()=>"Expandir panel",jue=()=>"पैनल फैलाएं",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cue():t==="fa"?Eue():t==="ar"?Nue():t==="es"?zue():t==="hi"?jue():Sue()}),Aue=e=>`Experiment filter: ${e==null?void 0:e.scope}`,Tue=e=>`实验筛选:${e==null?void 0:e.scope}`,Rue=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Mue=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,Oue=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Due=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Lue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tue(e):t==="fa"?Rue(e):t==="ar"?Mue(e):t==="es"?Oue(e):t==="hi"?Due(e):Aue(e)}),Iue=()=>"Experiment view",$ue=()=>"实验视图",Bue=()=>"نمای آزمایش",Pue=()=>"عرض التجربة",Fue=()=>"Vista de experimento",Hue=()=>"प्रयोग व्यू",que=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ue():t==="fa"?Bue():t==="ar"?Pue():t==="es"?Fue():t==="hi"?Hue():Iue()}),Uue=()=>"Experiments",Gue=()=>"实验",Vue=()=>"آزمایش‌ها",Kue=()=>"التجارب",Wue=()=>"Experimentos",Que=()=>"प्रयोग",rL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gue():t==="fa"?Vue():t==="ar"?Kue():t==="es"?Wue():t==="hi"?Que():Uue()}),Xue=()=>"Files",Yue=()=>"文件",Zue=()=>"فایل‌ها",Jue=()=>"الملفات",e_e=()=>"Archivos",t_e=()=>"फ़ाइलें",O3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yue():t==="fa"?Zue():t==="ar"?Jue():t==="es"?e_e():t==="hi"?t_e():Xue()}),n_e=()=>"Filter experiments",r_e=()=>"筛选实验",s_e=()=>"فیلتر آزمایش‌ها",i_e=()=>"تصفية التجارب",a_e=()=>"Filtrar experimentos",o_e=()=>"प्रयोग फ़िल्टर करें",c_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r_e():t==="fa"?s_e():t==="ar"?i_e():t==="es"?a_e():t==="hi"?o_e():n_e()}),l_e=()=>"Current task filtering is unavailable for unattributed experiments",u_e=()=>"存在无法归属的实验时,不能按当前任务筛选",__e=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",f_e=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",d_e=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",h_e=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",p_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u_e():t==="fa"?__e():t==="ar"?f_e():t==="es"?d_e():t==="hi"?h_e():l_e()}),m_e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",g_e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",v_e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",b_e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",y_e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",x_e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",w_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g_e():t==="fa"?v_e():t==="ar"?b_e():t==="es"?y_e():t==="hi"?x_e():m_e()}),k_e=()=>"Open a task to filter to its experiments",S_e=()=>"请打开一个任务以筛选其实验",C_e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",E_e=()=>"افتح مهمة لعرض تجاربها فقط",N_e=()=>"Abre una tarea para filtrar por sus experimentos",z_e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",j_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S_e():t==="fa"?C_e():t==="ar"?E_e():t==="es"?N_e():t==="hi"?z_e():k_e()}),A_e=()=>"projects",T_e=()=>"项目",R_e=()=>"پروژه‌ها",M_e=()=>"المشاريع",O_e=()=>"los proyectos",D_e=()=>"प्रोजेक्ट",M0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T_e():t==="fa"?R_e():t==="ar"?M_e():t==="es"?O_e():t==="hi"?D_e():A_e()}),L_e=()=>"Restore panel",I_e=()=>"还原面板",$_e=()=>"بازگرداندن اندازهٔ پنل",B_e=()=>"استعادة اللوحة",P_e=()=>"Restaurar panel",F_e=()=>"पैनल वापस लाएं",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I_e():t==="fa"?$_e():t==="ar"?B_e():t==="es"?P_e():t==="hi"?F_e():L_e()}),H_e=()=>"Retry",q_e=()=>"重试",U_e=()=>"تلاش دوباره",G_e=()=>"إعادة المحاولة",V_e=()=>"Reintentar",K_e=()=>"फिर से कोशिश करें",Ks=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e():t==="fa"?U_e():t==="ar"?G_e():t==="es"?V_e():t==="hi"?K_e():H_e()}),W_e=()=>"Select a project to browse its files.",Q_e=()=>"选择一个项目以浏览其文件。",X_e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Y_e=()=>"اختر مشروعًا لتصفح ملفاته.",Z_e=()=>"Selecciona un proyecto para explorar sus archivos.",J_e=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",efe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q_e():t==="fa"?X_e():t==="ar"?Y_e():t==="es"?Z_e():t==="hi"?J_e():W_e()}),tfe=()=>"settings",nfe=()=>"设置",rfe=()=>"تنظیمات",sfe=()=>"الإعدادات",ife=()=>"la configuración",afe=()=>"सेटिंग्स",ofe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nfe():t==="fa"?rfe():t==="ar"?sfe():t==="es"?ife():t==="hi"?afe():tfe()}),cfe=()=>"Show archived",lfe=()=>"显示已归档",ufe=()=>"نمایش بایگانی‌شده‌ها",_fe=()=>"إظهار المؤرشف",ffe=()=>"Mostrar archivados",dfe=()=>"संग्रहीत दिखाएँ",hfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lfe():t==="fa"?ufe():t==="ar"?_fe():t==="es"?ffe():t==="hi"?dfe():cfe()}),pfe=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,mfe=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,gfe=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,vfe=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,bfe=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,yfe=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,xfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mfe(e):t==="fa"?gfe(e):t==="ar"?vfe(e):t==="es"?bfe(e):t==="hi"?yfe(e):pfe(e)}),wfe=()=>"Sub-agent",kfe=()=>"子智能体",Sfe=()=>"عامل فرعی",Cfe=()=>"وكيل فرعي",Efe=()=>"Subagente",Nfe=()=>"सब-एजेंट",zfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kfe():t==="fa"?Sfe():t==="ar"?Cfe():t==="es"?Efe():t==="hi"?Nfe():wfe()}),jfe=()=>"Table",Afe=()=>"表格",Tfe=()=>"جدول",Rfe=()=>"جدول",Mfe=()=>"Tabla",Ofe=()=>"टेबल",Dfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Afe():t==="fa"?Tfe():t==="ar"?Rfe():t==="es"?Mfe():t==="hi"?Ofe():jfe()}),Lfe=()=>"Tree",Ife=()=>"树状图",$fe=()=>"درخت",Bfe=()=>"شجرة",Pfe=()=>"Árbol",Ffe=()=>"ट्री",Hfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ife():t==="fa"?$fe():t==="ar"?Bfe():t==="es"?Pfe():t==="hi"?Ffe():Lfe()}),qfe=e=>`Collapse ${e==null?void 0:e.name}`,Ufe=e=>`折叠 ${e==null?void 0:e.name}`,Gfe=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Vfe=e=>`طيّ ${e==null?void 0:e.name}`,Kfe=e=>`Contraer ${e==null?void 0:e.name}`,Wfe=e=>`${e==null?void 0:e.name} समेटें`,Qfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ufe(e):t==="fa"?Gfe(e):t==="ar"?Vfe(e):t==="es"?Kfe(e):t==="hi"?Wfe(e):qfe(e)}),Xfe=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Yfe=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Zfe=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Jfe=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,ede=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,tde=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,kS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yfe(e):t==="fa"?Zfe(e):t==="ar"?Jfe(e):t==="es"?ede(e):t==="hi"?tde(e):Xfe(e)}),nde=e=>`Delete folder ${e==null?void 0:e.name}`,rde=e=>`删除文件夹 ${e==null?void 0:e.name}`,sde=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,ide=e=>`حذف المجلد ${e==null?void 0:e.name}`,ade=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,ode=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,cde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rde(e):t==="fa"?sde(e):t==="ar"?ide(e):t==="es"?ade(e):t==="hi"?ode(e):nde(e)}),lde=e=>`Expand ${e==null?void 0:e.name}`,ude=e=>`展开 ${e==null?void 0:e.name}`,_de=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,fde=e=>`توسيع ${e==null?void 0:e.name}`,dde=e=>`Expandir ${e==null?void 0:e.name}`,hde=e=>`${e==null?void 0:e.name} फैलाएं`,pde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ude(e):t==="fa"?_de(e):t==="ar"?fde(e):t==="es"?dde(e):t==="hi"?hde(e):lde(e)}),mde=()=>"Binary or unsupported file — no inline preview.",gde=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",vde=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",bde=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",yde=()=>"Archivo binario o no compatible — sin vista previa.",xde=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",wde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gde():t==="fa"?vde():t==="ar"?bde():t==="es"?yde():t==="hi"?xde():mde()}),kde=()=>"Copy path",Sde=()=>"复制路径",Cde=()=>"کپی مسیر",Ede=()=>"نسخ المسار",Nde=()=>"Copiar ruta",zde=()=>"पथ कॉपी करें",jde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sde():t==="fa"?Cde():t==="ar"?Ede():t==="es"?Nde():t==="hi"?zde():kde()}),Ade=()=>"Artifact not found",Tde=()=>"找不到产物",Rde=()=>"خروجی پیدا نشد",Mde=()=>"لم يُعثر على المُخرَج",Ode=()=>"No se encontró el artefacto",Dde=()=>"आर्टिफ़ैक्ट नहीं मिला",Lde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tde():t==="fa"?Rde():t==="ar"?Mde():t==="es"?Ode():t==="hi"?Dde():Ade()}),Ide=()=>"Open raw",$de=()=>"打开原始文件",Bde=()=>"باز کردن فایل خام",Pde=()=>"فتح الملف الخام",Fde=()=>"Abrir sin formato",Hde=()=>"रॉ खोलें",qde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$de():t==="fa"?Bde():t==="ar"?Pde():t==="es"?Fde():t==="hi"?Hde():Ide()}),Ude=()=>"Click an artifact to view it",Gde=()=>"点击产物即可查看",Vde=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Kde=()=>"انقر على مُخرَج لعرضه",Wde=()=>"Selecciona un artefacto para verlo",Qde=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gde():t==="fa"?Vde():t==="ar"?Kde():t==="es"?Wde():t==="hi"?Qde():Ude()}),Yde=()=>"Delete artifact",Zde=()=>"删除产物",Jde=()=>"حذف خروجی",ehe=()=>"حذف المُخرَج",the=()=>"Eliminar artefacto",nhe=()=>"आर्टिफ़ैक्ट हटाएं",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zde():t==="fa"?Jde():t==="ar"?ehe():t==="es"?the():t==="hi"?nhe():Yde()}),rhe=()=>"Delete folder",she=()=>"删除文件夹",ihe=()=>"حذف پوشه",ahe=()=>"حذف المجلد",ohe=()=>"Eliminar carpeta",che=()=>"फ़ोल्डर हटाएं",lhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?she():t==="fa"?ihe():t==="ar"?ahe():t==="es"?ohe():t==="hi"?che():rhe()}),uhe=()=>"Failed to load:",_he=()=>"加载失败:",fhe=()=>"بارگیری ناموفق بود:",dhe=()=>"تعذّر التحميل:",hhe=()=>"Error al cargar:",phe=()=>"लोड नहीं हो सका:",mhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_he():t==="fa"?fhe():t==="ar"?dhe():t==="es"?hhe():t==="hi"?phe():uhe()}),ghe=()=>"File truncated — showing the first 512 KB.",vhe=()=>"文件已截断——仅显示前 512 KB。",bhe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",yhe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",xhe=()=>"Archivo truncado — se muestran los primeros 512 KB.",whe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",khe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vhe():t==="fa"?bhe():t==="ar"?yhe():t==="es"?xhe():t==="hi"?whe():ghe()}),She=()=>"Listing truncated — the folder has more artifacts.",Che=()=>"列表已截断——文件夹中还有更多产物。",Ehe=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Nhe=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",zhe=()=>"Listado truncado — la carpeta tiene más artefactos.",jhe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Ahe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Che():t==="fa"?Ehe():t==="ar"?Nhe():t==="es"?zhe():t==="hi"?jhe():She()}),The=()=>"Loading…",Rhe=()=>"正在加载…",Mhe=()=>"در حال بارگیری…",Ohe=()=>"جارٍ التحميل…",Dhe=()=>"Cargando…",Lhe=()=>"लोड हो रहा है…",sL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rhe():t==="fa"?Mhe():t==="ar"?Ohe():t==="es"?Dhe():t==="hi"?Lhe():The()}),Ihe=()=>"Loading artifacts…",$he=()=>"正在加载产物…",Bhe=()=>"در حال بارگیری خروجی‌ها…",Phe=()=>"جارٍ تحميل المُخرَجات…",Fhe=()=>"Cargando artefactos…",Hhe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",qhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$he():t==="fa"?Bhe():t==="ar"?Phe():t==="es"?Fhe():t==="hi"?Hhe():Ihe()}),Uhe=()=>"Modified",Ghe=()=>"修改时间",Vhe=()=>"ویرایش‌شده",Khe=()=>"عُدّل",Whe=()=>"Modificado",Qhe=()=>"बदला गया",Xhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghe():t==="fa"?Vhe():t==="ar"?Khe():t==="es"?Whe():t==="hi"?Qhe():Uhe()}),Yhe=()=>"No artifacts yet",Zhe=()=>"尚无产物",Jhe=()=>"هنوز خروجی‌ای وجود ندارد",epe=()=>"لا توجد مُخرَجات بعد",tpe=()=>"Aún no hay artefactos",npe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",rpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zhe():t==="fa"?Jhe():t==="ar"?epe():t==="es"?tpe():t==="hi"?npe():Yhe()}),spe=()=>"Open raw in new tab",ipe=()=>"在新标签页中打开原始文件",ape=()=>"باز کردن فایل خام در زبانهٔ جدید",ope=()=>"فتح الملف الخام في تبويب جديد",cpe=()=>"Abrir sin formato en una pestaña nueva",lpe=()=>"नए टैब में रॉ खोलें",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ipe():t==="fa"?ape():t==="ar"?ope():t==="es"?cpe():t==="hi"?lpe():spe()}),upe=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",_pe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",fpe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",dpe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",hpe=()=>"Este es el espacio de resultados permanente del proyecto: informes, figuras, imágenes, CSV, PDF y otros artefactos de investigación. Pídele al agente un informe o añade tus propios archivos.",ppe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",mpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pe():t==="fa"?fpe():t==="ar"?dpe():t==="es"?hpe():t==="hi"?ppe():upe()}),gpe=()=>"File too large to preview inline.",vpe=()=>"文件太大,无法内嵌预览。",bpe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",ype=()=>"الملف كبير جدًا للمعاينة المضمّنة.",xpe=()=>"El archivo es demasiado grande para previsualizarlo.",wpe=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",kpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpe():t==="fa"?bpe():t==="ar"?ype():t==="es"?xpe():t==="hi"?wpe():gpe()}),Spe=()=>"This is the baseline branch, so there is no parent comparison.",Cpe=()=>"这是基线分支,因此没有父分支可供比较。",Epe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",Npe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",zpe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",jpe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",Ape=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cpe():t==="fa"?Epe():t==="ar"?Npe():t==="es"?zpe():t==="hi"?jpe():Spe()}),Tpe=()=>"Failed to load changes:",Rpe=()=>"加载更改失败:",Mpe=()=>"بارگیری تغییرات ناموفق بود:",Ope=()=>"تعذّر تحميل التغييرات:",Dpe=()=>"Error al cargar los cambios:",Lpe=()=>"बदलाव लोड नहीं हो सके:",Ipe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rpe():t==="fa"?Mpe():t==="ar"?Ope():t==="es"?Dpe():t==="hi"?Lpe():Tpe()}),$pe=()=>"Loading changes…",Bpe=()=>"正在加载更改…",Ppe=()=>"در حال بارگیری تغییرات…",Fpe=()=>"جارٍ تحميل التغييرات…",Hpe=()=>"Cargando cambios…",qpe=()=>"बदलाव लोड हो रहे हैं…",Upe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bpe():t==="fa"?Ppe():t==="ar"?Fpe():t==="es"?Hpe():t==="hi"?qpe():$pe()}),Gpe=()=>"No committed changes from the parent branch.",Vpe=()=>"与父分支相比没有已提交的更改。",Kpe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Wpe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Qpe=()=>"No hay cambios confirmados respecto a la rama padre.",Xpe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Ype=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpe():t==="fa"?Kpe():t==="ar"?Wpe():t==="es"?Qpe():t==="hi"?Xpe():Gpe()}),Zpe=e=>`agent ${e==null?void 0:e.number}`,Jpe=e=>`智能体 ${e==null?void 0:e.number}`,e0e=e=>`عامل ${e==null?void 0:e.number}`,t0e=e=>`وكيل ${e==null?void 0:e.number}`,n0e=e=>`agente ${e==null?void 0:e.number}`,r0e=e=>`एजेंट ${e==null?void 0:e.number}`,SN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jpe(e):t==="fa"?e0e(e):t==="ar"?t0e(e):t==="es"?n0e(e):t==="hi"?r0e(e):Zpe(e)}),s0e=()=>"agent sessions",i0e=()=>"智能体会话",a0e=()=>"نشست‌های عامل‌ها",o0e=()=>"جلسات الوكلاء",c0e=()=>"sesiones de agente",l0e=()=>"एजेंट सेशन",u0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0e():t==="fa"?a0e():t==="ar"?o0e():t==="es"?c0e():t==="hi"?l0e():s0e()}),_0e=()=>"All sessions",f0e=()=>"所有会话",d0e=()=>"همهٔ نشست‌ها",h0e=()=>"كل الجلسات",p0e=()=>"Todas las sesiones",m0e=()=>"सभी सेशन",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f0e():t==="fa"?d0e():t==="ar"?h0e():t==="es"?p0e():t==="hi"?m0e():_0e()}),g0e=e=>`${e==null?void 0:e.count} annotations`,v0e=e=>`${e==null?void 0:e.count} 条批注`,b0e=e=>`${e==null?void 0:e.count} یادداشت`,y0e=e=>`التعليقات: ${e==null?void 0:e.count}`,x0e=e=>`${e==null?void 0:e.count} anotaciones`,w0e=e=>`${e==null?void 0:e.count} एनोटेशन`,k0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?v0e(e):t==="fa"?b0e(e):t==="ar"?y0e(e):t==="es"?x0e(e):t==="hi"?w0e(e):g0e(e)}),S0e=()=>"Archive",C0e=()=>"归档",E0e=()=>"بایگانی",N0e=()=>"أرشفة",z0e=()=>"Archivar",j0e=()=>"आर्काइव करें",A0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C0e():t==="fa"?E0e():t==="ar"?N0e():t==="es"?z0e():t==="hi"?j0e():S0e()}),T0e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",R0e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",M0e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",O0e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",D0e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",L0e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",I0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0e():t==="fa"?M0e():t==="ar"?O0e():t==="es"?D0e():t==="hi"?L0e():T0e()}),$0e=()=>"Asked about selected text",B0e=()=>"已询问所选文本",P0e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",F0e=()=>"سأل عن النص المحدد",H0e=()=>"Preguntó sobre el texto seleccionado",q0e=()=>"चयनित टेक्स्ट के बारे में पूछा",U0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0e():t==="fa"?P0e():t==="ar"?F0e():t==="es"?H0e():t==="hi"?q0e():$0e()}),G0e=()=>"Attachment",V0e=()=>"附件",K0e=()=>"پیوست",W0e=()=>"مرفق",Q0e=()=>"Adjunto",X0e=()=>"अटैचमेंट",Y0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V0e():t==="fa"?K0e():t==="ar"?W0e():t==="es"?Q0e():t==="hi"?X0e():G0e()}),Z0e=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,J0e=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,eme=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,tme=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,nme=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,rme=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,sme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J0e(e):t==="fa"?eme(e):t==="ar"?tme(e):t==="es"?nme(e):t==="hi"?rme(e):Z0e(e)}),ime=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",ame=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",ome=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",cme=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",lme=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",ume=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",_me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ame():t==="fa"?ome():t==="ar"?cme():t==="es"?lme():t==="hi"?ume():ime()}),fme=()=>"Wait for the turn to finish before running a command.",dme=()=>"请等待本轮结束后再运行命令。",hme=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",pme=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",mme=()=>"Espera a que termine el turno antes de ejecutar un comando.",gme=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",vme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dme():t==="fa"?hme():t==="ar"?pme():t==="es"?mme():t==="hi"?gme():fme()}),bme=e=>`Exited with code ${e==null?void 0:e.code}`,yme=e=>`退出码 ${e==null?void 0:e.code}`,xme=e=>`با کد ${e==null?void 0:e.code} خارج شد`,wme=e=>`خرج برمز ${e==null?void 0:e.code}`,kme=e=>`Terminó con el código ${e==null?void 0:e.code}`,Sme=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Cme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yme(e):t==="fa"?xme(e):t==="ar"?wme(e):t==="es"?kme(e):t==="hi"?Sme(e):bme(e)}),Eme=e=>`Command not run: ${e==null?void 0:e.error}`,Nme=e=>`命令未运行:${e==null?void 0:e.error}`,zme=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,jme=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,Ame=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,Tme=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,CN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nme(e):t==="fa"?zme(e):t==="ar"?jme(e):t==="es"?Ame(e):t==="hi"?Tme(e):Eme(e)}),Rme=()=>"Collapse tool activity",Mme=()=>"折叠工具活动",Ome=()=>"بستن فعالیت ابزارها",Dme=()=>"طيّ نشاط الأداة",Lme=()=>"Contraer actividad de herramientas",Ime=()=>"टूल गतिविधि समेटें",$me=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mme():t==="fa"?Ome():t==="ar"?Dme():t==="es"?Lme():t==="hi"?Ime():Rme()}),Bme=()=>"Wait for the turn to finish before compacting.",Pme=()=>"请等待本轮结束后再压缩。",Fme=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",Hme=()=>"انتظر انتهاء الجولة قبل الضغط.",qme=()=>"Espera a que termine el turno antes de comprimir.",Ume=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",Gme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pme():t==="fa"?Fme():t==="ar"?Hme():t==="es"?qme():t==="hi"?Ume():Bme()}),Vme=e=>`Compacting failed: ${e==null?void 0:e.error}`,Kme=e=>`压缩失败:${e==null?void 0:e.error}`,Wme=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,Qme=e=>`فشل الضغط: ${e==null?void 0:e.error}`,Xme=e=>`Error al comprimir: ${e==null?void 0:e.error}`,Yme=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,Zme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kme(e):t==="fa"?Wme(e):t==="ar"?Qme(e):t==="es"?Xme(e):t==="hi"?Yme(e):Vme(e)}),Jme=()=>"Continue",ege=()=>"继续",tge=()=>"ادامه",nge=()=>"متابعة",rge=()=>"Continuar",sge=()=>"जारी रखें",ige=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ege():t==="fa"?tge():t==="ar"?nge():t==="es"?rge():t==="hi"?sge():Jme()}),age=()=>"Copy response",oge=()=>"复制回复",cge=()=>"کپی پاسخ",lge=()=>"نسخ الرد",uge=()=>"Copiar respuesta",_ge=()=>"जवाब कॉपी करें",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oge():t==="fa"?cge():t==="ar"?lge():t==="es"?uge():t==="hi"?_ge():age()}),fge=e=>`Delete “${e==null?void 0:e.title}”? Its transcript will be permanently removed.`,dge=e=>`删除“${e==null?void 0:e.title}”? @@ -75,25 +75,25 @@ Its transcript will be permanently removed.`,dge=e=>`删除“${e==null?void 0:e Su transcripción se eliminará de forma permanente.`,gge=e=>`“${e==null?void 0:e.title}” हटाएं? -इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,vge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dge(e):t==="fa"?hge(e):t==="ar"?pge(e):t==="es"?mge(e):t==="hi"?gge(e):fge(e)}),bge=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,yge=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,xge=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,wge=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,kge=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,Sge=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,Cge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yge(e):t==="fa"?xge(e):t==="ar"?wge(e):t==="es"?kge(e):t==="hi"?Sge(e):bge(e)}),Ege=()=>"Could not exit Plan mode. Try again.",Nge=()=>"无法退出计划模式。请重试。",zge=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",jge=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",Age=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",Tge=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",Rge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nge():t==="fa"?zge():t==="ar"?jge():t==="es"?Age():t==="hi"?Tge():Ege()}),Mge=()=>"Expand tool activity",Oge=()=>"展开工具活动",Dge=()=>"باز کردن فعالیت ابزارها",Lge=()=>"توسيع نشاط الأداة",Ige=()=>"Expandir actividad de herramientas",$ge=()=>"टूल गतिविधि फैलाएं",Bge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oge():t==="fa"?Dge():t==="ar"?Lge():t==="es"?Ige():t==="hi"?$ge():Mge()}),Pge=()=>"experiments",Fge=()=>"实验",Hge=()=>"آزمایش‌ها",qge=()=>"التجارب",Uge=()=>"experimentos",Gge=()=>"प्रयोग",Vge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fge():t==="fa"?Hge():t==="ar"?qge():t==="es"?Uge():t==="hi"?Gge():Pge()}),Kge=()=>"You",Wge=()=>"你",Qge=()=>"شما",Xge=()=>"أنت",Yge=()=>"Tú",Zge=()=>"आप",Jge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wge():t==="fa"?Qge():t==="ar"?Xge():t==="es"?Yge():t==="hi"?Zge():Kge()}),e1e=()=>"Goal cleared",t1e=()=>"已清除目标",n1e=()=>"هدف پاک شد",r1e=()=>"تم مسح الهدف",s1e=()=>"Objetivo borrado",i1e=()=>"लक्ष्य हटाया गया",a1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t1e():t==="fa"?n1e():t==="ar"?r1e():t==="es"?s1e():t==="hi"?i1e():e1e()}),o1e=e=>`Current goal: ${e==null?void 0:e.goal}`,c1e=e=>`当前目标:${e==null?void 0:e.goal}`,l1e=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,u1e=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,_1e=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,f1e=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,d1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c1e(e):t==="fa"?l1e(e):t==="ar"?u1e(e):t==="es"?_1e(e):t==="hi"?f1e(e):o1e(e)}),h1e=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,p1e=e=>`设置目标失败:${e==null?void 0:e.error}`,m1e=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,g1e=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,v1e=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,b1e=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,NN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?p1e(e):t==="fa"?m1e(e):t==="ar"?g1e(e):t==="es"?v1e(e):t==="hi"?b1e(e):h1e(e)}),y1e=()=>"No goal set — add one after /goal",x1e=()=>"尚未设置目标 — 在 /goal 后面写一个",w1e=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",k1e=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",S1e=()=>"Sin objetivo — añade uno después de /goal",C1e=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",E1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x1e():t==="fa"?w1e():t==="ar"?k1e():t==="es"?S1e():t==="hi"?C1e():y1e()}),N1e=()=>"Goal set",z1e=()=>"已设置目标",j1e=()=>"هدف تنظیم شد",A1e=()=>"تم تعيين الهدف",T1e=()=>"Objetivo definido",R1e=()=>"लक्ष्य सेट किया गया",M1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z1e():t==="fa"?j1e():t==="ar"?A1e():t==="es"?T1e():t==="hi"?R1e():N1e()}),O1e=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,D1e=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,L1e=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,I1e=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,$1e=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,B1e=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,P1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D1e(e):t==="fa"?L1e(e):t==="ar"?I1e(e):t==="es"?$1e(e):t==="hi"?B1e(e):O1e(e)}),F1e=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,H1e=e=>`导入该聊天失败:${e==null?void 0:e.error}`,q1e=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,U1e=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,G1e=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,V1e=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,K1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H1e(e):t==="fa"?q1e(e):t==="ar"?U1e(e):t==="es"?G1e(e):t==="hi"?V1e(e):F1e(e)}),W1e=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Q1e=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,X1e=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Y1e=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Z1e=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,J1e=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,eve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q1e(e):t==="fa"?X1e(e):t==="ar"?Y1e(e):t==="es"?Z1e(e):t==="hi"?J1e(e):W1e(e)}),tve=e=>`Message not sent: ${e==null?void 0:e.error}`,nve=e=>`消息未发送:${e==null?void 0:e.error}`,rve=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,sve=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,ive=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,ave=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,ove=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nve(e):t==="fa"?rve(e):t==="ar"?sve(e):t==="es"?ive(e):t==="hi"?ave(e):tve(e)}),cve=()=>"Model unavailable",lve=()=>"模型不可用",uve=()=>"مدل در دسترس نیست",_ve=()=>"النموذج غير متاح",fve=()=>"Modelo no disponible",dve=()=>"मॉडल उपलब्ध नहीं",hve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lve():t==="fa"?uve():t==="ar"?_ve():t==="es"?fve():t==="hi"?dve():cve()}),pve=()=>"No activity",mve=()=>"无活动",gve=()=>"بدون فعالیت",vve=()=>"لا يوجد نشاط",bve=()=>"Sin actividad",yve=()=>"कोई गतिविधि नहीं",xve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():pve()}),wve=()=>"No archived sessions",kve=()=>"没有已归档的会话",Sve=()=>"نشست بایگانی‌شده‌ای وجود ندارد",Cve=()=>"لا توجد جلسات مؤرشفة",Eve=()=>"No hay sesiones archivadas",Nve=()=>"कोई आर्काइव किया गया सेशन नहीं",zve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kve():t==="fa"?Sve():t==="ar"?Cve():t==="es"?Eve():t==="hi"?Nve():wve()}),jve=()=>"No sessions yet",Ave=()=>"还没有会话",Tve=()=>"هنوز نشستی وجود ندارد",Rve=()=>"لا توجد جلسات بعد",Mve=()=>"Aún no hay sesiones",Ove=()=>"अभी तक कोई सेशन नहीं",Dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ave():t==="fa"?Tve():t==="ar"?Rve():t==="es"?Mve():t==="hi"?Ove():jve()}),Lve=()=>"There is nothing to compact yet",Ive=()=>"还没有可压缩的内容",$ve=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",Bve=()=>"لا يوجد شيء لضغطه بعد",Pve=()=>"Aún no hay nada que comprimir",Fve=()=>"छोटा करने के लिए अभी कुछ नहीं है",Hve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ive():t==="fa"?$ve():t==="ar"?Bve():t==="es"?Pve():t==="hi"?Fve():Lve()}),qve=()=>"No response to copy yet",Uve=()=>"还没有可复制的回复",Gve=()=>"هنوز پاسخی برای کپی وجود ندارد",Vve=()=>"لا يوجد رد لنسخه بعد",Kve=()=>"Aún no hay ninguna respuesta que copiar",Wve=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",Qve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uve():t==="fa"?Gve():t==="ar"?Vve():t==="es"?Kve():t==="hi"?Wve():qve()}),Xve=()=>"Nothing to export yet",Yve=()=>"还没有可导出的内容",Zve=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",Jve=()=>"لا يوجد شيء لتصديره بعد",ebe=()=>"Aún no hay nada que exportar",tbe=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",nbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yve():t==="fa"?Zve():t==="ar"?Jve():t==="es"?ebe():t==="hi"?tbe():Xve()}),rbe=()=>"1 annotation",sbe=()=>"1 条批注",ibe=()=>"۱ یادداشت",abe=()=>"تعليق واحد",obe=()=>"1 anotación",cbe=()=>"1 एनोटेशन",lbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sbe():t==="fa"?ibe():t==="ar"?abe():t==="es"?obe():t==="hi"?cbe():rbe()}),ube=()=>"Open sub-agent transcript",_be=()=>"打开子智能体记录",fbe=()=>"باز کردن متن گفت‌وگوی عامل فرعی",dbe=()=>"فتح سجل محادثة الوكيل الفرعي",hbe=()=>"Abrir la transcripción del subagente",pbe=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",mbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_be():t==="fa"?fbe():t==="ar"?dbe():t==="es"?hbe():t==="hi"?pbe():ube()}),gbe=()=>"About this demo",vbe=()=>"关于此演示",bbe=()=>"دربارهٔ این نسخهٔ نمایشی",ybe=()=>"حول هذا العرض التوضيحي",xbe=()=>"Acerca de esta demo",wbe=()=>"इस डेमो के बारे में",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vbe():t==="fa"?bbe():t==="ar"?ybe():t==="es"?xbe():t==="hi"?wbe():gbe()}),kbe=()=>"Accept and auto mode",Sbe=()=>"接受并使用自动模式",Cbe=()=>"پذیرش و حالت خودکار",Ebe=()=>"قبول وتفعيل الوضع التلقائي",Nbe=()=>"Aceptar en modo automático",zbe=()=>"स्वीकार करें और ऑटो मोड",jbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sbe():t==="fa"?Cbe():t==="ar"?Ebe():t==="es"?Nbe():t==="hi"?zbe():kbe()}),Abe=()=>"Accept and bypass all",Tbe=()=>"接受并跳过所有审批",Rbe=()=>"پذیرش و عبور از همهٔ تأییدها",Mbe=()=>"القبول وتجاوز الكل",Obe=()=>"Aceptar y omitir permisos",Dbe=()=>"स्वीकार करें और सब बायपास करें",Lbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tbe():t==="fa"?Rbe():t==="ar"?Mbe():t==="es"?Obe():t==="hi"?Dbe():Abe()}),Ibe=()=>"Active",$be=()=>"活跃",Bbe=()=>"فعال",Pbe=()=>"نشط",Fbe=()=>"Activas",Hbe=()=>"सक्रिय",qbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$be():t==="fa"?Bbe():t==="ar"?Pbe():t==="es"?Fbe():t==="hi"?Hbe():Ibe()}),Ube=()=>"All",Gbe=()=>"全部",Vbe=()=>"همه",Kbe=()=>"الكل",Wbe=()=>"Todas",Qbe=()=>"सभी",Xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbe():t==="fa"?Vbe():t==="ar"?Kbe():t==="es"?Wbe():t==="hi"?Qbe():Ube()}),Ybe=()=>"Allow",Zbe=()=>"允许",Jbe=()=>"اجازه دادن",eye=()=>"السماح",tye=()=>"Permitir",nye=()=>"अनुमति दें",rye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zbe():t==="fa"?Jbe():t==="ar"?eye():t==="es"?tye():t==="hi"?nye():Ybe()}),sye=()=>"Approval required",iye=()=>"需要批准",aye=()=>"نیازمند تأیید",oye=()=>"الموافقة مطلوبة",cye=()=>"Aprobación necesaria",lye=()=>"स्वीकृति ज़रूरी है",uye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iye():t==="fa"?aye():t==="ar"?oye():t==="es"?cye():t==="hi"?lye():sye()}),_ye=()=>"Archived",fye=()=>"已归档",dye=()=>"بایگانی‌شده",hye=()=>"مؤرشف",pye=()=>"Archivadas",mye=()=>"आर्काइव किया गया",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():_ye()}),gye=()=>"Ask about this",vye=()=>"询问此内容",bye=()=>"دربارهٔ این بپرسید",yye=()=>"اسأل عن هذا",xye=()=>"Preguntar sobre esto",wye=()=>"इसके बारे में पूछें",kye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vye():t==="fa"?bye():t==="ar"?yye():t==="es"?xye():t==="hi"?wye():gye()}),Sye=()=>"Attach a PDF or image",Cye=()=>"附加 PDF 或图片",Eye=()=>"پیوست PDF یا تصویر",Nye=()=>"إرفاق ملف PDF أو صورة",zye=()=>"Adjuntar un PDF o una imagen",jye=()=>"PDF या इमेज अटैच करें",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cye():t==="fa"?Eye():t==="ar"?Nye():t==="es"?zye():t==="hi"?jye():Sye()}),Aye=()=>"Bash",Tye=()=>"Bash",Rye=()=>"Bash",Mye=()=>"Bash",Oye=()=>"Bash",Dye=()=>"Bash",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tye():t==="fa"?Rye():t==="ar"?Mye():t==="es"?Oye():t==="hi"?Dye():Aye()}),Lye=()=>"Browsed the web",Iye=()=>"已浏览网页",$ye=()=>"وب مرور شد",Bye=()=>"تصفّح الويب",Pye=()=>"Navegó por la web",Fye=()=>"वेब ब्राउज़ किया",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iye():t==="fa"?$ye():t==="ar"?Bye():t==="es"?Pye():t==="hi"?Fye():Lye()}),Hye=()=>"Built the project",qye=()=>"已构建项目",Uye=()=>"پروژه ساخته شد",Gye=()=>"بنى المشروع",Vye=()=>"Compiló el proyecto",Kye=()=>"प्रोजेक्ट बिल्ड किया",Wye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qye():t==="fa"?Uye():t==="ar"?Gye():t==="es"?Vye():t==="hi"?Kye():Hye()}),Qye=()=>"Cancel",Xye=()=>"取消",Yye=()=>"لغو",Zye=()=>"إلغاء",Jye=()=>"Cancelar",exe=()=>"रद्द करें",txe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xye():t==="fa"?Yye():t==="ar"?Zye():t==="es"?Jye():t==="hi"?exe():Qye()}),nxe=()=>"Cancelled an experiment run",rxe=()=>"已取消实验运行",sxe=()=>"اجرای آزمایش لغو شد",ixe=()=>"ألغى تشغيل تجربة",axe=()=>"Canceló una ejecución de experimento",oxe=()=>"एक प्रयोग रन रद्द किया",cxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rxe():t==="fa"?sxe():t==="ar"?ixe():t==="es"?axe():t==="hi"?oxe():nxe()}),lxe=()=>"Checked code style",uxe=()=>"已检查代码风格",_xe=()=>"سبک کد بررسی شد",fxe=()=>"فحص نمط الشيفرة",dxe=()=>"Revisó el estilo del código",hxe=()=>"कोड स्टाइल जाँची",pxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uxe():t==="fa"?_xe():t==="ar"?fxe():t==="es"?dxe():t==="hi"?hxe():lxe()}),mxe=()=>"Checked compute options",gxe=()=>"已检查算力选项",vxe=()=>"گزینه‌های رایانشی بررسی شد",bxe=()=>"فحص خيارات الحوسبة",yxe=()=>"Consultó las opciones de cómputo",xxe=()=>"कंप्यूट विकल्प जाँचे",wxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():mxe()}),kxe=()=>"Checked experiment status",Sxe=()=>"已检查实验状态",Cxe=()=>"وضعیت آزمایش بررسی شد",Exe=()=>"فحص حالة التجربة",Nxe=()=>"Consultó el estado del experimento",zxe=()=>"प्रयोग की स्थिति जाँची",RN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxe():t==="fa"?Cxe():t==="ar"?Exe():t==="es"?Nxe():t==="hi"?zxe():kxe()}),jxe=()=>"Checked Git status",Axe=()=>"已检查 Git 状态",Txe=()=>"وضعیت Git بررسی شد",Rxe=()=>"فحص حالة Git",Mxe=()=>"Consultó el estado de Git",Oxe=()=>"Git स्थिति जाँची",Dxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Axe():t==="fa"?Txe():t==="ar"?Rxe():t==="es"?Mxe():t==="hi"?Oxe():jxe()}),Lxe=()=>"Checked local times",Ixe=()=>"已查询当地时间",$xe=()=>"زمان‌های محلی بررسی شد",Bxe=()=>"فحص التوقيتات المحلية",Pxe=()=>"Consultó horas locales",Fxe=()=>"स्थानीय समय जाँचे",Hxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ixe():t==="fa"?$xe():t==="ar"?Bxe():t==="es"?Pxe():t==="hi"?Fxe():Lxe()}),qxe=()=>"Checked market data",Uxe=()=>"已查询市场数据",Gxe=()=>"داده‌های بازار بررسی شد",Vxe=()=>"فحص بيانات السوق",Kxe=()=>"Consultó datos de mercado",Wxe=()=>"बाज़ार डेटा जाँचा",Qxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uxe():t==="fa"?Gxe():t==="ar"?Vxe():t==="es"?Kxe():t==="hi"?Wxe():qxe()}),Xxe=()=>"Checked sports data",Yxe=()=>"已查询体育数据",Zxe=()=>"داده‌های ورزشی بررسی شد",Jxe=()=>"فحص البيانات الرياضية",e2e=()=>"Consultó datos deportivos",t2e=()=>"खेल डेटा जाँचा",n2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxe():t==="fa"?Zxe():t==="ar"?Jxe():t==="es"?e2e():t==="hi"?t2e():Xxe()}),r2e=()=>"Checked the weather",s2e=()=>"已查询天气",i2e=()=>"آب‌وهوا بررسی شد",a2e=()=>"فحص حالة الطقس",o2e=()=>"Consultó el tiempo",c2e=()=>"मौसम जाँचा",l2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s2e():t==="fa"?i2e():t==="ar"?a2e():t==="es"?o2e():t==="hi"?c2e():r2e()}),u2e=()=>"Checked types",_2e=()=>"已检查类型",f2e=()=>"نوع‌ها بررسی شد",d2e=()=>"فحص الأنواع",h2e=()=>"Comprobó los tipos",p2e=()=>"टाइप जाँचे",m2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_2e():t==="fa"?f2e():t==="ar"?d2e():t==="es"?h2e():t==="hi"?p2e():u2e()}),g2e=()=>"Clear annotations",v2e=()=>"清除批注",b2e=()=>"پاک کردن یادداشت‌ها",y2e=()=>"مسح التعليقات",x2e=()=>"Borrar anotaciones",w2e=()=>"एनोटेशन साफ़ करें",MN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v2e():t==="fa"?b2e():t==="ar"?y2e():t==="es"?x2e():t==="hi"?w2e():g2e()}),k2e=e=>`Clear the goal: ${e==null?void 0:e.goal}`,S2e=e=>`清除目标:${e==null?void 0:e.goal}`,C2e=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,E2e=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,N2e=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,z2e=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,ON=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?S2e(e):t==="fa"?C2e(e):t==="ar"?E2e(e):t==="es"?N2e(e):t==="hi"?z2e(e):k2e(e)}),j2e=()=>"Customize",A2e=()=>"自定义",T2e=()=>"سفارشی‌سازی",R2e=()=>"تخصيص",M2e=()=>"Personalizar",O2e=()=>"कस्टमाइज़ करें",D2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2e():t==="fa"?T2e():t==="ar"?R2e():t==="es"?M2e():t==="hi"?O2e():j2e()}),L2e=()=>"Data sources",I2e=()=>"数据源",$2e=()=>"منابع داده",B2e=()=>"مصادر البيانات",P2e=()=>"Fuentes de datos",F2e=()=>"डेटा स्रोत",bw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I2e():t==="fa"?$2e():t==="ar"?B2e():t==="es"?P2e():t==="hi"?F2e():L2e()}),H2e=()=>"Delegated a task to a new agent",q2e=()=>"已将任务委派给新智能体",U2e=()=>"وظیفه به عامل جدید واگذار شد",G2e=()=>"فوّض مهمة إلى وكيل جديد",V2e=()=>"Delegó una tarea a un nuevo agente",K2e=()=>"एक नए एजेंट को टास्क सौंपा",W2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2e():t==="fa"?U2e():t==="ar"?G2e():t==="es"?V2e():t==="hi"?K2e():H2e()}),Q2e=()=>"Delete",X2e=()=>"删除",Y2e=()=>"حذف",Z2e=()=>"حذف",J2e=()=>"Eliminar",ewe=()=>"हटाएं",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2e():t==="fa"?Y2e():t==="ar"?Z2e():t==="es"?J2e():t==="hi"?ewe():Q2e()}),twe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",nwe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",rwe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",swe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",iwe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",awe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",owe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nwe():t==="fa"?rwe():t==="ar"?swe():t==="es"?iwe():t==="hi"?awe():twe()}),cwe=()=>"to monitor it.",lwe=()=>"以查看进度。",uwe=()=>"بزنید.",_we=()=>"لمتابعتها.",fwe=()=>"para seguirlo.",dwe=()=>"इस पर नज़र रखने के लिए।",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lwe():t==="fa"?uwe():t==="ar"?_we():t==="es"?fwe():t==="hi"?dwe():cwe()}),hwe=()=>"The experiment is now running. Tap",pwe=()=>"实验正在运行。点按",mwe=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",gwe=()=>"التجربة قيد التشغيل الآن. اضغط على",vwe=()=>"El experimento ya se está ejecutando. Pulsa",bwe=()=>"प्रयोग अब चल रहा है। टैप करें",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwe():t==="fa"?mwe():t==="ar"?gwe():t==="es"?vwe():t==="hi"?bwe():hwe()}),ywe=()=>"Deny",xwe=()=>"拒绝",wwe=()=>"رد کردن",kwe=()=>"رفض",Swe=()=>"Denegar",Cwe=()=>"अस्वीकार करें",Ewe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xwe():t==="fa"?wwe():t==="ar"?kwe():t==="es"?Swe():t==="hi"?Cwe():ywe()}),Nwe=()=>"Dismiss",zwe=()=>"关闭",jwe=()=>"بستن",Awe=()=>"إغلاق",Twe=()=>"Cerrar",Rwe=()=>"खारिज करें",w1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwe():t==="fa"?jwe():t==="ar"?Awe():t==="es"?Twe():t==="hi"?Rwe():Nwe()}),Mwe=()=>"Edit and re-send",Owe=()=>"编辑并重新发送",Dwe=()=>"ویرایش و ارسال دوباره",Lwe=()=>"تعديل وإعادة الإرسال",Iwe=()=>"Editar y reenviar",$we=()=>"संपादित करें और फिर भेजें",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Owe():t==="fa"?Dwe():t==="ar"?Lwe():t==="es"?Iwe():t==="hi"?$we():Mwe()}),Bwe=()=>"Edit message",Pwe=()=>"编辑消息",Fwe=()=>"ویرایش پیام",Hwe=()=>"تعديل الرسالة",qwe=()=>"Editar mensaje",Uwe=()=>"संदेश संपादित करें",Gwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pwe():t==="fa"?Fwe():t==="ar"?Hwe():t==="es"?qwe():t==="hi"?Uwe():Bwe()}),Vwe=()=>"Edited a file",Kwe=()=>"已编辑文件",Wwe=()=>"فایل ویرایش شد",Qwe=()=>"عدّل ملفًا",Xwe=()=>"Editó un archivo",Ywe=()=>"एक फ़ाइल संपादित की",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kwe():t==="fa"?Wwe():t==="ar"?Qwe():t==="es"?Xwe():t==="hi"?Ywe():Vwe()}),Zwe=()=>"Exit Bash mode",Jwe=()=>"退出 Bash 模式",e4e=()=>"خروج از حالت Bash",t4e=()=>"الخروج من وضع Bash",n4e=()=>"Salir del modo Bash",r4e=()=>"Bash मोड से बाहर निकलें",BN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jwe():t==="fa"?e4e():t==="ar"?t4e():t==="es"?n4e():t==="hi"?r4e():Zwe()}),s4e=()=>"Exit Plan mode",i4e=()=>"退出计划模式",a4e=()=>"خروج از حالت طرح",o4e=()=>"الخروج من وضع التخطيط",c4e=()=>"Salir del modo Plan",l4e=()=>"प्लान मोड से बाहर निकलें",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i4e():t==="fa"?a4e():t==="ar"?o4e():t==="es"?c4e():t==="hi"?l4e():s4e()}),u4e=()=>"Failed:",_4e=()=>"失败:",f4e=()=>"ناموفق:",d4e=()=>"فشل:",h4e=()=>"Error:",p4e=()=>"विफल:",SS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_4e():t==="fa"?f4e():t==="ar"?d4e():t==="es"?h4e():t==="hi"?p4e():u4e()}),m4e=()=>"Filter sessions",g4e=()=>"筛选会话",v4e=()=>"فیلتر نشست‌ها",b4e=()=>"تصفية الجلسات",y4e=()=>"Filtrar sesiones",x4e=()=>"सेशन फ़िल्टर करें",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g4e():t==="fa"?v4e():t==="ar"?b4e():t==="es"?y4e():t==="hi"?x4e():m4e()}),w4e=()=>"Goal",k4e=()=>"目标",S4e=()=>"هدف",C4e=()=>"الهدف",E4e=()=>"Objetivo",N4e=()=>"लक्ष्य",z4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k4e():t==="fa"?S4e():t==="ar"?C4e():t==="es"?E4e():t==="hi"?N4e():w4e()}),j4e=()=>"is unavailable.",A4e=()=>"不可用。",T4e=()=>"در دسترس نیست.",R4e=()=>"غير متاح.",M4e=()=>"no está disponible.",O4e=()=>"उपलब्ध नहीं है।",D4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A4e():t==="fa"?T4e():t==="ar"?R4e():t==="es"?M4e():t==="hi"?O4e():j4e()}),L4e=()=>"Later queued messages will wait until this is retried or removed.",I4e=()=>"后续排队的消息会等待此消息重试或移除。",$4e=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",B4e=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",P4e=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",F4e=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",H4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I4e():t==="fa"?$4e():t==="ar"?B4e():t==="es"?P4e():t==="hi"?F4e():L4e()}),q4e=()=>"Listed files",U4e=()=>"已列出文件",G4e=()=>"فایل‌ها فهرست شد",V4e=()=>"سرد الملفات",K4e=()=>"Listó archivos",W4e=()=>"फ़ाइलों की सूची बनाई",HN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U4e():t==="fa"?G4e():t==="ar"?V4e():t==="es"?K4e():t==="hi"?W4e():q4e()}),Q4e=()=>"Listed project runs",X4e=()=>"已列出项目运行",Y4e=()=>"اجراهای پروژه فهرست شد",Z4e=()=>"سرد عمليات تشغيل المشروع",J4e=()=>"Listó las ejecuciones del proyecto",e3e=()=>"प्रोजेक्ट रन की सूची बनाई",t3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X4e():t==="fa"?Y4e():t==="ar"?Z4e():t==="es"?J4e():t==="hi"?e3e():Q4e()}),n3e=()=>"Listed projects",r3e=()=>"已列出项目",s3e=()=>"پروژه‌ها فهرست شد",i3e=()=>"سرد المشاريع",a3e=()=>"Listó proyectos",o3e=()=>"प्रोजेक्ट की सूची बनाई",c3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r3e():t==="fa"?s3e():t==="ar"?i3e():t==="es"?a3e():t==="hi"?o3e():n3e()}),l3e=()=>"Loading conversation…",u3e=()=>"正在加载对话…",_3e=()=>"در حال بارگیری گفتگو…",f3e=()=>"جارٍ تحميل المحادثة…",d3e=()=>"Cargando conversación…",h3e=()=>"बातचीत लोड हो रही है…",qN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u3e():t==="fa"?_3e():t==="ar"?f3e():t==="es"?d3e():t==="hi"?h3e():l3e()}),p3e=()=>"New Chat",m3e=()=>"新对话",g3e=()=>"گفتگوی جدید",v3e=()=>"محادثة جديدة",b3e=()=>"Nuevo chat",y3e=()=>"नई चैट",D3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m3e():t==="fa"?g3e():t==="ar"?v3e():t==="es"?b3e():t==="hi"?y3e():p3e()}),x3e=()=>"Next version",w3e=()=>"下一版本",k3e=()=>"نسخهٔ بعدی",S3e=()=>"النسخة التالية",C3e=()=>"Siguiente versión",E3e=()=>"अगला वर्शन",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w3e():t==="fa"?k3e():t==="ar"?S3e():t==="es"?C3e():t==="hi"?E3e():x3e()}),N3e=()=>"Open the session this agent spawned",z3e=()=>"打开此智能体创建的会话",j3e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",A3e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",T3e=()=>"Abrir la sesión que creó este agente",R3e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",M3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z3e():t==="fa"?j3e():t==="ar"?A3e():t==="es"?T3e():t==="hi"?R3e():N3e()}),O3e=()=>"Opened web pages",D3e=()=>"已打开网页",L3e=()=>"صفحه‌های وب باز شد",I3e=()=>"فتح صفحات ويب",$3e=()=>"Abrió páginas web",B3e=()=>"वेब पेज खोले",P3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D3e():t==="fa"?L3e():t==="ar"?I3e():t==="es"?$3e():t==="hi"?B3e():O3e()}),F3e=()=>"Plan",H3e=()=>"计划",q3e=()=>"طرح",U3e=()=>"خطة",G3e=()=>"Plan",V3e=()=>"प्लान",K3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H3e():t==="fa"?q3e():t==="ar"?U3e():t==="es"?G3e():t==="hi"?V3e():F3e()}),W3e=()=>"Plan approved",Q3e=()=>"计划已批准",X3e=()=>"طرح تأیید شد",Y3e=()=>"تمت الموافقة على الخطة",Z3e=()=>"Plan aprobado",J3e=()=>"प्लान स्वीकृत",e5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q3e():t==="fa"?X3e():t==="ar"?Y3e():t==="es"?Z3e():t==="hi"?J3e():W3e()}),t5e=()=>"Plan rejected",n5e=()=>"计划已拒绝",r5e=()=>"طرح رد شد",s5e=()=>"رُفضت الخطة",i5e=()=>"Plan rechazado",a5e=()=>"प्लान अस्वीकृत",o5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n5e():t==="fa"?r5e():t==="ar"?s5e():t==="es"?i5e():t==="hi"?a5e():t5e()}),c5e=()=>"Plan resolved",l5e=()=>"计划已处理",u5e=()=>"طرح تعیین تکلیف شد",_5e=()=>"تمت معالجة الخطة",f5e=()=>"Plan resuelto",d5e=()=>"प्लान सुलझाया गया",h5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l5e():t==="fa"?u5e():t==="ar"?_5e():t==="es"?f5e():t==="hi"?d5e():c5e()}),p5e=()=>"Plan revision requested",m5e=()=>"已请求修改计划",g5e=()=>"درخواست بازنگری طرح ثبت شد",v5e=()=>"طُلب تعديل الخطة",b5e=()=>"Cambios en el plan solicitados",y5e=()=>"प्लान में बदलाव का अनुरोध",x5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m5e():t==="fa"?g5e():t==="ar"?v5e():t==="es"?b5e():t==="hi"?y5e():p5e()}),w5e=()=>"Previous version",k5e=()=>"上一版本",S5e=()=>"نسخهٔ قبلی",C5e=()=>"النسخة السابقة",E5e=()=>"Versión anterior",N5e=()=>"पिछला वर्शन",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k5e():t==="fa"?S5e():t==="ar"?C5e():t==="es"?E5e():t==="hi"?N5e():w5e()}),z5e=()=>"Ran a command",j5e=()=>"已运行命令",A5e=()=>"فرمان اجرا شد",T5e=()=>"نفّذ أمرًا",R5e=()=>"Ejecutó un comando",M5e=()=>"एक कमांड चलाई",O5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j5e():t==="fa"?A5e():t==="ar"?T5e():t==="es"?R5e():t==="hi"?M5e():z5e()}),D5e=()=>"Ran tests",L5e=()=>"已运行测试",I5e=()=>"آزمون‌ها اجرا شد",$5e=()=>"شغّل الاختبارات",B5e=()=>"Ejecutó tests",P5e=()=>"टेस्ट चलाए",F5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L5e():t==="fa"?I5e():t==="ar"?$5e():t==="es"?B5e():t==="hi"?P5e():D5e()}),H5e=()=>"Read a file",q5e=()=>"已读取文件",U5e=()=>"فایل خوانده شد",G5e=()=>"قرأ ملفًا",V5e=()=>"Leyó un archivo",K5e=()=>"एक फ़ाइल पढ़ी",W5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q5e():t==="fa"?U5e():t==="ar"?G5e():t==="es"?V5e():t==="hi"?K5e():H5e()}),Q5e=()=>"Read Git history",X5e=()=>"已读取 Git 历史",Y5e=()=>"تاریخچهٔ Git خوانده شد",Z5e=()=>"قرأ سجل Git",J5e=()=>"Leyó el historial de Git",eke=()=>"Git इतिहास पढ़ा",tke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X5e():t==="fa"?Y5e():t==="ar"?Z5e():t==="es"?J5e():t==="hi"?eke():Q5e()}),nke=()=>"Read project details",rke=()=>"已读取项目详情",ske=()=>"جزئیات پروژه خوانده شد",ike=()=>"قرأ تفاصيل المشروع",ake=()=>"Leyó los detalles del proyecto",oke=()=>"प्रोजेक्ट विवरण पढ़ा",cke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rke():t==="fa"?ske():t==="ar"?ike():t==="es"?ake():t==="hi"?oke():nke()}),lke=()=>"Reject",uke=()=>"拒绝",_ke=()=>"رد کردن",fke=()=>"رفض",dke=()=>"Rechazar",hke=()=>"अस्वीकार करें",pke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uke():t==="fa"?_ke():t==="ar"?fke():t==="es"?dke():t==="hi"?hke():lke()}),mke=()=>"Remove",gke=()=>"移除",vke=()=>"حذف",bke=()=>"إزالة",yke=()=>"Quitar",xke=()=>"हटाएं",wke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gke():t==="fa"?vke():t==="ar"?bke():t==="es"?yke():t==="hi"?xke():mke()}),kke=()=>"Remove annotation",Ske=()=>"移除批注",Cke=()=>"حذف یادداشت",Eke=()=>"إزالة التعليق",Nke=()=>"Quitar anotación",zke=()=>"एनोटेशन हटाएं",jke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ske():t==="fa"?Cke():t==="ar"?Eke():t==="es"?Nke():t==="hi"?zke():kke()}),Ake=()=>"Remove file",Tke=()=>"移除文件",Rke=()=>"حذف فایل",Mke=()=>"إزالة الملف",Oke=()=>"Quitar archivo",Dke=()=>"फ़ाइल हटाएं",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tke():t==="fa"?Rke():t==="ar"?Mke():t==="es"?Oke():t==="hi"?Dke():Ake()}),Lke=()=>"Remove image",Ike=()=>"移除图片",$ke=()=>"حذف تصویر",Bke=()=>"إزالة الصورة",Pke=()=>"Quitar imagen",Fke=()=>"इमेज हटाएं",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ike():t==="fa"?$ke():t==="ar"?Bke():t==="es"?Pke():t==="hi"?Fke():Lke()}),Hke=()=>"Remove queued message",qke=()=>"移除排队消息",Uke=()=>"حذف پیام صف",Gke=()=>"إزالة الرسالة من قائمة الانتظار",Vke=()=>"Quitar mensaje en cola",Kke=()=>"कतार में लगा संदेश हटाएं",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qke():t==="fa"?Uke():t==="ar"?Gke():t==="es"?Vke():t==="hi"?Kke():Hke()}),Wke=()=>"Rename",Qke=()=>"重命名",Xke=()=>"تغییر نام",Yke=()=>"إعادة تسمية",Zke=()=>"Renombrar",Jke=()=>"नाम बदलें",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qke():t==="fa"?Xke():t==="ar"?Yke():t==="es"?Zke():t==="hi"?Jke():Wke()}),eSe=()=>"Reviewed code changes",tSe=()=>"已审查代码更改",nSe=()=>"تغییرات کد بازبینی شد",rSe=()=>"راجع تغييرات الشيفرة",sSe=()=>"Revisó cambios en el código",iSe=()=>"कोड में बदलावों की समीक्षा की",aSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tSe():t==="fa"?nSe():t==="ar"?rSe():t==="es"?sSe():t==="hi"?iSe():eSe()}),oSe=()=>"Run",cSe=()=>"运行",lSe=()=>"اجرا",uSe=()=>"تشغيل",_Se=()=>"Ejecutar",fSe=()=>"रन",QN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cSe():t==="fa"?lSe():t==="ar"?uSe():t==="es"?_Se():t==="hi"?fSe():oSe()}),dSe=()=>"Selected chat text",hSe=()=>"已选聊天文本",pSe=()=>"متن انتخاب‌شدهٔ گفتگو",mSe=()=>"النص المحدد من المحادثة",gSe=()=>"Texto seleccionado del chat",vSe=()=>"चयनित चैट टेक्स्ट",bSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hSe():t==="fa"?pSe():t==="ar"?mSe():t==="es"?gSe():t==="hi"?vSe():dSe()}),ySe=()=>"Selected text:",xSe=()=>"已选文本:",wSe=()=>"متن انتخاب‌شده:",kSe=()=>"النص المحدد:",SSe=()=>"Texto seleccionado:",CSe=()=>"चयनित टेक्स्ट:",ESe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xSe():t==="fa"?wSe():t==="ar"?kSe():t==="es"?SSe():t==="hi"?CSe():ySe()}),NSe=()=>"Send",zSe=()=>"发送",jSe=()=>"ارسال",ASe=()=>"إرسال رسالة",TSe=()=>"Enviar",RSe=()=>"भेजें",L3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zSe():t==="fa"?jSe():t==="ar"?ASe():t==="es"?TSe():t==="hi"?RSe():NSe()}),MSe=()=>"Session options",OSe=()=>"会话选项",DSe=()=>"گزینه‌های نشست",LSe=()=>"خيارات الجلسة",ISe=()=>"Opciones de la sesión",$Se=()=>"सेशन विकल्प",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OSe():t==="fa"?DSe():t==="ar"?LSe():t==="es"?ISe():t==="hi"?$Se():MSe()}),BSe=()=>"Session title",PSe=()=>"会话标题",FSe=()=>"عنوان نشست",HSe=()=>"عنوان الجلسة",qSe=()=>"Título de la sesión",USe=()=>"सेशन शीर्षक",GSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PSe():t==="fa"?FSe():t==="ar"?HSe():t==="es"?qSe():t==="hi"?USe():BSe()}),VSe=()=>"Show sidebar",KSe=()=>"显示侧边栏",WSe=()=>"نمایش نوار کناری",QSe=()=>"إظهار الشريط الجانبي",XSe=()=>"Mostrar barra lateral",YSe=()=>"साइडबार दिखाएं",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KSe():t==="fa"?WSe():t==="ar"?QSe():t==="es"?XSe():t==="hi"?YSe():VSe()}),ZSe=()=>"Started an experiment run",JSe=()=>"已启动实验运行",e6e=()=>"اجرای آزمایش آغاز شد",t6e=()=>"بدأ تشغيل تجربة",n6e=()=>"Inició una ejecución de experimento",r6e=()=>"एक प्रयोग रन शुरू किया",s6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JSe():t==="fa"?e6e():t==="ar"?t6e():t==="es"?n6e():t==="hi"?r6e():ZSe()}),i6e=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",a6e=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",o6e=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",c6e=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",l6e=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",u6e=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",_6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a6e():t==="fa"?o6e():t==="ar"?c6e():t==="es"?l6e():t==="hi"?u6e():i6e()}),f6e=()=>"Shape a research question",d6e=()=>"明确研究问题",h6e=()=>"شکل دادن به پرسش پژوهشی",p6e=()=>"صياغة سؤال بحثي",m6e=()=>"Definir una pregunta de investigación",g6e=()=>"एक शोध प्रश्न तैयार करें",v6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d6e():t==="fa"?h6e():t==="ar"?p6e():t==="es"?m6e():t==="hi"?g6e():f6e()}),b6e=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",y6e=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",x6e=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",w6e=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",k6e=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",S6e=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",C6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y6e():t==="fa"?x6e():t==="ar"?w6e():t==="es"?k6e():t==="hi"?S6e():b6e()}),E6e=()=>"Survey related work",N6e=()=>"调研相关工作",z6e=()=>"مرور کارهای مرتبط",j6e=()=>"استعراض الأعمال ذات الصلة",A6e=()=>"Revisar trabajos relacionados",T6e=()=>"संबंधित कार्य का सर्वेक्षण करें",R6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N6e():t==="fa"?z6e():t==="ar"?j6e():t==="es"?A6e():t==="hi"?T6e():E6e()}),M6e=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",O6e=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",D6e=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",L6e=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",I6e=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",$6e=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",B6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O6e():t==="fa"?D6e():t==="ar"?L6e():t==="es"?I6e():t==="hi"?$6e():M6e()}),P6e=()=>"Scaffold a baseline",F6e=()=>"搭建基线",H6e=()=>"ساخت خط مبنا",q6e=()=>"بناء خط أساس",U6e=()=>"Crear un modelo de referencia",G6e=()=>"एक बेसलाइन तैयार करें",V6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F6e():t==="fa"?H6e():t==="ar"?q6e():t==="es"?U6e():t==="hi"?G6e():P6e()}),K6e=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",W6e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",Q6e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",X6e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",Y6e=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",Z6e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",J6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W6e():t==="fa"?Q6e():t==="ar"?X6e():t==="es"?Y6e():t==="hi"?Z6e():K6e()}),eCe=()=>"Run a first experiment",tCe=()=>"运行第一个实验",nCe=()=>"اجرای اولین آزمایش",rCe=()=>"تشغيل التجربة الأولى",sCe=()=>"Ejecutar un primer experimento",iCe=()=>"पहला प्रयोग चलाएं",aCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tCe():t==="fa"?nCe():t==="ar"?rCe():t==="es"?sCe():t==="hi"?iCe():eCe()}),oCe=()=>"Reading the project to suggest where to start…",cCe=()=>"正在阅读项目以建议从哪里开始…",lCe=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",uCe=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",_Ce=()=>"Leyendo el proyecto para sugerir por dónde empezar…",fCe=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",dCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cCe():t==="fa"?lCe():t==="ar"?uCe():t==="es"?_Ce():t==="hi"?fCe():oCe()}),hCe=()=>"Starter prompts",pCe=()=>"入门提示",mCe=()=>"پیشنهادهای شروع",gCe=()=>"اقتراحات للبدء",vCe=()=>"Prompts para empezar",bCe=()=>"शुरुआती प्रॉम्प्ट",yCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pCe():t==="fa"?mCe():t==="ar"?gCe():t==="es"?vCe():t==="hi"?bCe():hCe()}),xCe=()=>"Stop",wCe=()=>"停止",kCe=()=>"توقف",SCe=()=>"إيقاف",CCe=()=>"Detener",ECe=()=>"रोकें",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wCe():t==="fa"?kCe():t==="ar"?SCe():t==="es"?CCe():t==="hi"?ECe():xCe()}),NCe=()=>"Submit",zCe=()=>"提交",jCe=()=>"ارسال",ACe=()=>"إرسال",TCe=()=>"Enviar",RCe=()=>"सबमिट करें",MCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zCe():t==="fa"?jCe():t==="ar"?ACe():t==="es"?TCe():t==="hi"?RCe():NCe()}),OCe=()=>"Tool failed",DCe=()=>"工具失败",LCe=()=>"ابزار ناموفق بود",ICe=()=>"فشلت الأداة",$Ce=()=>"Error en la herramienta",BCe=()=>"टूल विफल",PCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DCe():t==="fa"?LCe():t==="ar"?ICe():t==="es"?$Ce():t==="hi"?BCe():OCe()}),FCe=()=>"Used tools",HCe=()=>"已使用工具",qCe=()=>"ابزارها استفاده شد",UCe=()=>"استخدم الأدوات",GCe=()=>"Usó herramientas",VCe=()=>"टूल इस्तेमाल किए",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HCe():t==="fa"?qCe():t==="ar"?UCe():t==="es"?GCe():t==="hi"?VCe():FCe()}),KCe=()=>"View full plan",WCe=()=>"查看完整计划",QCe=()=>"مشاهدهٔ طرح کامل",XCe=()=>"عرض الخطة كاملة",YCe=()=>"Ver plan completo",ZCe=()=>"पूरा प्लान देखें",JCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WCe():t==="fa"?QCe():t==="ar"?XCe():t==="es"?YCe():t==="hi"?ZCe():KCe()}),e7e=()=>"Waited for an experiment run",t7e=()=>"已等待实验运行",n7e=()=>"برای اجرای آزمایش صبر شد",r7e=()=>"انتظر تشغيل تجربة",s7e=()=>"Esperó a una ejecución de experimento",i7e=()=>"एक प्रयोग रन का इंतज़ार किया",a7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t7e():t==="fa"?n7e():t==="ar"?r7e():t==="es"?s7e():t==="hi"?i7e():e7e()}),o7e=()=>"Waiting for your input…",c7e=()=>"正在等待你的输入…",l7e=()=>"منتظر ورودی شما…",u7e=()=>"في انتظار إدخالك…",_7e=()=>"Esperando tu respuesta…",f7e=()=>"आपके इनपुट का इंतज़ार है…",d7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c7e():t==="fa"?l7e():t==="ar"?u7e():t==="es"?_7e():t==="hi"?f7e():o7e()}),h7e=()=>"What should we research?",p7e=()=>"我们应该研究什么?",m7e=()=>"چه چیزی را پژوهش کنیم؟",g7e=()=>"ما الذي نبحثه؟",v7e=()=>"¿Qué investigamos?",b7e=()=>"हमें क्या शोध करना चाहिए?",y7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p7e():t==="fa"?m7e():t==="ar"?g7e():t==="es"?v7e():t==="hi"?b7e():h7e()}),x7e=()=>"You, mid-task",w7e=()=>"你(任务进行中)",k7e=()=>"شما، هنگام انجام وظیفه",S7e=()=>"أنت، أثناء المهمة",C7e=()=>"Tú, durante la tarea",E7e=()=>"आप, टास्क के बीच में",N7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w7e():t==="fa"?k7e():t==="ar"?S7e():t==="es"?C7e():t==="hi"?E7e():x7e()}),z7e=()=>"Pasted image",j7e=()=>"粘贴的图片",A7e=()=>"تصویر جای‌گذاری‌شده",T7e=()=>"صورة ملصقة",R7e=()=>"Imagen pegada",M7e=()=>"पेस्ट की गई इमेज",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j7e():t==="fa"?A7e():t==="ar"?T7e():t==="es"?R7e():t==="hi"?M7e():z7e()}),O7e=()=>"Plan",D7e=()=>"计划",L7e=()=>"طرح",I7e=()=>"خطة",$7e=()=>"Plan",B7e=()=>"प्लान",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D7e():t==="fa"?L7e():t==="ar"?I7e():t==="es"?$7e():t==="hi"?B7e():O7e()}),P7e=()=>"Plan mode — ready to proceed?",F7e=()=>"计划模式 — 准备好继续了吗?",H7e=()=>"حالت طرح — آماده‌اید ادامه دهید؟",q7e=()=>"وضع التخطيط — جاهز للمتابعة؟",U7e=()=>"Modo Plan — ¿listo para continuar?",G7e=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",V7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F7e():t==="fa"?H7e():t==="ar"?q7e():t==="es"?U7e():t==="hi"?G7e():P7e()}),K7e=()=>"Proposed plan",W7e=()=>"提议的计划",Q7e=()=>"طرح پیشنهادی",X7e=()=>"خطة مقترحة",Y7e=()=>"Plan propuesto",Z7e=()=>"प्रस्तावित प्लान",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W7e():t==="fa"?Q7e():t==="ar"?X7e():t==="es"?Y7e():t==="hi"?Z7e():K7e()}),J7e=()=>"Question",e8e=()=>"问题",t8e=()=>"پرسش",n8e=()=>"سؤال",r8e=()=>"Pregunta",s8e=()=>"प्रश्न",i8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e8e():t==="fa"?t8e():t==="ar"?n8e():t==="es"?r8e():t==="hi"?s8e():J7e()}),a8e=()=>"Queued",o8e=()=>"已排队",c8e=()=>"در صف",l8e=()=>"في قائمة الانتظار",u8e=()=>"En cola",_8e=()=>"कतार में",f8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o8e():t==="fa"?c8e():t==="ar"?l8e():t==="es"?u8e():t==="hi"?_8e():a8e()}),d8e=()=>"Recents",h8e=()=>"最近",p8e=()=>"اخیر",m8e=()=>"الأخيرة",g8e=()=>"Recientes",v8e=()=>"हाल की",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h8e():t==="fa"?p8e():t==="ar"?m8e():t==="es"?g8e():t==="hi"?v8e():d8e()}),b8e=()=>"Re-check its setup.",y8e=()=>"请重新检查其设置。",x8e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",w8e=()=>"أعد فحص إعداده.",k8e=()=>"Vuelve a comprobar su configuración.",S8e=()=>"इसका सेटअप फिर से जाँचें।",C8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y8e():t==="fa"?x8e():t==="ar"?w8e():t==="es"?k8e():t==="hi"?S8e():b8e()}),E8e=()=>"Could not recover this turn. Try again.",N8e=()=>"无法恢复本轮。请重试。",z8e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",j8e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",A8e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",T8e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",R8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N8e():t==="fa"?z8e():t==="ar"?j8e():t==="es"?A8e():t==="hi"?T8e():E8e()}),M8e=()=>"Could not remove the queued message. Try again.",O8e=()=>"无法移除排队消息。请重试。",D8e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",L8e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",I8e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",$8e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",B8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O8e():t==="fa"?D8e():t==="ar"?L8e():t==="es"?I8e():t==="hi"?$8e():M8e()}),P8e=e=>`Could not re-send: ${e==null?void 0:e.error}`,F8e=e=>`无法重新发送:${e==null?void 0:e.error}`,H8e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,q8e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,U8e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,G8e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,V8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?F8e(e):t==="fa"?H8e(e):t==="ar"?q8e(e):t==="es"?U8e(e):t==="hi"?G8e(e):P8e(e)}),K8e=()=>"Resolved",W8e=()=>"已处理",Q8e=()=>"رسیدگی شد",X8e=()=>"مُعالَج",Y8e=()=>"Resuelto",Z8e=()=>"सुलझाया गया",J8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W8e():t==="fa"?Q8e():t==="ar"?X8e():t==="es"?Y8e():t==="hi"?Z8e():K8e()}),e9e=()=>"Could not retry the queued message. Try again.",t9e=()=>"无法重试排队消息。请重试。",n9e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",r9e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",s9e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",i9e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",a9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t9e():t==="fa"?n9e():t==="ar"?r9e():t==="es"?s9e():t==="hi"?i9e():e9e()}),o9e=()=>"run logs",c9e=()=>"运行日志",l9e=()=>"گزارش‌های اجرا",u9e=()=>"سجلات التشغيل",_9e=()=>"logs de ejecución",f9e=()=>"रन लॉग",d9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c9e():t==="fa"?l9e():t==="ar"?u9e():t==="es"?_9e():t==="hi"?f9e():o9e()}),h9e=()=>"Scroll to bottom",p9e=()=>"滚动到底部",m9e=()=>"رفتن به پایین گفتگو",g9e=()=>"التمرير إلى الأسفل",v9e=()=>"Ir al final",b9e=()=>"नीचे तक स्क्रॉल करें",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p9e():t==="fa"?m9e():t==="ar"?g9e():t==="es"?v9e():t==="hi"?b9e():h9e()}),y9e=()=>"The selected harness is unavailable",x9e=()=>"所选智能体工具不可用",w9e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",k9e=()=>"أداة البرمجة المحددة غير متاحة",S9e=()=>"El agente seleccionado no está disponible",C9e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",k1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x9e():t==="fa"?w9e():t==="ar"?k9e():t==="es"?S9e():t==="hi"?C9e():y9e()}),E9e=()=>"Session limit reached",N9e=()=>"已达到会话使用限额",z9e=()=>"به سقف مصرف نشست رسیده‌اید",j9e=()=>"تم بلوغ حد الاستخدام",A9e=()=>"Límite de la sesión alcanzado",T9e=()=>"सेशन सीमा पूरी हो गई",R9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N9e():t==="fa"?z9e():t==="ar"?j9e():t==="es"?A9e():t==="hi"?T9e():E9e()}),M9e=()=>"The chat session was not created",O9e=()=>"未能创建聊天会话",D9e=()=>"نشست گفت‌وگو ایجاد نشد",L9e=()=>"لم تُنشأ جلسة المحادثة",I9e=()=>"No se creó la sesión de chat",$9e=()=>"चैट सेशन नहीं बनाया गया",B9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O9e():t==="fa"?D9e():t==="ar"?L9e():t==="es"?I9e():t==="hi"?$9e():M9e()}),P9e=()=>"Show full conversation",F9e=()=>"显示完整对话",H9e=()=>"نمایش کامل گفتگو",q9e=()=>"عرض المحادثة كاملة",U9e=()=>"Mostrar la conversación completa",G9e=()=>"पूरी बातचीत दिखाएं",V9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F9e():t==="fa"?H9e():t==="ar"?q9e():t==="es"?U9e():t==="hi"?G9e():P9e()}),K9e=()=>" · Spawned by another agent",W9e=()=>" · 由另一个智能体创建",Q9e=()=>" · ساخته‌شده به‌دست عامل دیگر",X9e=()=>" · أنشأه وكيل آخر",Y9e=()=>" · Creada por otro agente",Z9e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",J9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W9e():t==="fa"?Q9e():t==="ar"?X9e():t==="es"?Y9e():t==="hi"?Z9e():K9e()}),eEe=()=>"Starting…",tEe=()=>"正在启动…",nEe=()=>"در حال شروع…",rEe=()=>"جارٍ البدء…",sEe=()=>"Iniciando…",iEe=()=>"शुरू हो रहा है…",aEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tEe():t==="fa"?nEe():t==="ar"?rEe():t==="es"?sEe():t==="hi"?iEe():eEe()}),oEe=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,cEe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,lEe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,uEe=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,_Ee=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,fEe=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,dEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cEe(e):t==="fa"?lEe(e):t==="ar"?uEe(e):t==="es"?_Ee(e):t==="hi"?fEe(e):oEe(e)}),hEe=()=>"Could not stop the turn. Try again.",pEe=()=>"无法停止本轮。请重试。",mEe=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",gEe=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",vEe=()=>"No se pudo detener el turno. Inténtalo de nuevo.",bEe=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",yEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pEe():t==="fa"?mEe():t==="ar"?gEe():t==="es"?vEe():t==="hi"?bEe():hEe()}),xEe=e=>`Could not switch fork: ${e==null?void 0:e.error}`,wEe=e=>`无法切换分支:${e==null?void 0:e.error}`,kEe=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,SEe=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,CEe=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,EEe=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,NEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wEe(e):t==="fa"?kEe(e):t==="ar"?SEe(e):t==="es"?CEe(e):t==="hi"?EEe(e):xEe(e)}),zEe=()=>"The agent",jEe=()=>"智能体",AEe=()=>"عامل",TEe=()=>"الوكيل",REe=()=>"El agente",MEe=()=>"एजेंट",OEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jEe():t==="fa"?AEe():t==="ar"?TEe():t==="es"?REe():t==="hi"?MEe():zEe()}),DEe=()=>"Thinking",LEe=()=>"正在思考",IEe=()=>"در حال فکر کردن",$Ee=()=>"جارٍ التفكير",BEe=()=>"Pensando",PEe=()=>"सोच रहा है",FEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LEe():t==="fa"?IEe():t==="ar"?$Ee():t==="es"?BEe():t==="hi"?PEe():DEe()}),HEe=()=>"Could not toggle Plan mode. Try again.",qEe=()=>"无法切换计划模式。请重试。",UEe=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",GEe=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",VEe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",KEe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qEe():t==="fa"?UEe():t==="ar"?GEe():t==="es"?VEe():t==="hi"?KEe():HEe()}),WEe=()=>"This turn did not finish.",QEe=()=>"本轮未完成。",XEe=()=>"این نوبت کامل نشد.",YEe=()=>"لم تكتمل هذه الجولة.",ZEe=()=>"Este turno no terminó.",JEe=()=>"यह टर्न पूरा नहीं हुआ।",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QEe():t==="fa"?XEe():t==="ar"?YEe():t==="es"?ZEe():t==="hi"?JEe():WEe()}),eNe=()=>"Type a custom answer…",tNe=()=>"输入自定义回答…",nNe=()=>"پاسخ دلخواه را بنویسید…",rNe=()=>"اكتب إجابة مخصصة…",sNe=()=>"Escribe una respuesta personalizada…",iNe=()=>"अपना जवाब टाइप करें…",aNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tNe():t==="fa"?nNe():t==="ar"?rNe():t==="es"?sNe():t==="hi"?iNe():eNe()}),oNe=()=>"Unarchive",cNe=()=>"取消归档",lNe=()=>"خارج کردن از بایگانی",uNe=()=>"إلغاء الأرشفة",_Ne=()=>"Desarchivar",fNe=()=>"आर्काइव से निकालें",dNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cNe():t==="fa"?lNe():t==="ar"?uNe():t==="es"?_Ne():t==="hi"?fNe():oNe()}),hNe=()=>"Untitled",pNe=()=>"未命名",mNe=()=>"بدون عنوان",gNe=()=>"بدون عنوان",vNe=()=>"Sin título",bNe=()=>"बिना शीर्षक",yv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pNe():t==="fa"?mNe():t==="ar"?gNe():t==="es"?vNe():t==="hi"?bNe():hNe()}),yNe=()=>"Could not update autonomy. Try again.",xNe=()=>"无法更新自主程度。请重试。",wNe=()=>"به‌روزرسانی خودمختاری انجام نشد. دوباره تلاش کنید.",kNe=()=>"تعذّر تحديث الاستقلالية. حاول مجددًا.",SNe=()=>"No se pudo actualizar la autonomía. Inténtalo de nuevo.",CNe=()=>"स्वायत्तता अपडेट नहीं हो सकी। फिर से कोशिश करें।",ENe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xNe():t==="fa"?wNe():t==="ar"?kNe():t==="es"?SNe():t==="hi"?CNe():yNe()}),NNe=()=>"Could not update permissions. Try again.",zNe=()=>"无法更新权限。请重试。",jNe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",ANe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",TNe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",RNe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",MNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zNe():t==="fa"?jNe():t==="ar"?ANe():t==="es"?TNe():t==="hi"?RNe():NNe()}),ONe=()=>"Work details",DNe=()=>"工作详情",LNe=()=>"جزئیات کار",INe=()=>"تفاصيل العمل",$Ne=()=>"Detalles del trabajo",BNe=()=>"काम का विवरण",PNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DNe():t==="fa"?LNe():t==="ar"?INe():t==="es"?$Ne():t==="hi"?BNe():ONe()}),FNe=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,HNe=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,qNe=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,UNe=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,GNe=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,VNe=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,KNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HNe(e):t==="fa"?qNe(e):t==="ar"?UNe(e):t==="es"?GNe(e):t==="hi"?VNe(e):FNe(e)}),WNe=e=>`Worked for ${e==null?void 0:e.duration}`,QNe=e=>`已工作 ${e==null?void 0:e.duration}`,XNe=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,YNe=e=>`عمل لمدة ${e==null?void 0:e.duration}`,ZNe=e=>`Trabajó durante ${e==null?void 0:e.duration}`,JNe=e=>`${e==null?void 0:e.duration} तक काम किया`,eze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QNe(e):t==="fa"?XNe(e):t==="ar"?YNe(e):t==="es"?ZNe(e):t==="hi"?JNe(e):WNe(e)}),tze=()=>"Working…",nze=()=>"正在工作…",rze=()=>"در حال کار…",sze=()=>"جارٍ العمل…",ize=()=>"Trabajando…",aze=()=>"काम हो रहा है…",CS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nze():t==="fa"?rze():t==="ar"?sze():t==="es"?ize():t==="hi"?aze():tze()}),oze=()=>"Close tab",cze=()=>"关闭标签页",lze=()=>"بستن زبانه",uze=()=>"إغلاق التبويب",_ze=()=>"Cerrar pestaña",fze=()=>"टैब बंद करें",dze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cze():t==="fa"?lze():t==="ar"?uze():t==="es"?_ze():t==="hi"?fze():oze()}),hze=()=>"Changes",pze=()=>"更改",mze=()=>"تغییرات",gze=()=>"التغييرات",vze=()=>"Cambios",bze=()=>"बदलाव",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pze():t==="fa"?mze():t==="ar"?gze():t==="es"?vze():t==="hi"?bze():hze()}),yze=()=>"Code browser view",xze=()=>"代码浏览器视图",wze=()=>"نمای مرورگر کد",kze=()=>"عرض متصفح الشيفرة",Sze=()=>"Vista del explorador de código",Cze=()=>"कोड ब्राउज़र व्यू",Eze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xze():t==="fa"?wze():t==="ar"?kze():t==="es"?Sze():t==="hi"?Cze():yze()}),Nze=()=>"Files",zze=()=>"文件",jze=()=>"فایل‌ها",Aze=()=>"الملفات",Tze=()=>"Archivos",Rze=()=>"फ़ाइलें",Mze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zze():t==="fa"?jze():t==="ar"?Aze():t==="es"?Tze():t==="hi"?Rze():Nze()}),Oze=()=>"Refresh",Dze=()=>"刷新",Lze=()=>"تازه‌سازی",Ize=()=>"تحديث",$ze=()=>"Actualizar",Bze=()=>"रीफ़्रेश करें",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dze():t==="fa"?Lze():t==="ar"?Ize():t==="es"?$ze():t==="hi"?Bze():Oze()}),Pze=()=>"listing truncated",Fze=()=>"列表已截断",Hze=()=>"فهرست کوتاه شده است",qze=()=>"القائمة مقتطعة",Uze=()=>"listado truncado",Gze=()=>"सूची छोटी की गई",Vze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fze():t==="fa"?Hze():t==="ar"?qze():t==="es"?Uze():t==="hi"?Gze():Pze()}),Kze=()=>"No files.",Wze=()=>"没有文件。",Qze=()=>"فایلی وجود ندارد.",Xze=()=>"لا توجد ملفات.",Yze=()=>"No hay archivos.",Zze=()=>"कोई फ़ाइल नहीं।",Jze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wze():t==="fa"?Qze():t==="ar"?Xze():t==="es"?Yze():t==="hi"?Zze():Kze()}),eje=()=>"Refresh failed:",tje=()=>"刷新失败:",nje=()=>"تازه‌سازی ناموفق بود:",rje=()=>"فشل التحديث:",sje=()=>"Error al actualizar:",ije=()=>"रीफ़्रेश विफल:",aje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tje():t==="fa"?nje():t==="ar"?rje():t==="es"?sje():t==="hi"?ije():eje()}),oje=()=>"Cancelling…",cje=()=>"正在取消…",lje=()=>"در حال لغو…",uje=()=>"جارٍ الإلغاء…",_je=()=>"Cancelando…",fje=()=>"रद्द हो रहा है…",dje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cje():t==="fa"?lje():t==="ar"?uje():t==="es"?_je():t==="hi"?fje():oje()}),hje=()=>"Checking…",pje=()=>"正在检查…",mje=()=>"در حال بررسی…",gje=()=>"جارٍ التحقق…",vje=()=>"Comprobando…",bje=()=>"जाँचा जा रहा है…",Da=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pje():t==="fa"?mje():t==="ar"?gje():t==="es"?vje():t==="hi"?bje():hje()}),yje=()=>"Copied",xje=()=>"已复制",wje=()=>"کپی شد",kje=()=>"تم النسخ",Sje=()=>"Copiado",Cje=()=>"कॉपी हो गया",Cf=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xje():t==="fa"?wje():t==="ar"?kje():t==="es"?Sje():t==="hi"?Cje():yje()}),Eje=e=>`Failed to load: ${e==null?void 0:e.error}`,Nje=e=>`加载失败:${e==null?void 0:e.error}`,zje=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,jje=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,Aje=e=>`Error al cargar: ${e==null?void 0:e.error}`,Tje=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,ES=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nje(e):t==="fa"?zje(e):t==="ar"?jje(e):t==="es"?Aje(e):t==="hi"?Tje(e):Eje(e)}),Rje=()=>"Loading…",Mje=()=>"正在加载…",Oje=()=>"در حال بارگیری…",Dje=()=>"جارٍ التحميل…",Lje=()=>"Cargando…",Ije=()=>"लोड हो रहा है…",NS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mje():t==="fa"?Oje():t==="ar"?Dje():t==="es"?Lje():t==="hi"?Ije():Rje()}),$je=e=>`+ ${e==null?void 0:e.count} more`,Bje=e=>`另有 ${e==null?void 0:e.count} 项`,Pje=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Fje=e=>`المزيد (+${e==null?void 0:e.count})`,Hje=e=>`+ ${e==null?void 0:e.count} más`,qje=e=>`+ ${e==null?void 0:e.count} और`,Uje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bje(e):t==="fa"?Pje(e):t==="ar"?Fje(e):t==="es"?Hje(e):t==="hi"?qje(e):$je(e)}),Gje=()=>"Rendered view",Vje=()=>"渲染视图",Kje=()=>"نمای رندرشده",Wje=()=>"العرض المُنسَّق",Qje=()=>"Vista renderizada",Xje=()=>"रेंडर किया गया व्यू",Jv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vje():t==="fa"?Kje():t==="ar"?Wje():t==="es"?Qje():t==="hi"?Xje():Gje()}),Yje=()=>"Save",Zje=()=>"保存",Jje=()=>"ذخیره",eAe=()=>"حفظ",tAe=()=>"Guardar",nAe=()=>"सेव करें",Qo=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zje():t==="fa"?Jje():t==="ar"?eAe():t==="es"?tAe():t==="hi"?nAe():Yje()}),rAe=()=>"Saving…",sAe=()=>"正在保存…",iAe=()=>"در حال ذخیره…",aAe=()=>"جارٍ الحفظ…",oAe=()=>"Guardando…",cAe=()=>"सेव हो रहा है…",Ba=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sAe():t==="fa"?iAe():t==="ar"?aAe():t==="es"?oAe():t==="hi"?cAe():rAe()}),lAe=()=>"Show less",uAe=()=>"收起",_Ae=()=>"نمایش کمتر",fAe=()=>"عرض أقل",dAe=()=>"Mostrar menos",hAe=()=>"कम दिखाएं",zS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uAe():t==="fa"?_Ae():t==="ar"?fAe():t==="es"?dAe():t==="hi"?hAe():lAe()}),pAe=()=>"Show more",mAe=()=>"展开",gAe=()=>"نمایش بیشتر",vAe=()=>"عرض المزيد",bAe=()=>"Mostrar más",yAe=()=>"और दिखाएं",I3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mAe():t==="fa"?gAe():t==="ar"?vAe():t==="es"?bAe():t==="hi"?yAe():pAe()}),xAe=()=>"Stop",wAe=()=>"停止",kAe=()=>"توقف",SAe=()=>"إيقاف",CAe=()=>"Detener",EAe=()=>"रोकें",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wAe():t==="fa"?kAe():t==="ar"?SAe():t==="es"?CAe():t==="hi"?EAe():xAe()}),NAe=()=>"Stopping…",zAe=()=>"正在停止…",jAe=()=>"در حال توقف…",AAe=()=>"جارٍ الإيقاف…",TAe=()=>"Deteniendo…",RAe=()=>"रोका जा रहा है…",MAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zAe():t==="fa"?jAe():t==="ar"?AAe():t==="es"?TAe():t==="hi"?RAe():NAe()}),OAe=()=>"View source",DAe=()=>"查看源代码",LAe=()=>"نمایش متن منبع",IAe=()=>"عرض المصدر",$Ae=()=>"Ver código fuente",BAe=()=>"स्रोत देखें",Zd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DAe():t==="fa"?LAe():t==="ar"?IAe():t==="es"?$Ae():t==="hi"?BAe():OAe()}),PAe=()=>"Shorten this chat's context",FAe=()=>"压缩此聊天的上下文",HAe=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",qAe=()=>"اختصار سياق هذه المحادثة",UAe=()=>"Comprime el contexto de este chat",GAe=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",VAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FAe():t==="fa"?HAe():t==="ar"?qAe():t==="es"?UAe():t==="hi"?GAe():PAe()}),KAe=()=>"Runs as a remote Hugging Face Job",WAe=()=>"作为远程 Hugging Face Job 运行",QAe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",XAe=()=>"يعمل كمهمة Hugging Face بعيدة",YAe=()=>"Se ejecuta como un Job remoto de Hugging Face",ZAe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",JAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WAe():t==="fa"?QAe():t==="ar"?XAe():t==="es"?YAe():t==="hi"?ZAe():KAe()}),eTe=()=>"Runs as a Job on your Kubernetes cluster",tTe=()=>"作为 Kubernetes 集群上的 Job 运行",nTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",rTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",sTe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",iTe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",aTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tTe():t==="fa"?nTe():t==="ar"?rTe():t==="es"?sTe():t==="hi"?iTe():eTe()}),oTe=()=>"Runs directly on this computer",cTe=()=>"直接在此计算机上运行",lTe=()=>"مستقیماً روی این رایانه اجرا می‌شود",uTe=()=>"يعمل مباشرة على هذا الحاسوب",_Te=()=>"Se ejecuta directamente en este equipo",fTe=()=>"सीधे इस कंप्यूटर पर चलता है",dTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cTe():t==="fa"?lTe():t==="ar"?uTe():t==="es"?_Te():t==="hi"?fTe():oTe()}),hTe=()=>"Runs in a remote Modal sandbox",pTe=()=>"在远程 Modal 沙箱中运行",mTe=()=>"در sandbox دوردست Modal اجرا می‌شود",gTe=()=>"يعمل في بيئة Modal معزولة عن بُعد",vTe=()=>"Se ejecuta en un sandbox remoto de Modal",bTe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",yTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pTe():t==="fa"?mTe():t==="ar"?gTe():t==="es"?vTe():t==="hi"?bTe():hTe()}),xTe=()=>"Runs on an ephemeral OpenResearch box",wTe=()=>"在临时 OpenResearch 主机上运行",kTe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",STe=()=>"يعمل على صندوق OpenResearch مؤقت",CTe=()=>"Se ejecuta en una máquina efímera de OpenResearch",ETe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",NTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wTe():t==="fa"?kTe():t==="ar"?STe():t==="es"?CTe():t==="hi"?ETe():xTe()}),zTe=()=>"Runs on the connected Ray cluster",jTe=()=>"在已连接的 Ray 集群上运行",ATe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",TTe=()=>"يعمل على عنقود Ray المتصل",RTe=()=>"Se ejecuta en el clúster de Ray conectado",MTe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",OTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jTe():t==="fa"?ATe():t==="ar"?TTe():t==="es"?RTe():t==="hi"?MTe():zTe()}),DTe=()=>"Runs as a scheduled job on your Slurm cluster",LTe=()=>"作为 Slurm 集群上的调度作业运行",ITe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",$Te=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",BTe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",PTe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",FTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LTe():t==="fa"?ITe():t==="ar"?$Te():t==="es"?BTe():t==="hi"?PTe():DTe()}),HTe=()=>"Runs on a host from your SSH config",qTe=()=>"在 SSH 配置中的主机上运行",UTe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",GTe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",VTe=()=>"Se ejecuta en un host de tu configuración SSH",KTe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",WTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qTe():t==="fa"?UTe():t==="ar"?GTe():t==="es"?VTe():t==="hi"?KTe():HTe()}),QTe=()=>"Runs through Tinker’s remote compute",XTe=()=>"通过 Tinker 远程算力运行",YTe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",ZTe=()=>"يعمل عبر حوسبة Tinker البعيدة",JTe=()=>"Se ejecuta en el cómputo remoto de Tinker",eRe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",tRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XTe():t==="fa"?YTe():t==="ar"?ZTe():t==="es"?JTe():t==="hi"?eRe():QTe()}),nRe=()=>"HF Jobs",rRe=()=>"HF Jobs",sRe=()=>"HF Jobs",iRe=()=>"HF Jobs",aRe=()=>"HF Jobs",oRe=()=>"HF Jobs",cRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rRe():t==="fa"?sRe():t==="ar"?iRe():t==="es"?aRe():t==="hi"?oRe():nRe()}),lRe=()=>"Kubernetes",uRe=()=>"Kubernetes",_Re=()=>"Kubernetes",fRe=()=>"Kubernetes",dRe=()=>"Kubernetes",hRe=()=>"Kubernetes",pRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uRe():t==="fa"?_Re():t==="ar"?fRe():t==="es"?dRe():t==="hi"?hRe():lRe()}),mRe=()=>"This machine",gRe=()=>"此计算机",vRe=()=>"این رایانه",bRe=()=>"هذا الجهاز",yRe=()=>"Este equipo",xRe=()=>"यह मशीन",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gRe():t==="fa"?vRe():t==="ar"?bRe():t==="es"?yRe():t==="hi"?xRe():mRe()}),wRe=()=>"Modal",kRe=()=>"Modal",SRe=()=>"Modal",CRe=()=>"Modal",ERe=()=>"Modal",NRe=()=>"Modal",zRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRe():t==="fa"?SRe():t==="ar"?CRe():t==="es"?ERe():t==="hi"?NRe():wRe()}),jRe=()=>"OpenResearch",ARe=()=>"OpenResearch",TRe=()=>"OpenResearch",RRe=()=>"OpenResearch",MRe=()=>"OpenResearch",ORe=()=>"OpenResearch",DRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ARe():t==="fa"?TRe():t==="ar"?RRe():t==="es"?MRe():t==="hi"?ORe():jRe()}),LRe=()=>"Ray",IRe=()=>"Ray",$Re=()=>"Ray",BRe=()=>"Ray",PRe=()=>"Ray",FRe=()=>"Ray",HRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRe():t==="fa"?$Re():t==="ar"?BRe():t==="es"?PRe():t==="hi"?FRe():LRe()}),qRe=()=>"Slurm",URe=()=>"Slurm",GRe=()=>"Slurm",VRe=()=>"Slurm",KRe=()=>"Slurm",WRe=()=>"Slurm",QRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?URe():t==="fa"?GRe():t==="ar"?VRe():t==="es"?KRe():t==="hi"?WRe():qRe()}),XRe=()=>"SSH",YRe=()=>"SSH",ZRe=()=>"SSH",JRe=()=>"SSH",eMe=()=>"SSH",tMe=()=>"SSH",nMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YRe():t==="fa"?ZRe():t==="ar"?JRe():t==="es"?eMe():t==="hi"?tMe():XRe()}),rMe=()=>"Tinker",sMe=()=>"Tinker",iMe=()=>"Tinker",aMe=()=>"Tinker",oMe=()=>"Tinker",cMe=()=>"Tinker",lMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sMe():t==="fa"?iMe():t==="ar"?aMe():t==="es"?oMe():t==="hi"?cMe():rMe()}),uMe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",_Me=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",fMe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",dMe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",hMe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",pMe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",mMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Me():t==="fa"?fMe():t==="ar"?dMe():t==="es"?hMe():t==="hi"?pMe():uMe()}),gMe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",vMe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",bMe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",yMe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",xMe=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",wMe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",kMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vMe():t==="fa"?bMe():t==="ar"?yMe():t==="es"?xMe():t==="hi"?wMe():gMe()}),SMe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",CMe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",EMe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",NMe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",zMe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",jMe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",AMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CMe():t==="fa"?EMe():t==="ar"?NMe():t==="es"?zMe():t==="hi"?jMe():SMe()}),TMe=()=>"This computer must stay awake and online while Tinker runs.",RMe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",MMe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",OMe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",DMe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",LMe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",IMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RMe():t==="fa"?MMe():t==="ar"?OMe():t==="es"?DMe():t==="hi"?LMe():TMe()}),$Me=()=>"Context window",BMe=()=>"上下文窗口",PMe=()=>"پنجرهٔ زمینه",FMe=()=>"نافذة السياق",HMe=()=>"Ventana de contexto",qMe=()=>"कॉन्टेक्स्ट विंडो",UMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BMe():t==="fa"?PMe():t==="ar"?FMe():t==="es"?HMe():t==="hi"?qMe():$Me()}),GMe=()=>"Context window used",VMe=()=>"已使用的上下文窗口",KMe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",WMe=()=>"المستخدَم من نافذة السياق",QMe=()=>"Ventana de contexto usada",XMe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",YMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VMe():t==="fa"?KMe():t==="ar"?WMe():t==="es"?QMe():t==="hi"?XMe():GMe()}),ZMe=e=>`${e==null?void 0:e.value} tokens`,JMe=e=>`${e==null?void 0:e.value} 个 token`,eOe=e=>`${e==null?void 0:e.value} توکن`,tOe=e=>`${e==null?void 0:e.value} رمز`,nOe=e=>`${e==null?void 0:e.value} tokens`,rOe=e=>`${e==null?void 0:e.value} टोकन`,sOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JMe(e):t==="fa"?eOe(e):t==="ar"?tOe(e):t==="es"?nOe(e):t==="hi"?rOe(e):ZMe(e)}),iOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,aOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,oOe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,cOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,lOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,uOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,_Oe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aOe(e):t==="fa"?oOe(e):t==="ar"?cOe(e):t==="es"?lOe(e):t==="hi"?uOe(e):iOe(e)}),fOe=()=>"Copy the last response",dOe=()=>"复制最新回复",hOe=()=>"کپی آخرین پاسخ",pOe=()=>"نسخ آخر رد",mOe=()=>"Copia la última respuesta",gOe=()=>"आखिरी जवाब कॉपी करें",vOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dOe():t==="fa"?hOe():t==="ar"?pOe():t==="es"?mOe():t==="hi"?gOe():fOe()}),bOe=()=>"Dismiss",yOe=()=>"关闭",xOe=()=>"بستن",wOe=()=>"تجاهل",kOe=()=>"Descartar",SOe=()=>"खारिज करें",COe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yOe():t==="fa"?xOe():t==="ar"?wOe():t==="es"?kOe():t==="hi"?SOe():bOe()}),EOe=()=>"Download the app",NOe=()=>"下载应用",zOe=()=>"دانلود برنامه",jOe=()=>"تنزيل التطبيق",AOe=()=>"Descargar la aplicación",TOe=()=>"ऐप डाउनलोड करें",ROe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NOe():t==="fa"?zOe():t==="ar"?jOe():t==="es"?AOe():t==="hi"?TOe():EOe()}),MOe=()=>"OpenResearch is now a desktop app. Your projects open there as they are, with no terminal to keep running.",OOe=()=>"OpenResearch 现已推出桌面应用。你的项目会在应用中原样打开,无需保持终端运行。",DOe=()=>"OpenResearch اکنون یک برنامهٔ دسکتاپ است. پروژه‌های شما همان‌طور که هستند در آن باز می‌شوند، بدون نیاز به ترمینال باز.",LOe=()=>"أصبح OpenResearch تطبيقًا لسطح المكتب. تُفتح مشاريعك فيه كما هي، دون الحاجة إلى إبقاء الطرفية قيد التشغيل.",IOe=()=>"OpenResearch ya es una aplicación de escritorio. Tus proyectos se abren tal como están, sin una terminal que mantener abierta.",$Oe=()=>"OpenResearch अब एक डेस्कटॉप ऐप है। आपके प्रोजेक्ट वहां जैसे हैं वैसे ही खुलते हैं, टर्मिनल चालू रखने की ज़रूरत नहीं।",BOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OOe():t==="fa"?DOe():t==="ar"?LOe():t==="es"?IOe():t==="hi"?$Oe():MOe()}),POe=()=>"No runs yet — ask the agent to launch one.",FOe=()=>"尚无运行——让智能体启动一个。",HOe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",qOe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",UOe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",GOe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",VOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FOe():t==="fa"?HOe():t==="ar"?qOe():t==="es"?UOe():t==="hi"?GOe():POe()}),KOe=()=>"Run",WOe=()=>"运行",QOe=()=>"اجرا",XOe=()=>"تشغيل",YOe=()=>"Ejecución",ZOe=()=>"रन",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WOe():t==="fa"?QOe():t==="ar"?XOe():t==="es"?YOe():t==="hi"?ZOe():KOe()}),JOe=()=>"Switch run",eDe=()=>"切换运行",tDe=()=>"تغییر اجرا",nDe=()=>"تبديل التشغيل",rDe=()=>"Cambiar de ejecución",sDe=()=>"रन बदलें",iDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eDe():t==="fa"?tDe():t==="ar"?nDe():t==="es"?rDe():t==="hi"?sDe():JOe()}),aDe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,oDe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,cDe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,lDe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,uDe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,_De=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,fDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oDe(e):t==="fa"?cDe(e):t==="ar"?lDe(e):t==="es"?uDe(e):t==="hi"?_De(e):aDe(e)}),dDe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,hDe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,pDe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,mDe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,gDe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,vDe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,bDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hDe(e):t==="fa"?pDe(e):t==="ar"?mDe(e):t==="es"?gDe(e):t==="hi"?vDe(e):dDe(e)}),yDe=e=>`${e==null?void 0:e.value}m`,xDe=e=>`${e==null?void 0:e.value} 分钟`,wDe=e=>`${e==null?void 0:e.value} دقیقه`,kDe=e=>`${e==null?void 0:e.value}د`,SDe=e=>`${e==null?void 0:e.value} min`,CDe=e=>`${e==null?void 0:e.value}मि`,EDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xDe(e):t==="fa"?wDe(e):t==="ar"?kDe(e):t==="es"?SDe(e):t==="hi"?CDe(e):yDe(e)}),NDe=e=>`${e==null?void 0:e.value}s`,zDe=e=>`${e==null?void 0:e.value} 秒`,jDe=e=>`${e==null?void 0:e.value} ثانیه`,ADe=e=>`${e==null?void 0:e.value}ث`,TDe=e=>`${e==null?void 0:e.value} s`,RDe=e=>`${e==null?void 0:e.value}से`,MDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zDe(e):t==="fa"?jDe(e):t==="ar"?ADe(e):t==="es"?TDe(e):t==="hi"?RDe(e):NDe(e)}),ODe=()=>"Code",DDe=()=>"代码",LDe=()=>"کد",IDe=()=>"الشيفرة",$De=()=>"Código",BDe=()=>"कोड",PDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DDe():t==="fa"?LDe():t==="ar"?IDe():t==="es"?$De():t==="hi"?BDe():ODe()}),FDe=()=>"created",HDe=()=>"创建于",qDe=()=>"ایجادشده",UDe=()=>"أُنشئ",GDe=()=>"creado",VDe=()=>"बनाया गया",KDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HDe():t==="fa"?qDe():t==="ar"?UDe():t==="es"?GDe():t==="hi"?VDe():FDe()}),WDe=()=>"from",QDe=()=>"来自",XDe=()=>"از",YDe=()=>"من",ZDe=()=>"desde",JDe=()=>"से",eLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QDe():t==="fa"?XDe():t==="ar"?YDe():t==="es"?ZDe():t==="hi"?JDe():WDe()}),tLe=()=>"Logs",nLe=()=>"日志",rLe=()=>"گزارش‌ها",sLe=()=>"السجلات",iLe=()=>"Logs",aLe=()=>"लॉग",oLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nLe():t==="fa"?rLe():t==="ar"?sLe():t==="es"?iLe():t==="hi"?aLe():tLe()}),cLe=()=>"Latest run",lLe=()=>"最新运行",uLe=()=>"آخرین اجرا",_Le=()=>"أحدث تشغيل",fLe=()=>"Última ejecución",dLe=()=>"नवीनतम रन",hLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lLe():t==="fa"?uLe():t==="ar"?_Le():t==="es"?fLe():t==="hi"?dLe():cLe()}),pLe=()=>"Code",mLe=()=>"代码",gLe=()=>"کد",vLe=()=>"الشيفرة",bLe=()=>"Código",yLe=()=>"कोड",xLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mLe():t==="fa"?gLe():t==="ar"?vLe():t==="es"?bLe():t==="hi"?yLe():pLe()}),wLe=()=>"Commit",kLe=()=>"提交",SLe=()=>"کامیت",CLe=()=>"إيداع",ELe=()=>"Commit",NLe=()=>"कमिट",zLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kLe():t==="fa"?SLe():t==="ar"?CLe():t==="es"?ELe():t==="hi"?NLe():wLe()}),jLe=()=>"created",ALe=()=>"创建于",TLe=()=>"ایجادشده",RLe=()=>"أُنشئ",MLe=()=>"creado",OLe=()=>"बनाया गया",DLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ALe():t==="fa"?TLe():t==="ar"?RLe():t==="es"?MLe():t==="hi"?OLe():jLe()}),LLe=()=>"Description",ILe=()=>"说明",$Le=()=>"توضیحات",BLe=()=>"الوصف",PLe=()=>"Descripción",FLe=()=>"विवरण",HLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ILe():t==="fa"?$Le():t==="ar"?BLe():t==="es"?PLe():t==="hi"?FLe():LLe()}),qLe=()=>"Duration",ULe=()=>"时长",GLe=()=>"مدت",VLe=()=>"المدة",KLe=()=>"Duración",WLe=()=>"अवधि",QLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULe():t==="fa"?GLe():t==="ar"?VLe():t==="es"?KLe():t==="hi"?WLe():qLe()}),XLe=()=>"exit",YLe=()=>"退出码",ZLe=()=>"خروج",JLe=()=>"رمز الخروج",eIe=()=>"salida",tIe=()=>"एग्ज़िट",nIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YLe():t==="fa"?ZLe():t==="ar"?JLe():t==="es"?eIe():t==="hi"?tIe():XLe()}),rIe=()=>"from",sIe=()=>"来自",iIe=()=>"از",aIe=()=>"من",oIe=()=>"desde",cIe=()=>"से",lIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sIe():t==="fa"?iIe():t==="ar"?aIe():t==="es"?oIe():t==="hi"?cIe():rIe()}),uIe=()=>"Logs",_Ie=()=>"日志",fIe=()=>"گزارش‌ها",dIe=()=>"السجلات",hIe=()=>"Logs",pIe=()=>"लॉग",mIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ie():t==="fa"?fIe():t==="ar"?dIe():t==="es"?hIe():t==="hi"?pIe():uIe()}),gIe=()=>"Run",vIe=()=>"运行",bIe=()=>"اجرا",yIe=()=>"تشغيل",xIe=()=>"Ejecución",wIe=()=>"रन",kIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vIe():t==="fa"?bIe():t==="ar"?yIe():t==="es"?xIe():t==="hi"?wIe():gIe()}),SIe=()=>"Run history",CIe=()=>"运行历史",EIe=()=>"تاریخچهٔ اجرا",NIe=()=>"سجل التشغيل",zIe=()=>"Historial de ejecuciones",jIe=()=>"रन इतिहास",AIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CIe():t==="fa"?EIe():t==="ar"?NIe():t==="es"?zIe():t==="hi"?jIe():SIe()}),TIe=()=>"Started",RIe=()=>"开始时间",MIe=()=>"آغاز",OIe=()=>"بدأ",DIe=()=>"Inicio",LIe=()=>"शुरू हुआ",IIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RIe():t==="fa"?MIe():t==="ar"?OIe():t==="es"?DIe():t==="hi"?LIe():TIe()}),$Ie=()=>"Runs",BIe=()=>"运行",PIe=()=>"اجراها",FIe=()=>"عمليات التشغيل",HIe=()=>"Ejecuciones",qIe=()=>"रन",UIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BIe():t==="fa"?PIe():t==="ar"?FIe():t==="es"?HIe():t==="hi"?qIe():$Ie()}),GIe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",VIe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",KIe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",WIe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",QIe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",XIe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",YIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VIe():t==="fa"?KIe():t==="ar"?WIe():t==="es"?QIe():t==="hi"?XIe():GIe()}),ZIe=()=>"No runs yet",JIe=()=>"还没有运行",e$e=()=>"هنوز اجرایی وجود ندارد",t$e=()=>"لا عمليات تشغيل بعد",n$e=()=>"Aún no hay ejecuciones",r$e=()=>"अभी तक कोई रन नहीं",s$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JIe():t==="fa"?e$e():t==="ar"?t$e():t==="es"?n$e():t==="hi"?r$e():ZIe()}),i$e=()=>"No experiments yet.",a$e=()=>"还没有实验。",o$e=()=>"هنوز آزمایشی وجود ندارد.",c$e=()=>"لا توجد تجارب بعد.",l$e=()=>"Aún no hay experimentos.",u$e=()=>"अभी तक कोई प्रयोग नहीं।",_$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a$e():t==="fa"?o$e():t==="ar"?c$e():t==="es"?l$e():t==="hi"?u$e():i$e()}),f$e=()=>"Not run yet",d$e=()=>"尚未运行",h$e=()=>"هنوز اجرا نشده",p$e=()=>"لم تُشغَّل بعد",m$e=()=>"Aún sin ejecutar",g$e=()=>"अभी तक नहीं चलाया गया",v$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d$e():t==="fa"?h$e():t==="ar"?p$e():t==="es"?m$e():t==="hi"?g$e():f$e()}),b$e=()=>"1 run",y$e=()=>"1 次运行",x$e=()=>"۱ اجرا",w$e=()=>"تشغيل واحد",k$e=()=>"1 ejecución",S$e=()=>"1 रन",C$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y$e():t==="fa"?x$e():t==="ar"?w$e():t==="es"?k$e():t==="hi"?S$e():b$e()}),E$e=()=>"Open logs",N$e=()=>"打开日志",z$e=()=>"باز کردن گزارش‌ها",j$e=()=>"فتح السجلات",A$e=()=>"Abrir logs",T$e=()=>"लॉग खोलें",R$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N$e():t==="fa"?z$e():t==="ar"?j$e():t==="es"?A$e():t==="hi"?T$e():E$e()}),M$e=e=>`${e==null?void 0:e.count} runs`,O$e=e=>`${e==null?void 0:e.count} 次运行`,D$e=e=>`${e==null?void 0:e.count} اجرا`,L$e=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,I$e=e=>`${e==null?void 0:e.count} ejecuciones`,$$e=e=>`${e==null?void 0:e.count} रन`,B$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O$e(e):t==="fa"?D$e(e):t==="ar"?L$e(e):t==="es"?I$e(e):t==="hi"?$$e(e):M$e(e)}),P$e=()=>"Stop requested",F$e=()=>"已请求停止",H$e=()=>"درخواست توقف ثبت شد",q$e=()=>"طُلب الإيقاف",U$e=()=>"Detención solicitada",G$e=()=>"रोकने का अनुरोध किया गया",V$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F$e():t==="fa"?H$e():t==="ar"?q$e():t==="es"?U$e():t==="hi"?G$e():P$e()}),K$e=()=>"Stop run",W$e=()=>"停止运行",Q$e=()=>"توقف اجرا",X$e=()=>"إيقاف التشغيل",Y$e=()=>"Detener ejecución",Z$e=()=>"रन रोकें",J$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W$e():t==="fa"?Q$e():t==="ar"?X$e():t==="es"?Y$e():t==="hi"?Z$e():K$e()}),eBe=()=>"Code",tBe=()=>"代码",nBe=()=>"کد",rBe=()=>"الشيفرة",sBe=()=>"Código",iBe=()=>"कोड",aBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tBe():t==="fa"?nBe():t==="ar"?rBe():t==="es"?sBe():t==="hi"?iBe():eBe()}),oBe=()=>"Experiments",cBe=()=>"实验",lBe=()=>"آزمایش‌ها",uBe=()=>"التجارب",_Be=()=>"Experimentos",fBe=()=>"प्रयोग",dBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cBe():t==="fa"?lBe():t==="ar"?uBe():t==="es"?_Be():t==="hi"?fBe():oBe()}),hBe=()=>"Logs",pBe=()=>"日志",mBe=()=>"گزارش‌ها",gBe=()=>"السجلات",vBe=()=>"Logs",bBe=()=>"लॉग",$3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pBe():t==="fa"?mBe():t==="ar"?gBe():t==="es"?vBe():t==="hi"?bBe():hBe()}),yBe=()=>"Stop failed:",xBe=()=>"停止失败:",wBe=()=>"توقف ناموفق بود:",kBe=()=>"فشل الإيقاف:",SBe=()=>"Error al detener:",CBe=()=>"रोकना विफल:",EBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xBe():t==="fa"?wBe():t==="ar"?kBe():t==="es"?SBe():t==="hi"?CBe():yBe()}),NBe=()=>"Download this chat as Markdown",zBe=()=>"将此聊天下载为 Markdown",jBe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",ABe=()=>"تنزيل هذه المحادثة بتنسيق Markdown",TBe=()=>"Descarga este chat en Markdown",RBe=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",MBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBe():t==="fa"?jBe():t==="ar"?ABe():t==="es"?TBe():t==="hi"?RBe():NBe()}),OBe=()=>"Clipboard access is unavailable.",DBe=()=>"无法访问剪贴板。",LBe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",IBe=()=>"الوصول إلى الحافظة غير متاح.",$Be=()=>"El acceso al portapapeles no está disponible.",BBe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBe():t==="fa"?LBe():t==="ar"?IBe():t==="es"?$Be():t==="hi"?BBe():OBe()}),PBe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,FBe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,HBe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,qBe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,UBe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,GBe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,VBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FBe(e):t==="fa"?HBe(e):t==="ar"?qBe(e):t==="es"?UBe(e):t==="hi"?GBe(e):PBe(e)}),KBe=()=>"Duplicate",WBe=()=>"创建副本",QBe=()=>"ایجاد نسخهٔ تکراری",XBe=()=>"تكرار",YBe=()=>"Duplicar",ZBe=()=>"डुप्लिकेट करें",JBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WBe():t==="fa"?QBe():t==="ar"?XBe():t==="es"?YBe():t==="hi"?ZBe():KBe()}),ePe=e=>`File actions for ${e==null?void 0:e.path}`,tPe=e=>`${e==null?void 0:e.path} 的文件操作`,nPe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,rPe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,sPe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,iPe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,aPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tPe(e):t==="fa"?nPe(e):t==="ar"?rPe(e):t==="es"?sPe(e):t==="hi"?iPe(e):ePe(e)}),oPe=()=>"Open",cPe=()=>"打开",lPe=()=>"باز کردن",uPe=()=>"فتح",_Pe=()=>"Abrir",fPe=()=>"खोलें",dPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cPe():t==="fa"?lPe():t==="ar"?uPe():t==="es"?_Pe():t==="hi"?fPe():oPe()}),hPe=e=>`Rename ${e==null?void 0:e.path}`,pPe=e=>`重命名 ${e==null?void 0:e.path}`,mPe=e=>`تغییر نام ${e==null?void 0:e.path}`,gPe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,vPe=e=>`Renombrar ${e==null?void 0:e.path}`,bPe=e=>`${e==null?void 0:e.path} का नाम बदलें`,yPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pPe(e):t==="fa"?mPe(e):t==="ar"?gPe(e):t==="es"?vPe(e):t==="hi"?bPe(e):hPe(e)}),xPe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,wPe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,kPe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,SPe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,CPe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,EPe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,NPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wPe(e):t==="fa"?kPe(e):t==="ar"?SPe(e):t==="es"?CPe(e):t==="hi"?EPe(e):xPe(e)}),zPe=()=>"Binary file — no inline preview.",jPe=()=>"二进制文件——无法内嵌预览。",APe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",TPe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",RPe=()=>"Archivo binario — sin vista previa.",MPe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",OPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jPe():t==="fa"?APe():t==="ar"?TPe():t==="es"?RPe():t==="hi"?MPe():zPe()}),DPe=()=>"This file changed on disk. Your edits have not been overwritten.",LPe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",IPe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",$Pe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",BPe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",PPe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LPe():t==="fa"?IPe():t==="ar"?$Pe():t==="es"?BPe():t==="hi"?PPe():DPe()}),FPe=()=>"Compile failed",HPe=()=>"编译失败",qPe=()=>"کامپایل ناموفق بود",UPe=()=>"فشل التجميع",GPe=()=>"Error al compilar",VPe=()=>"कंपाइल विफल",KPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HPe():t==="fa"?qPe():t==="ar"?UPe():t==="es"?GPe():t==="hi"?VPe():FPe()}),WPe=()=>"Compile PDF",QPe=()=>"编译 PDF",XPe=()=>"کامپایل PDF",YPe=()=>"تجميع PDF",ZPe=()=>"Compilar PDF",JPe=()=>"PDF कंपाइल करें",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QPe():t==="fa"?XPe():t==="ar"?YPe():t==="es"?ZPe():t==="hi"?JPe():WPe()}),eFe=()=>"Compiled, but the engine reported errors — check the output below.",tFe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",nFe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",rFe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",sFe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",iFe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",aFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tFe():t==="fa"?nFe():t==="ar"?rFe():t==="es"?sFe():t==="hi"?iFe():eFe()}),oFe=()=>"Copy command",cFe=()=>"复制命令",lFe=()=>"کپی فرمان",uFe=()=>"نسخ الأمر",_Fe=()=>"Copiar comando",fFe=()=>"कमांड कॉपी करें",dFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cFe():t==="fa"?lFe():t==="ar"?uFe():t==="es"?_Fe():t==="hi"?fFe():oFe()}),hFe=()=>"Copy file contents",pFe=()=>"复制文件内容",mFe=()=>"کپی محتوای فایل",gFe=()=>"نسخ محتوى الملف",vFe=()=>"Copiar contenido del archivo",bFe=()=>"फ़ाइल की सामग्री कॉपी करें",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pFe():t==="fa"?mFe():t==="ar"?gFe():t==="es"?vFe():t==="hi"?bFe():hFe()}),yFe=()=>"Could not copy file contents",xFe=()=>"无法复制文件内容",wFe=()=>"کپی محتوای فایل ممکن نشد",kFe=()=>"تعذّر نسخ محتوى الملف",SFe=()=>"No se pudo copiar el contenido del archivo",CFe=()=>"फ़ाइल की सामग्री कॉपी नहीं हो सकी",EFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xFe():t==="fa"?wFe():t==="ar"?kFe():t==="es"?SFe():t==="hi"?CFe():yFe()}),NFe=()=>"Copy install command",zFe=()=>"复制安装命令",jFe=()=>"کپی فرمان نصب",AFe=()=>"نسخ أمر التثبيت",TFe=()=>"Copiar comando de instalación",RFe=()=>"इंस्टॉल कमांड कॉपी करें",MFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFe():t==="fa"?jFe():t==="ar"?AFe():t==="es"?TFe():t==="hi"?RFe():NFe()}),OFe=()=>"This file was deleted on disk. Your edits have not been discarded.",DFe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",LFe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",IFe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",$Fe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",BFe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DFe():t==="fa"?LFe():t==="ar"?IFe():t==="es"?$Fe():t==="hi"?BFe():OFe()}),PFe=()=>"Discard my edits and reload",FFe=()=>"放弃我的编辑并重新加载",HFe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",qFe=()=>"تجاهل تعديلاتي وإعادة التحميل",UFe=()=>"Descartar mis cambios y recargar",GFe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",VFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FFe():t==="fa"?HFe():t==="ar"?qFe():t==="es"?UFe():t==="hi"?GFe():PFe()}),KFe=()=>"Discard unsaved changes and close this file?",WFe=()=>"要丢弃未保存的更改并关闭此文件吗?",QFe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",XFe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",YFe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",ZFe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WFe():t==="fa"?QFe():t==="ar"?XFe():t==="es"?YFe():t==="hi"?ZFe():KFe()}),JFe=()=>"Dismiss",eHe=()=>"关闭",tHe=()=>"بستن",nHe=()=>"تجاهل",rHe=()=>"Cerrar",sHe=()=>"खारिज करें",iHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eHe():t==="fa"?tHe():t==="ar"?nHe():t==="es"?rHe():t==="hi"?sHe():JFe()}),aHe=()=>"Dismiss compile message",oHe=()=>"关闭编译消息",cHe=()=>"بستن پیام کامپایل",lHe=()=>"تجاهل رسالة التجميع",uHe=()=>"Cerrar mensaje de compilación",_He=()=>"कंपाइल संदेश खारिज करें",fHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe():t==="fa"?cHe():t==="ar"?lHe():t==="es"?uHe():t==="hi"?_He():aHe()}),dHe=()=>"Dismiss Overleaf message",hHe=()=>"关闭 Overleaf 消息",pHe=()=>"بستن پیام Overleaf",mHe=()=>"تجاهل رسالة Overleaf",gHe=()=>"Cerrar mensaje de Overleaf",vHe=()=>"Overleaf संदेश खारिज करें",bHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hHe():t==="fa"?pHe():t==="ar"?mHe():t==="es"?gHe():t==="hi"?vHe():dHe()}),yHe=()=>"Download",xHe=()=>"下载",wHe=()=>"بارگیری",kHe=()=>"تنزيل",SHe=()=>"Descargar",CHe=()=>"डाउनलोड करें",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xHe():t==="fa"?wHe():t==="ar"?kHe():t==="es"?SHe():t==="hi"?CHe():yHe()}),EHe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,NHe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,zHe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,jHe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,AHe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,THe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,RHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NHe(e):t==="fa"?zHe(e):t==="ar"?jHe(e):t==="es"?AHe(e):t==="hi"?THe(e):EHe(e)}),MHe=()=>"Failed to load file:",OHe=()=>"加载文件失败:",DHe=()=>"بارگیری فایل ناموفق بود:",LHe=()=>"تعذّر تحميل الملف:",IHe=()=>"Error al cargar el archivo:",$He=()=>"फ़ाइल लोड नहीं हो सकी:",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OHe():t==="fa"?DHe():t==="ar"?LHe():t==="es"?IHe():t==="hi"?$He():MHe()}),BHe=()=>"File truncated — showing the first 512 KB.",PHe=()=>"文件已截断——仅显示前 512 KB。",FHe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",HHe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",qHe=()=>"Archivo truncado — se muestran los primeros 512 KB.",UHe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",GHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PHe():t==="fa"?FHe():t==="ar"?HHe():t==="es"?qHe():t==="hi"?UHe():BHe()}),VHe=()=>"The page below stops partway — the full file could not be loaded.",KHe=()=>"下方页面在中途结束——无法加载完整文件。",WHe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",QHe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",XHe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",YHe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",ZHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KHe():t==="fa"?WHe():t==="ar"?QHe():t==="es"?XHe():t==="hi"?YHe():VHe()}),JHe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,eqe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,tqe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,nqe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,rqe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,sqe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,iqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe(e):t==="fa"?tqe(e):t==="ar"?nqe(e):t==="es"?rqe(e):t==="hi"?sqe(e):JHe(e)}),aqe=()=>"Loading…",oqe=()=>"正在加载…",cqe=()=>"در حال بارگیری…",lqe=()=>"جارٍ التحميل…",uqe=()=>"Cargando…",_qe=()=>"लोड हो रहा है…",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oqe():t==="fa"?cqe():t==="ar"?lqe():t==="es"?uqe():t==="hi"?_qe():aqe()}),fqe=()=>"File not found.",dqe=()=>"找不到文件。",hqe=()=>"فایل پیدا نشد.",pqe=()=>"لم يُعثر على الملف.",mqe=()=>"No se encontró el archivo.",gqe=()=>"फ़ाइल नहीं मिली।",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dqe():t==="fa"?hqe():t==="ar"?pqe():t==="es"?mqe():t==="hi"?gqe():fqe()}),vqe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,bqe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,yqe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,xqe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,wqe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,kqe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,Sqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bqe(e):t==="fa"?yqe(e):t==="ar"?xqe(e):t==="es"?wqe(e):t==="hi"?kqe(e):vqe(e)}),Cqe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,Eqe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Nqe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,zqe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,jqe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,Aqe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,Tqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Eqe(e):t==="fa"?Nqe(e):t==="ar"?zqe(e):t==="es"?jqe(e):t==="hi"?Aqe(e):Cqe(e)}),Rqe=()=>"File not found on disk.",Mqe=()=>"磁盘上找不到此文件。",Oqe=()=>"فایل روی دیسک پیدا نشد.",Dqe=()=>"لم يُعثر على الملف على القرص.",Lqe=()=>"No se encontró el archivo en disco.",Iqe=()=>"फ़ाइल डिस्क पर नहीं मिली।",$qe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mqe():t==="fa"?Oqe():t==="ar"?Dqe():t==="es"?Lqe():t==="hi"?Iqe():Rqe()}),Bqe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Pqe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,Fqe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Hqe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,qqe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,Uqe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,Gqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqe(e):t==="fa"?Fqe(e):t==="ar"?Hqe(e):t==="es"?qqe(e):t==="hi"?Uqe(e):Bqe(e)}),Vqe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Kqe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Wqe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,Qqe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,Xqe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,Yqe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,Zqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqe(e):t==="fa"?Wqe(e):t==="ar"?Qqe(e):t==="es"?Xqe(e):t==="hi"?Yqe(e):Vqe(e)}),Jqe=()=>"Open in default editor",eUe=()=>"在默认编辑器中打开",tUe=()=>"باز کردن در ویرایشگر پیش‌فرض",nUe=()=>"فتح في المحرر الافتراضي",rUe=()=>"Abrir en el editor predeterminado",sUe=()=>"डिफ़ॉल्ट एडिटर में खोलें",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe():t==="fa"?tUe():t==="ar"?nUe():t==="es"?rUe():t==="hi"?sUe():Jqe()}),iUe=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,aUe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,oUe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,cUe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,lUe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,uUe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,_Ue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aUe(e):t==="fa"?oUe(e):t==="ar"?cUe(e):t==="es"?lUe(e):t==="hi"?uUe(e):iUe(e)}),fUe=()=>"Only for projects on this computer",dUe=()=>"仅适用于此电脑上的项目",hUe=()=>"فقط برای پروژه‌های این رایانه",pUe=()=>"فقط للمشاريع على هذا الكمبيوتر",mUe=()=>"Solo para proyectos en este equipo",gUe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",vUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUe():t==="fa"?hUe():t==="ar"?pUe():t==="es"?mUe():t==="hi"?gUe():fUe()}),bUe=()=>"Only for files in the project folder",yUe=()=>"仅适用于项目文件夹中的文件",xUe=()=>"فقط برای فایل‌های پوشهٔ پروژه",wUe=()=>"فقط لملفات مجلد المشروع",kUe=()=>"Solo para archivos de la carpeta del proyecto",SUe=()=>"केवल प्रोजेक्ट फ़ोल्डर की फ़ाइलों के लिए",CUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yUe():t==="fa"?xUe():t==="ar"?wUe():t==="es"?kUe():t==="hi"?SUe():bUe()}),EUe=()=>"Overleaf's copy of this file was pulled while you had unsaved edits, so what you see is no longer what is on disk. Saving now sends this draft to Overleaf instead.",NUe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",zUe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",jUe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",AUe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",TUe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",RUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NUe():t==="fa"?zUe():t==="ar"?jUe():t==="es"?AUe():t==="hi"?TUe():EUe()}),MUe=()=>"Overwrite disk file",OUe=()=>"覆盖磁盘文件",DUe=()=>"بازنویسی فایل روی دیسک",LUe=()=>"استبدال الملف على القرص",IUe=()=>"Sobrescribir el archivo en disco",$Ue=()=>"डिस्क फ़ाइल अधिलेखित करें",BUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OUe():t==="fa"?DUe():t==="ar"?LUe():t==="es"?IUe():t==="hi"?$Ue():MUe()}),PUe=()=>"Compiled PDF is out of date",FUe=()=>"已编译的 PDF 不是最新版本",HUe=()=>"PDF کامپایل‌شده به‌روز نیست",qUe=()=>"ملف PDF المُجمَّع غير محدَّث",UUe=()=>"El PDF compilado está desactualizado",GUe=()=>"कंपाइल की गई PDF पुरानी है",VUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FUe():t==="fa"?HUe():t==="ar"?qUe():t==="es"?UUe():t==="hi"?GUe():PUe()}),KUe=()=>"project clone",WUe=()=>"项目克隆",QUe=()=>"کلون پروژه",XUe=()=>"نسخة المشروع المستنسخة",YUe=()=>"el clon del proyecto",ZUe=()=>"प्रोजेक्ट क्लोन",S1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WUe():t==="fa"?QUe():t==="ar"?XUe():t==="es"?YUe():t==="hi"?ZUe():KUe()}),JUe=()=>"Recompile PDF",eGe=()=>"重新编译 PDF",tGe=()=>"کامپایل دوبارهٔ PDF",nGe=()=>"إعادة تجميع PDF",rGe=()=>"Volver a compilar el PDF",sGe=()=>"PDF फिर से कंपाइल करें",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eGe():t==="fa"?tGe():t==="ar"?nGe():t==="es"?rGe():t==="hi"?sGe():JUe()}),iGe=()=>"Reload from disk",aGe=()=>"从磁盘重新加载",oGe=()=>"بارگذاری مجدد از دیسک",cGe=()=>"إعادة التحميل من القرص",lGe=()=>"Recargar desde el disco",uGe=()=>"डिस्क से फिर से लोड करें",_Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe():t==="fa"?oGe():t==="ar"?cGe():t==="es"?lGe():t==="hi"?uGe():iGe()}),fGe=()=>"Reveal in file manager",dGe=()=>"在文件管理器中显示",hGe=()=>"نمایش در مدیر فایل",pGe=()=>"إظهار في مدير الملفات",mGe=()=>"Mostrar en el administrador de archivos",gGe=()=>"फ़ाइल मैनेजर में दिखाएँ",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dGe():t==="fa"?hGe():t==="ar"?pGe():t==="es"?mGe():t==="hi"?gGe():fGe()}),vGe=()=>"Save failed",bGe=()=>"保存失败",yGe=()=>"ذخیره ناموفق بود",xGe=()=>"فشل الحفظ",wGe=()=>"Error al guardar",kGe=()=>"सेव विफल",SGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bGe():t==="fa"?yGe():t==="ar"?xGe():t==="es"?wGe():t==="hi"?kGe():vGe()}),CGe=()=>"Saving…",EGe=()=>"正在保存…",NGe=()=>"در حال ذخیره…",zGe=()=>"جارٍ الحفظ…",jGe=()=>"Guardando…",AGe=()=>"सेव हो रहा है…",TGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EGe():t==="fa"?NGe():t==="ar"?zGe():t==="es"?jGe():t==="hi"?AGe():CGe()}),RGe=()=>"Selected — press ⌘C",MGe=()=>"已选中 — 按 ⌘C 复制",OGe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",DGe=()=>"محدد — اضغط ⌘C",LGe=()=>"Seleccionado — pulsa ⌘C",IGe=()=>"चयनित — ⌘C दबाएं",$Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MGe():t==="fa"?OGe():t==="ar"?DGe():t==="es"?LGe():t==="hi"?IGe():RGe()}),BGe=()=>"session’s worktree",PGe=()=>"会话工作树",FGe=()=>"درخت کاری نشست",HGe=()=>"شجرة عمل الجلسة",qGe=()=>"el árbol de trabajo de la sesión",UGe=()=>"सेशन की वर्कट्री",C1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PGe():t==="fa"?FGe():t==="ar"?HGe():t==="es"?qGe():t==="hi"?UGe():BGe()}),GGe=()=>"Show compiled PDF",VGe=()=>"显示已编译的 PDF",KGe=()=>"نمایش PDF کامپایل‌شده",WGe=()=>"عرض ملف PDF المُجمَّع",QGe=()=>"Mostrar el PDF compilado",XGe=()=>"कंपाइल की गई PDF दिखाएं",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VGe():t==="fa"?KGe():t==="ar"?WGe():t==="es"?QGe():t==="hi"?XGe():GGe()}),YGe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",ZGe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",JGe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",eVe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",tVe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",nVe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",rVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZGe():t==="fa"?JGe():t==="ar"?eVe():t==="es"?tVe():t==="hi"?nVe():YGe()}),sVe=()=>"This session's worktree isn't available — showing the project clone's copy.",iVe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",aVe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",oVe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",cVe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",lVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",uVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iVe():t==="fa"?aVe():t==="ar"?oVe():t==="es"?cVe():t==="hi"?lVe():sVe()}),_Ve=()=>"Unsaved",fVe=()=>"未保存",dVe=()=>"ذخیره نشده",hVe=()=>"غير محفوظ",pVe=()=>"Sin guardar",mVe=()=>"सेव नहीं हुआ",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fVe():t==="fa"?dVe():t==="ar"?hVe():t==="es"?pVe():t==="hi"?mVe():_Ve()}),gVe=()=>"Unsaved — ⌘S to save",vVe=()=>"未保存 — 按 ⌘S 保存",bVe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",yVe=()=>"غير محفوظ — ⌘S للحفظ",xVe=()=>"Sin guardar — ⌘S para guardar",wVe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",kVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVe():t==="fa"?bVe():t==="ar"?yVe():t==="es"?xVe():t==="hi"?wVe():gVe()}),SVe=()=>"Update orx on the remote machine to edit this file safely.",CVe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",EVe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",NVe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",zVe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",jVe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",AVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CVe():t==="fa"?EVe():t==="ar"?NVe():t==="es"?zVe():t==="hi"?jVe():SVe()}),TVe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",RVe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",MVe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",OVe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",DVe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",LVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",IVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RVe():t==="fa"?MVe():t==="ar"?OVe():t==="es"?DVe():t==="hi"?LVe():TVe()}),$Ve=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",BVe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",PVe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",FVe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",HVe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",qVe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",UVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BVe():t==="fa"?PVe():t==="ar"?FVe():t==="es"?HVe():t==="hi"?qVe():$Ve()}),GVe=()=>"Back to preview",VVe=()=>"返回预览",KVe=()=>"بازگشت به پیش‌نمایش",WVe=()=>"العودة إلى المعاينة",QVe=()=>"Volver a la vista previa",XVe=()=>"प्रीव्यू पर वापस जाएं",YVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VVe():t==="fa"?KVe():t==="ar"?WVe():t==="es"?QVe():t==="hi"?XVe():GVe()}),ZVe=e=>`${e==null?void 0:e.count} changed files`,JVe=e=>`${e==null?void 0:e.count} 个已更改文件`,eKe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,tKe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,nKe=e=>`${e==null?void 0:e.count} archivos modificados`,rKe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,yL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JVe(e):t==="fa"?eKe(e):t==="ar"?tKe(e):t==="es"?nKe(e):t==="hi"?rKe(e):ZVe(e)}),sKe=()=>"Changed files",iKe=()=>"已更改文件",aKe=()=>"فایل‌های تغییرکرده",oKe=()=>"الملفات المتغيّرة",cKe=()=>"Archivos modificados",lKe=()=>"बदली गई फ़ाइलें",uKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iKe():t==="fa"?aKe():t==="ar"?oKe():t==="es"?cKe():t==="hi"?lKe():sKe()}),_Ke=()=>"Diff preview truncated",fKe=()=>"差异预览已截断",dKe=()=>"پیش‌نمایش تفاوت کوتاه شده است",hKe=()=>"معاينة الفروق مقتطعة",pKe=()=>"Vista previa del diff truncada",mKe=()=>"डिफ़ प्रीव्यू छोटा किया गया",gKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fKe():t==="fa"?dKe():t==="ar"?hKe():t==="es"?pKe():t==="hi"?mKe():_Ke()}),vKe=e=>`${e==null?void 0:e.count} files shown (partial)`,bKe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,yKe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,xKe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,wKe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,kKe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,SKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bKe(e):t==="fa"?yKe(e):t==="ar"?xKe(e):t==="es"?wKe(e):t==="hi"?kKe(e):vKe(e)}),CKe=()=>"No changes.",EKe=()=>"没有更改。",NKe=()=>"تغییری وجود ندارد.",zKe=()=>"لا توجد تغييرات.",jKe=()=>"No hay cambios.",AKe=()=>"कोई बदलाव नहीं।",TKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EKe():t==="fa"?NKe():t==="ar"?zKe():t==="es"?jKe():t==="hi"?AKe():CKe()}),RKe=()=>"No complete file preview was available before the cutoff.",MKe=()=>"在截断位置之前没有完整的文件预览。",OKe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",DKe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",LKe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",IKe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",$Ke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MKe():t==="fa"?OKe():t==="ar"?DKe():t==="es"?LKe():t==="hi"?IKe():RKe()}),BKe=()=>"No textual diff for this file.",PKe=()=>"此文件没有文本差异。",FKe=()=>"برای این فایل تفاوت متنی وجود ندارد.",HKe=()=>"لا يوجد فرق نصّي لهذا الملف.",qKe=()=>"No hay diff de texto para este archivo.",UKe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",GKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PKe():t==="fa"?FKe():t==="ar"?HKe():t==="es"?qKe():t==="hi"?UKe():BKe()}),VKe=()=>"1 changed file",KKe=()=>"1 个已更改文件",WKe=()=>"۱ فایل تغییرکرده",QKe=()=>"ملف واحد معدَّل",XKe=()=>"1 archivo modificado",YKe=()=>"1 बदली गई फ़ाइल",xL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KKe():t==="fa"?WKe():t==="ar"?QKe():t==="es"?XKe():t==="hi"?YKe():VKe()}),ZKe=()=>"1 file shown (partial)",JKe=()=>"显示 1 个文件(部分)",eWe=()=>"۱ فایل نمایش داده شده (ناقص)",tWe=()=>"عُرض ملف واحد (جزئيًا)",nWe=()=>"1 archivo mostrado (parcial)",rWe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",sWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JKe():t==="fa"?eWe():t==="ar"?tWe():t==="es"?nWe():t==="hi"?rWe():ZKe()}),iWe=()=>"Unable to parse this diff.",aWe=()=>"无法解析此差异。",oWe=()=>"خواندن این تفاوت ممکن نبود.",cWe=()=>"تعذّر تحليل هذا الفرق.",lWe=()=>"No se pudo interpretar este diff.",uWe=()=>"यह डिफ़ पार्स नहीं हो सका।",_We=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aWe():t==="fa"?oWe():t==="ar"?cWe():t==="es"?lWe():t==="hi"?uWe():iWe()}),fWe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,dWe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,hWe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,pWe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,mWe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,gWe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,vWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dWe(e):t==="fa"?hWe(e):t==="ar"?pWe(e):t==="es"?mWe(e):t==="hi"?gWe(e):fWe(e)}),bWe=()=>"View full diff",yWe=()=>"查看完整差异",xWe=()=>"نمایش تفاوت کامل",wWe=()=>"عرض الفرق الكامل",kWe=()=>"Ver diff completo",SWe=()=>"पूरा डिफ़ देखें",CWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yWe():t==="fa"?xWe():t==="ar"?wWe():t==="es"?kWe():t==="hi"?SWe():bWe()}),EWe=()=>"Create a token ↗",NWe=()=>"创建令牌 ↗",zWe=()=>"ساخت توکن ↗",jWe=()=>"إنشاء رمز ↗",AWe=()=>"Crear un token ↗",TWe=()=>"एक टोकन बनाएं ↗",RWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NWe():t==="fa"?zWe():t==="ar"?jWe():t==="es"?AWe():t==="hi"?TWe():EWe()}),MWe=()=>"Keep the agent working toward a goal",OWe=()=>"让智能体持续朝目标推进",DWe=()=>"عامل را در مسیر یک هدف نگه دارید",LWe=()=>"اجعل الوكيل يعمل نحو هدف",IWe=()=>"Mantén al agente trabajando hacia un objetivo",$We=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",BWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OWe():t==="fa"?DWe():t==="ar"?LWe():t==="es"?IWe():t==="hi"?$We():MWe()}),PWe=()=>"Approve and run",FWe=()=>"批准并运行",HWe=()=>"تأیید و اجرا",qWe=()=>"الموافقة والتشغيل",UWe=()=>"Aprobar y ejecutar",GWe=()=>"स्वीकार करें और चलाएं",VWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FWe():t==="fa"?HWe():t==="ar"?qWe():t==="es"?UWe():t==="hi"?GWe():PWe()}),KWe=()=>"Cancel setup",WWe=()=>"取消设置",QWe=()=>"لغو راه‌اندازی",XWe=()=>"إلغاء الإعداد",YWe=()=>"Cancelar configuración",ZWe=()=>"सेटअप रद्द करें",JWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WWe():t==="fa"?QWe():t==="ar"?XWe():t==="es"?YWe():t==="hi"?ZWe():KWe()}),eQe=()=>"Checking connection…",tQe=()=>"正在检查连接…",nQe=()=>"در حال بررسی اتصال…",rQe=()=>"جارٍ التحقق من الإعداد…",sQe=()=>"Comprobando conexión…",iQe=()=>"कनेक्शन जाँचा जा रहा है…",aQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tQe():t==="fa"?nQe():t==="ar"?rQe():t==="es"?sQe():t==="hi"?iQe():eQe()}),oQe=e=>`${e==null?void 0:e.agent} is connected.`,cQe=e=>`${e==null?void 0:e.agent} 已连接。`,lQe=e=>`${e==null?void 0:e.agent} متصل است.`,uQe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,_Qe=e=>`${e==null?void 0:e.agent} está conectado.`,fQe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,dQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cQe(e):t==="fa"?lQe(e):t==="ar"?uQe(e):t==="es"?_Qe(e):t==="hi"?fQe(e):oQe(e)}),hQe=()=>"Setup needs attention.",pQe=()=>"设置需要处理。",mQe=()=>"راه‌اندازی نیاز به بررسی دارد.",gQe=()=>"تعذّر إكمال الإعداد.",vQe=()=>"La configuración requiere atención.",bQe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pQe():t==="fa"?mQe():t==="ar"?gQe():t==="es"?vQe():t==="hi"?bQe():hQe()}),yQe=()=>"Install",xQe=()=>"安装",wQe=()=>"نصب",kQe=()=>"تثبيت",SQe=()=>"Instalar",CQe=()=>"इंस्टॉल करें",EQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xQe():t==="fa"?wQe():t==="ar"?kQe():t==="es"?SQe():t==="hi"?CQe():yQe()}),NQe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,zQe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,jQe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,AQe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,TQe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,RQe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,MQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zQe(e):t==="fa"?jQe(e):t==="ar"?AQe(e):t==="es"?TQe(e):t==="hi"?RQe(e):NQe(e)}),OQe=()=>"Could not load setup commands.",DQe=()=>"无法加载设置命令。",LQe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",IQe=()=>"تعذّر تحميل أوامر الإعداد.",$Qe=()=>"No se pudieron cargar los comandos de configuración.",BQe=()=>"सेटअप कमांड लोड नहीं हो सके।",PQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DQe():t==="fa"?LQe():t==="ar"?IQe():t==="es"?$Qe():t==="hi"?BQe():OQe()}),FQe=()=>"Sign in",HQe=()=>"登录",qQe=()=>"ورود",UQe=()=>"تسجيل الدخول",GQe=()=>"Iniciar sesión",VQe=()=>"साइन इन करें",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HQe():t==="fa"?qQe():t==="ar"?UQe():t==="es"?GQe():t==="hi"?VQe():FQe()}),KQe=()=>"The agent is not ready yet. Re-check or retry sign-in.",WQe=()=>"代理尚未就绪。请重新检查或重试登录。",QQe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",XQe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",YQe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",ZQe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WQe():t==="fa"?QQe():t==="ar"?XQe():t==="es"?YQe():t==="hi"?ZQe():KQe()}),JQe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",eXe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",tXe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",nXe=()=>"يفتح طرفية هنا",rXe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",sXe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",iXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eXe():t==="fa"?tXe():t==="ar"?nXe():t==="es"?rXe():t==="hi"?sXe():JQe()}),aXe=()=>"This install command requires Node.js and npm.",oXe=()=>"此安装命令需要 Node.js 和 npm。",cXe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",lXe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",uXe=()=>"Este comando de instalación requiere Node.js y npm.",_Xe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",fXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oXe():t==="fa"?cXe():t==="ar"?lXe():t==="es"?uXe():t==="hi"?_Xe():aXe()}),dXe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,hXe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,pXe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,mXe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,gXe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,vXe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,bXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hXe(e):t==="fa"?pXe(e):t==="ar"?mXe(e):t==="es"?gXe(e):t==="hi"?vXe(e):dXe(e)}),yXe=e=>`Set up ${e==null?void 0:e.agent}`,xXe=e=>`设置 ${e==null?void 0:e.agent}`,wXe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,kXe=e=>`إعداد ${e==null?void 0:e.agent}`,SXe=e=>`Configurar ${e==null?void 0:e.agent}`,CXe=e=>`${e==null?void 0:e.agent} सेट अप करें`,mz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xXe(e):t==="fa"?wXe(e):t==="ar"?kXe(e):t==="es"?SXe(e):t==="hi"?CXe(e):yXe(e)}),EXe=()=>"Update",NXe=()=>"更新",zXe=()=>"به‌روزرسانی",jXe=()=>"تحديث",AXe=()=>"Actualizar",TXe=()=>"अपडेट करें",RXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NXe():t==="fa"?zXe():t==="ar"?jXe():t==="es"?AXe():t==="hi"?TXe():EXe()}),MXe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,OXe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,DXe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,LXe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,IXe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,$Xe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,BXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OXe(e):t==="fa"?DXe(e):t==="ar"?LXe(e):t==="es"?IXe(e):t==="hi"?$Xe(e):MXe(e)}),PXe=()=>"Hide sidebar",FXe=()=>"隐藏侧边栏",HXe=()=>"پنهان کردن نوار کناری",qXe=()=>"إخفاء الشريط الجانبي",UXe=()=>"Ocultar barra lateral",GXe=()=>"साइडबार छिपाएं",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FXe():t==="fa"?HXe():t==="ar"?qXe():t==="es"?UXe():t==="hi"?GXe():PXe()}),VXe=()=>"Project",KXe=()=>"项目",WXe=()=>"پروژه",QXe=()=>"المشروع",XXe=()=>"Proyecto",YXe=()=>"प्रोजेक्ट",ZXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KXe():t==="fa"?WXe():t==="ar"?QXe():t==="es"?XXe():t==="hi"?YXe():VXe()}),JXe=e=>`${e==null?void 0:e.count} cancelled`,eYe=e=>`${e==null?void 0:e.count} 次取消`,tYe=e=>`${e==null?void 0:e.count} لغوشده`,nYe=e=>`الملغاة: ${e==null?void 0:e.count}`,rYe=e=>`${e==null?void 0:e.count} canceladas`,sYe=e=>`${e==null?void 0:e.count} रद्द`,iYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eYe(e):t==="fa"?tYe(e):t==="ar"?nYe(e):t==="es"?rYe(e):t==="hi"?sYe(e):JXe(e)}),aYe=e=>`${e==null?void 0:e.count} done`,oYe=e=>`${e==null?void 0:e.count} 次完成`,cYe=e=>`${e==null?void 0:e.count} تمام‌شده`,lYe=e=>`المكتملة: ${e==null?void 0:e.count}`,uYe=e=>`${e==null?void 0:e.count} completadas`,_Ye=e=>`${e==null?void 0:e.count} पूरे`,fYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oYe(e):t==="fa"?cYe(e):t==="ar"?lYe(e):t==="es"?uYe(e):t==="hi"?_Ye(e):aYe(e)}),dYe=e=>`${e==null?void 0:e.count} failed`,hYe=e=>`${e==null?void 0:e.count} 次失败`,pYe=e=>`${e==null?void 0:e.count} ناموفق`,mYe=e=>`الفاشلة: ${e==null?void 0:e.count}`,gYe=e=>`${e==null?void 0:e.count} con error`,vYe=e=>`${e==null?void 0:e.count} विफल`,bYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hYe(e):t==="fa"?pYe(e):t==="ar"?mYe(e):t==="es"?gYe(e):t==="hi"?vYe(e):dYe(e)}),yYe=e=>`${e==null?void 0:e.count} files`,xYe=e=>`${e==null?void 0:e.count} 个文件`,wYe=e=>`${e==null?void 0:e.count} فایل`,kYe=e=>`الملفات: ${e==null?void 0:e.count}`,SYe=e=>`${e==null?void 0:e.count} archivos`,CYe=e=>`${e==null?void 0:e.count} फ़ाइलें`,EYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xYe(e):t==="fa"?wYe(e):t==="ar"?kYe(e):t==="es"?SYe(e):t==="hi"?CYe(e):yYe(e)}),NYe=e=>`${e==null?void 0:e.count}+ files`,zYe=e=>`至少 ${e==null?void 0:e.count} 个文件`,jYe=e=>`بیش از ${e==null?void 0:e.count} فایل`,AYe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,TYe=e=>`${e==null?void 0:e.count}+ archivos`,RYe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,MYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zYe(e):t==="fa"?jYe(e):t==="ar"?AYe(e):t==="es"?TYe(e):t==="hi"?RYe(e):NYe(e)}),OYe=e=>`${e==null?void 0:e.count} live`,DYe=e=>`${e==null?void 0:e.count} 次进行中`,LYe=e=>`${e==null?void 0:e.count} فعال`,IYe=e=>`النشطة: ${e==null?void 0:e.count}`,$Ye=e=>`${e==null?void 0:e.count} en curso`,BYe=e=>`${e==null?void 0:e.count} लाइव`,PYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DYe(e):t==="fa"?LYe(e):t==="ar"?IYe(e):t==="es"?$Ye(e):t==="hi"?BYe(e):OYe(e)}),FYe=()=>"1 file",HYe=()=>"1 个文件",qYe=()=>"۱ فایل",UYe=()=>"ملف واحد",GYe=()=>"1 archivo",VYe=()=>"1 फ़ाइल",KYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HYe():t==="fa"?qYe():t==="ar"?UYe():t==="es"?GYe():t==="hi"?VYe():FYe()}),WYe=()=>"1 run",QYe=()=>"1 次运行",XYe=()=>"۱ اجرا",YYe=()=>"تشغيل واحد",ZYe=()=>"1 ejecución",JYe=()=>"1 रन",eZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QYe():t==="fa"?XYe():t==="ar"?YYe():t==="es"?ZYe():t==="hi"?JYe():WYe()}),tZe=e=>`${e==null?void 0:e.count} runs`,nZe=e=>`${e==null?void 0:e.count} 次运行`,rZe=e=>`${e==null?void 0:e.count} اجرا`,sZe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,iZe=e=>`${e==null?void 0:e.count} ejecuciones`,aZe=e=>`${e==null?void 0:e.count} रन`,oZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nZe(e):t==="fa"?rZe(e):t==="ar"?sZe(e):t==="es"?iZe(e):t==="hi"?aZe(e):tZe(e)}),cZe=()=>"Zoom in",lZe=()=>"放大",uZe=()=>"بزرگ‌نمایی",_Ze=()=>"تكبير",fZe=()=>"Acercar",dZe=()=>"ज़ूम इन",vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lZe():t==="fa"?uZe():t==="ar"?_Ze():t==="es"?fZe():t==="hi"?dZe():cZe()}),hZe=()=>"Zoom out",pZe=()=>"缩小",mZe=()=>"کوچک‌نمایی",gZe=()=>"تصغير",vZe=()=>"Alejar",bZe=()=>"ज़ूम आउट",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pZe():t==="fa"?mZe():t==="ar"?gZe():t==="es"?vZe():t==="hi"?bZe():hZe()}),yZe=()=>"Reset zoom to fit",xZe=()=>"重置为适合窗口",wZe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",kZe=()=>"إعادة ضبط التكبير للملاءمة",SZe=()=>"Restablecer zoom para ajustar",CZe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xZe():t==="fa"?wZe():t==="ar"?kZe():t==="es"?SZe():t==="hi"?CZe():yZe()}),EZe=()=>"No instances yet.",NZe=()=>"还没有实例。",zZe=()=>"هنوز نمونه‌ای وجود ندارد.",jZe=()=>"لا توجد مثيلات بعد.",AZe=()=>"Aún no hay instancias.",TZe=()=>"अभी तक कोई इंस्टेंस नहीं।",RZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NZe():t==="fa"?zZe():t==="ar"?jZe():t==="es"?AZe():t==="hi"?TZe():EZe()}),MZe=()=>"Nothing running right now.",OZe=()=>"当前没有运行中的实例。",DZe=()=>"اکنون چیزی در حال اجرا نیست.",LZe=()=>"لا شيء قيد التشغيل الآن.",IZe=()=>"No hay nada en ejecución ahora mismo.",$Ze=()=>"अभी कुछ नहीं चल रहा।",BZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZe():t==="fa"?DZe():t==="ar"?LZe():t==="es"?IZe():t==="hi"?$Ze():MZe()}),PZe=()=>"Select a project to see its history.",FZe=()=>"请选择一个项目以查看其历史记录。",HZe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",qZe=()=>"اختر مشروعًا لرؤية سجله.",UZe=()=>"Selecciona un proyecto para ver su historial.",GZe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",VZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FZe():t==="fa"?HZe():t==="ar"?qZe():t==="es"?UZe():t==="hi"?GZe():PZe()}),KZe=()=>"Select a project to see its runs.",WZe=()=>"请选择一个项目以查看其运行。",QZe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",XZe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",YZe=()=>"Selecciona un proyecto para ver sus ejecuciones.",ZZe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",JZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WZe():t==="fa"?QZe():t==="ar"?XZe():t==="es"?YZe():t==="hi"?ZZe():KZe()}),eJe=()=>"View history",tJe=()=>"查看历史记录",nJe=()=>"مشاهدهٔ تاریخچه",rJe=()=>"عرض السجل",sJe=()=>"Ver historial",iJe=()=>"इतिहास देखें",aJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tJe():t==="fa"?nJe():t==="ar"?rJe():t==="es"?sJe():t==="hi"?iJe():eJe()}),oJe=e=>`View history (${e==null?void 0:e.count})`,cJe=e=>`查看历史记录(${e==null?void 0:e.count})`,lJe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,uJe=e=>`عرض السجل (${e==null?void 0:e.count})`,_Je=e=>`Ver historial (${e==null?void 0:e.count})`,fJe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,dJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cJe(e):t==="fa"?lJe(e):t==="ar"?uJe(e):t==="es"?_Je(e):t==="hi"?fJe(e):oJe(e)}),hJe=()=>"The engine exited without producing a PDF or a log.",pJe=()=>"引擎已退出,但没有生成 PDF 或日志。",mJe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",gJe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",vJe=()=>"El motor terminó sin generar un PDF ni un log.",bJe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",yJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pJe():t==="fa"?mJe():t==="ar"?gJe():t==="es"?vJe():t==="hi"?bJe():hJe()}),xJe=()=>"Loading…",wJe=()=>"正在加载…",kJe=()=>"در حال بارگیری…",SJe=()=>"جارٍ التحميل…",CJe=()=>"Cargando…",EJe=()=>"लोड हो रहा है…",NJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wJe():t==="fa"?kJe():t==="ar"?SJe():t==="es"?CJe():t==="hi"?EJe():xJe()}),zJe=()=>"Add local model",jJe=()=>"添加本地模型",AJe=()=>"افزودن مدل محلی",TJe=()=>"إضافة نموذج محلي",RJe=()=>"Añadir modelo local",MJe=()=>"लोकल मॉडल जोड़ें",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jJe():t==="fa"?AJe():t==="ar"?TJe():t==="es"?RJe():t==="hi"?MJe():zJe()}),OJe=()=>"Local server address",DJe=()=>"本地服务器地址",LJe=()=>"نشانی سرور محلی",IJe=()=>"عنوان الخادم المحلي",$Je=()=>"Dirección del servidor local",BJe=()=>"लोकल सर्वर पता",PJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DJe():t==="fa"?LJe():t==="ar"?IJe():t==="es"?$Je():t==="hi"?BJe():OJe()}),FJe=()=>"Find models",HJe=()=>"查找模型",qJe=()=>"یافتن مدل‌ها",UJe=()=>"العثور على النماذج",GJe=()=>"Buscar modelos",VJe=()=>"मॉडल खोजें",KJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HJe():t==="fa"?qJe():t==="ar"?UJe():t==="es"?GJe():t==="hi"?VJe():FJe()}),WJe=()=>"(OpenAI compatible)",QJe=()=>"(兼容 OpenAI)",XJe=()=>"(سازگار با OpenAI)",YJe=()=>"(متوافق مع OpenAI)",ZJe=()=>"(compatible con OpenAI)",JJe=()=>"(OpenAI संगत)",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QJe():t==="fa"?XJe():t==="ar"?YJe():t==="es"?ZJe():t==="hi"?JJe():WJe()}),eet=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",tet=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",net=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",ret=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",set=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",iet=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",aet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tet():t==="fa"?net():t==="ar"?ret():t==="es"?set():t==="hi"?iet():eet()}),oet=()=>"Connected",cet=()=>"已连接",uet=()=>"متصل شد",_et=()=>"متصل",fet=()=>"Conectado",det=()=>"कनेक्टेड",het=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cet():t==="fa"?uet():t==="ar"?_et():t==="es"?fet():t==="hi"?det():oet()}),pet=()=>"Context window",met=()=>"上下文窗口",get=()=>"پنجرهٔ زمینه",vet=()=>"نافذة السياق",bet=()=>"Ventana de contexto",yet=()=>"कॉन्टेक्स्ट विंडो",xet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?met():t==="fa"?get():t==="ar"?vet():t==="es"?bet():t==="hi"?yet():pet()}),wet=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",ket=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",Cet=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",Eet=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",Net=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",zet=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",jet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ket():t==="fa"?Cet():t==="ar"?Eet():t==="es"?Net():t==="hi"?zet():wet()}),Aet=()=>"Custom Endpoint",Tet=()=>"自定义端点",Ret=()=>"نقطهٔ اتصال سفارشی",Met=()=>"نقطة نهاية مخصصة",Oet=()=>"Endpoint personalizado",Det=()=>"कस्टम एंडपॉइंट",jS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tet():t==="fa"?Ret():t==="ar"?Met():t==="es"?Oet():t==="hi"?Det():Aet()}),Let=e=>`Disconnect ${e==null?void 0:e.name}`,Iet=e=>`断开 ${e==null?void 0:e.name}`,$et=e=>`قطع اتصال ${e==null?void 0:e.name}`,Bet=e=>`قطع اتصال ${e==null?void 0:e.name}`,Pet=e=>`Desconectar ${e==null?void 0:e.name}`,Fet=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,Het=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iet(e):t==="fa"?$et(e):t==="ar"?Bet(e):t==="es"?Pet(e):t==="hi"?Fet(e):Let(e)}),qet=()=>"Get OpenCode",Uet=()=>"获取 OpenCode",Get=()=>"دریافت OpenCode",Vet=()=>"الحصول على OpenCode",Ket=()=>"Obtener OpenCode",Wet=()=>"OpenCode लें",Qet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uet():t==="fa"?Get():t==="ar"?Vet():t==="es"?Ket():t==="hi"?Wet():qet()}),Xet=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",Yet=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",Zet=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",Jet=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",ett=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",ttt=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",ntt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yet():t==="fa"?Zet():t==="ar"?Jet():t==="es"?ett():t==="hi"?ttt():Xet()}),rtt=()=>"API key (optional)",stt=()=>"API 密钥(可选)",itt=()=>"کلید API (اختیاری)",att=()=>"مفتاح API (اختياري)",ott=()=>"Clave de API (opcional)",ctt=()=>"API की (वैकल्पिक)",ltt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?stt():t==="fa"?itt():t==="ar"?att():t==="es"?ott():t==="hi"?ctt():rtt()}),utt=()=>"Save model",_tt=()=>"保存模型",ftt=()=>"ذخیرهٔ مدل",dtt=()=>"حفظ النموذج",htt=()=>"Guardar modelo",ptt=()=>"मॉडल सेव करें",mtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_tt():t==="fa"?ftt():t==="ar"?dtt():t==="es"?htt():t==="hi"?ptt():utt()}),gtt=()=>"Model server",vtt=()=>"模型服务器",btt=()=>"سرور مدل",ytt=()=>"خادم النموذج",xtt=()=>"Servidor del modelo",wtt=()=>"मॉडल सर्वर",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vtt():t==="fa"?btt():t==="ar"?ytt():t==="es"?xtt():t==="hi"?wtt():gtt()}),ktt=()=>"Local models",Stt=()=>"本地模型",Ctt=()=>"مدل‌های محلی",Ett=()=>"النماذج المحلية",Ntt=()=>"Modelos locales",ztt=()=>"लोकल मॉडल",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Stt():t==="fa"?Ctt():t==="ar"?Ett():t==="es"?Ntt():t==="hi"?ztt():ktt()}),jtt=()=>"API token (optional)",Att=()=>"API 令牌(可选)",Ttt=()=>"توکن API (اختیاری)",Rtt=()=>"رمز API (اختياري)",Mtt=()=>"Token de API (opcional)",Ott=()=>"API टोकन (वैकल्पिक)",Dtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Att():t==="fa"?Ttt():t==="ar"?Rtt():t==="es"?Mtt():t==="hi"?Ott():jtt()}),Ltt=()=>"Copy",Itt=()=>"复制",$tt=()=>"کپی",Btt=()=>"نسخ",Ptt=()=>"Copiar",Ftt=()=>"कॉपी करें",AS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Itt():t==="fa"?$tt():t==="ar"?Btt():t==="es"?Ptt():t==="hi"?Ftt():Ltt()}),Htt=()=>"Copy code",qtt=()=>"复制代码",Utt=()=>"کپی کد",Gtt=()=>"نسخ الشيفرة",Vtt=()=>"Copiar código",Ktt=()=>"कोड कॉपी करें",Wtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qtt():t==="fa"?Utt():t==="ar"?Gtt():t==="es"?Vtt():t==="hi"?Ktt():Htt()}),Qtt=()=>"Download",Xtt=()=>"下载",Ytt=()=>"بارگیری",Ztt=()=>"تنزيل",Jtt=()=>"Descargar",ent=()=>"डाउनलोड करें",B3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xtt():t==="fa"?Ytt():t==="ar"?Ztt():t==="es"?Jtt():t==="hi"?ent():Qtt()}),tnt=()=>"This browser can’t preview this media format.",nnt=()=>"此浏览器无法预览该媒体格式。",rnt=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",snt=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",int=()=>"Este navegador no puede mostrar este formato multimedia.",ant=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",ont=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nnt():t==="fa"?rnt():t==="ar"?snt():t==="es"?int():t==="hi"?ant():tnt()}),cnt=()=>"Choose the model for this chat",lnt=()=>"选择此聊天的模型",unt=()=>"انتخاب مدل این گفت‌وگو",_nt=()=>"اختيار نموذج هذه المحادثة",fnt=()=>"Elige el modelo de este chat",dnt=()=>"इस चैट के लिए मॉडल चुनें",hnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lnt():t==="fa"?unt():t==="ar"?_nt():t==="es"?fnt():t==="hi"?dnt():cnt()}),pnt=()=>"Add Local Model",mnt=()=>"添加本地模型",gnt=()=>"افزودن مدل محلی",vnt=()=>"إضافة نموذج محلي",bnt=()=>"Añadir modelo local",ynt=()=>"लोकल मॉडल जोड़ें",xnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mnt():t==="fa"?gnt():t==="ar"?vnt():t==="es"?bnt():t==="hi"?ynt():pnt()}),wnt=()=>"Autonomy",knt=()=>"自主程度",Snt=()=>"خودمختاری",Cnt=()=>"الاستقلالية",Ent=()=>"Autonomía",Nnt=()=>"स्वायत्तता",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?knt():t==="fa"?Snt():t==="ar"?Cnt():t==="es"?Ent():t==="hi"?Nnt():wnt()}),znt=()=>"Agentic",jnt=()=>"自主",Ant=()=>"خودکار",Tnt=()=>"وكيل مستقل",Rnt=()=>"Agéntico",Mnt=()=>"एजेंटिक",Ont=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jnt():t==="fa"?Ant():t==="ar"?Tnt():t==="es"?Rnt():t==="hi"?Mnt():znt()}),Dnt=()=>"Runs the research on its own and checks in when needed.",Lnt=()=>"独立推进研究,必要时再与你确认。",Int=()=>"پژوهش را خودش پیش می‌برد و در صورت نیاز با شما هماهنگ می‌کند.",$nt=()=>"يدير البحث بنفسه ويراجعك عند الحاجة.",Bnt=()=>"Dirige la investigación por su cuenta y consulta cuando hace falta.",Pnt=()=>"शोध खुद चलाता है और ज़रूरत पड़ने पर पूछता है।",Fnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lnt():t==="fa"?Int():t==="ar"?$nt():t==="es"?Bnt():t==="hi"?Pnt():Dnt()}),Hnt=()=>"Copilot",qnt=()=>"副驾驶",Unt=()=>"کمک‌خلبان",Gnt=()=>"مساعد",Vnt=()=>"Copiloto",Knt=()=>"कोपायलट",Wnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qnt():t==="fa"?Unt():t==="ar"?Gnt():t==="es"?Vnt():t==="hi"?Knt():Hnt()}),Qnt=()=>"Explains its reasoning and asks before acting.",Xnt=()=>"解释思路,行动前先征得你的同意。",Ynt=()=>"استدلالش را توضیح می‌دهد و پیش از اقدام اجازه می‌گیرد.",Znt=()=>"يشرح منطقه ويطلب موافقتك قبل التنفيذ.",Jnt=()=>"Explica su razonamiento y pide aprobación antes de actuar.",ert=()=>"अपना तर्क समझाता है और कार्य करने से पहले अनुमति लेता है।",trt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xnt():t==="fa"?Ynt():t==="ar"?Znt():t==="es"?Jnt():t==="hi"?ert():Qnt()}),nrt=()=>" · CLI configuration",rrt=()=>" · CLI 配置",srt=()=>" · پیکربندی CLI",irt=()=>" · إعداد واجهة سطر الأوامر",art=()=>" · Configuración de la CLI",ort=()=>" · CLI कॉन्फ़िगरेशन",crt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rrt():t==="fa"?srt():t==="ar"?irt():t==="es"?art():t==="hi"?ort():nrt()}),lrt=()=>"· Default",urt=()=>"· 默认",_rt=()=>"· پیش‌فرض",frt=()=>"· الافتراضي",drt=()=>"· Predeterminado",hrt=()=>"· डिफ़ॉल्ट",NL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?urt():t==="fa"?_rt():t==="ar"?frt():t==="es"?drt():t==="hi"?hrt():lrt()}),prt=()=>"Default model",mrt=()=>"默认模型",grt=()=>"مدل پیش‌فرض",vrt=()=>"النموذج الافتراضي",brt=()=>"Modelo predeterminado",yrt=()=>"डिफ़ॉल्ट मॉडल",P3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mrt():t==="fa"?grt():t==="ar"?vrt():t==="es"?brt():t==="hi"?yrt():prt()}),xrt=()=>"Detecting harnesses…",wrt=()=>"正在检测智能体工具…",krt=()=>"در حال شناسایی ابزارهای عامل…",Srt=()=>"جارٍ اكتشاف أدوات البرمجة…",Crt=()=>"Detectando agentes…",Ert=()=>"हार्नेस पहचाने जा रहे हैं…",Nrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wrt():t==="fa"?krt():t==="ar"?Srt():t==="es"?Crt():t==="hi"?Ert():xrt()}),zrt=()=>"Effort",jrt=()=>"推理强度",Art=()=>"میزان استدلال",Trt=()=>"الجهد",Rrt=()=>"Esfuerzo",Mrt=()=>"प्रयास स्तर",Ort=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jrt():t==="fa"?Art():t==="ar"?Trt():t==="es"?Rrt():t==="hi"?Mrt():zrt()}),Drt=()=>"Fast speed ·",Lrt=()=>"快速 ·",Irt=()=>"سرعت بالا ·",$rt=()=>"سرعة عالية ·",Brt=()=>"Modo rápido ·",Prt=()=>"तेज़ गति ·",Frt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lrt():t==="fa"?Irt():t==="ar"?$rt():t==="es"?Brt():t==="hi"?Prt():Drt()}),Hrt=()=>"Mode",qrt=()=>"模式",Urt=()=>"حالت",Grt=()=>"الوضع",Vrt=()=>"Modo",Krt=()=>"मोड",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qrt():t==="fa"?Urt():t==="ar"?Grt():t==="es"?Vrt():t==="hi"?Krt():Hrt()}),Wrt=()=>"Model",Qrt=()=>"模型",Xrt=()=>"مدل",Yrt=()=>"النموذج",Zrt=()=>"Modelo",Jrt=()=>"मॉडल",M0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qrt():t==="fa"?Xrt():t==="ar"?Yrt():t==="es"?Zrt():t==="hi"?Jrt():Wrt()}),est=e=>`${e==null?void 0:e.count} more — search to find`,tst=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,nst=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,rst=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,sst=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,ist=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,ast=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tst(e):t==="fa"?nst(e):t==="ar"?rst(e):t==="es"?sst(e):t==="hi"?ist(e):est(e)}),ost=()=>"Not available",cst=()=>"不可用",lst=()=>"در دسترس نیست",ust=()=>"غير متاح",_st=()=>"No disponible",fst=()=>"उपलब्ध नहीं",dst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cst():t==="fa"?lst():t==="ar"?ust():t==="es"?_st():t==="hi"?fst():ost()}),hst=()=>"Search models…",pst=()=>"搜索模型…",mst=()=>"جست‌وجوی مدل‌ها…",gst=()=>"البحث في النماذج…",vst=()=>"Buscar modelos…",bst=()=>"मॉडल खोजें…",yst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pst():t==="fa"?mst():t==="ar"?gst():t==="es"?vst():t==="hi"?bst():hst()}),xst=()=>"Search or enter model ID…",wst=()=>"搜索或输入模型 ID…",kst=()=>"جست‌وجو یا ورود شناسه مدل…",Sst=()=>"ابحث أو أدخل معرّف النموذج…",Cst=()=>"Buscar o introducir ID…",Est=()=>"खोजें या मॉडल ID डालें…",Nst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wst():t==="fa"?kst():t==="ar"?Sst():t==="es"?Cst():t==="hi"?Est():xst()}),zst=()=>"Sessions keep their harness. Start a new chat to switch.",jst=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Ast=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Tst=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Rst=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Mst=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Ost=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jst():t==="fa"?Ast():t==="ar"?Tst():t==="es"?Rst():t==="hi"?Mst():zst()}),Dst=()=>"Speed",Lst=()=>"速度",Ist=()=>"سرعت",$st=()=>"السرعة",Bst=()=>"Velocidad",Pst=()=>"गति",Cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lst():t==="fa"?Ist():t==="ar"?$st():t==="es"?Bst():t==="hi"?Pst():Dst()}),Fst=()=>"Unavailable",Hst=()=>"不可用",qst=()=>"در دسترس نیست",Ust=()=>"غير متاح",Gst=()=>"No disponible",Vst=()=>"उपलब्ध नहीं",ho=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hst():t==="fa"?qst():t==="ar"?Ust():t==="es"?Gst():t==="hi"?Vst():Fst()}),Kst=()=>"Unverified",Wst=()=>"未经验证",Qst=()=>"تأییدنشده",Xst=()=>"غير مُتحقَّق منه",Yst=()=>"Sin verificar",Zst=()=>"सत्यापित नहीं",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wst():t==="fa"?Qst():t==="ar"?Xst():t==="es"?Yst():t==="hi"?Zst():Kst()}),Jst=e=>`Use “${e==null?void 0:e.id}” as the model ID`,eit=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,tit=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,nit=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,rit=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,sit=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,iit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eit(e):t==="fa"?tit(e):t==="ar"?nit(e):t==="es"?rit(e):t==="hi"?sit(e):Jst(e)}),ait=()=>"Variant",oit=()=>"变体",cit=()=>"گونه",lit=()=>"الصنف",uit=()=>"Variante",_it=()=>"वेरिएंट",fit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oit():t==="fa"?cit():t==="ar"?lit():t==="es"?uit():t==="hi"?_it():ait()}),dit=()=>"Start a new chat",hit=()=>"开始新聊天",pit=()=>"شروع گفت‌وگوی جدید",mit=()=>"بدء محادثة جديدة",git=()=>"Inicia un chat nuevo",vit=()=>"नई चैट शुरू करें",bit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hit():t==="fa"?pit():t==="ar"?mit():t==="es"?git():t==="hi"?vit():dit()}),yit=()=>"Advanced",xit=()=>"高级",wit=()=>"پیشرفته",kit=()=>"متقدم",Sit=()=>"Avanzado",Cit=()=>"उन्नत",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xit():t==="fa"?wit():t==="ar"?kit():t==="es"?Sit():t==="hi"?Cit():yit()}),Eit=()=>"Advanced · Connect GitHub",Nit=()=>"高级 · 连接 GitHub",zit=()=>"پیشرفته · اتصال GitHub",jit=()=>"متقدم · ربط GitHub",Ait=()=>"Avanzado · Conectar GitHub",Tit=()=>"उन्नत · GitHub कनेक्ट करें",Rit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nit():t==="fa"?zit():t==="ar"?jit():t==="es"?Ait():t==="hi"?Tit():Eit()}),Mit=()=>"Advanced · GitHub sync on",Oit=()=>"高级 · GitHub 同步已开启",Dit=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Lit=()=>"متقدم · مزامنة GitHub مفعّلة",Iit=()=>"Avanzado · Sincronización con GitHub activada",$it=()=>"उन्नत · GitHub सिंक चालू",Bit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oit():t==="fa"?Dit():t==="ar"?Lit():t==="es"?Iit():t==="hi"?$it():Mit()}),Pit=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Fit=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Hit=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",qit=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",Uit=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",Git=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",Vit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fit():t==="fa"?Hit():t==="ar"?qit():t==="es"?Uit():t==="hi"?Git():Pit()}),Kit=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Wit=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Qit=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Xit=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,Yit=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,Zit=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,Jit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wit(e):t==="fa"?Qit(e):t==="ar"?Xit(e):t==="es"?Yit(e):t==="hi"?Zit(e):Kit(e)}),eat=()=>"Choose an existing project folder",tat=()=>"选择现有项目文件夹",nat=()=>"انتخاب پوشهٔ موجود پروژه",rat=()=>"اختر مجلد مشروع موجود",sat=()=>"Elige una carpeta de proyecto existente",iat=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tat():t==="fa"?nat():t==="ar"?rat():t==="es"?sat():t==="hi"?iat():eat()}),aat=()=>"Choosing…",oat=()=>"正在选择…",cat=()=>"در حال انتخاب…",lat=()=>"جارٍ الاختيار…",uat=()=>"Eligiendo…",_at=()=>"चुना जा रहा है…",fat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oat():t==="fa"?cat():t==="ar"?lat():t==="es"?uat():t==="hi"?_at():aat()}),dat=()=>"Clone destination",hat=()=>"克隆位置",pat=()=>"مقصد کلون",mat=()=>"وجهة الاستنساخ",gat=()=>"Destino del clon",vat=()=>"क्लोन गंतव्य",bat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hat():t==="fa"?pat():t==="ar"?mat():t==="es"?gat():t==="hi"?vat():dat()}),yat=()=>"Clone paper project",xat=()=>"克隆论文项目",wat=()=>"کلون پروژهٔ مقاله",kat=()=>"استنساخ مشروع الورقة",Sat=()=>"Clonar proyecto del paper",Cat=()=>"पेपर प्रोजेक्ट क्लोन करें",Eat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xat():t==="fa"?wat():t==="ar"?kat():t==="es"?Sat():t==="hi"?Cat():yat()}),Nat=()=>"Create project",zat=()=>"创建项目",jat=()=>"ایجاد پروژه",Aat=()=>"إنشاء المشروع",Tat=()=>"Crear proyecto",Rat=()=>"प्रोजेक्ट बनाएं",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zat():t==="fa"?jat():t==="ar"?Aat():t==="es"?Tat():t==="hi"?Rat():Nat()}),Mat=()=>"Creating…",Oat=()=>"正在创建…",Dat=()=>"در حال ایجاد…",Lat=()=>"جارٍ الإنشاء…",Iat=()=>"Creando…",$at=()=>"बनाया जा रहा है…",Bat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oat():t==="fa"?Dat():t==="ar"?Lat():t==="es"?Iat():t==="hi"?$at():Mat()}),Pat=()=>"Choose a different destination. This path is a file, not a folder.",Fat=()=>"请选择其他位置。此路径是文件,不是文件夹。",Hat=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",qat=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",Uat=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Gat=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",yw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fat():t==="fa"?Hat():t==="ar"?qat():t==="es"?Uat():t==="hi"?Gat():Pat()}),Vat=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Kat=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Wat=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Qat=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",Xat=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",Yat=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kat():t==="fa"?Wat():t==="ar"?Qat():t==="es"?Xat():t==="hi"?Yat():Vat()}),Zat=()=>"Blank project",Jat=()=>"空白项目",eot=()=>"پروژهٔ خالی",tot=()=>"مشروع فارغ",not=()=>"Proyecto en blanco",rot=()=>"खाली प्रोजेक्ट",sot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jat():t==="fa"?eot():t==="ar"?tot():t==="es"?not():t==="hi"?rot():Zat()}),iot=()=>"Cancel",aot=()=>"取消",oot=()=>"لغو",cot=()=>"إلغاء",lot=()=>"Cancelar",uot=()=>"रद्द करें",_ot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aot():t==="fa"?oot():t==="ar"?cot():t==="es"?lot():t==="hi"?uot():iot()}),fot=()=>"Change",dot=()=>"更改",hot=()=>"تغییر",pot=()=>"تغيير",mot=()=>"Cambiar",got=()=>"बदलें",vot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dot():t==="fa"?hot():t==="ar"?pot():t==="es"?mot():t==="hi"?got():fot()}),bot=()=>"Change selected paper",yot=()=>"更改所选论文",xot=()=>"تغییر مقالهٔ انتخاب‌شده",wot=()=>"تغيير الورقة المحددة",kot=()=>"Cambiar el paper seleccionado",Sot=()=>"चयनित पेपर बदलें",Cot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yot():t==="fa"?xot():t==="ar"?wot():t==="es"?kot():t==="hi"?Sot():bot()}),Eot=()=>"Check out a Git branch before using this folder.",Not=()=>"使用此文件夹前,请先检出一个 Git 分支。",zot=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",jot=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Aot=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Tot=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Rot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Not():t==="fa"?zot():t==="ar"?jot():t==="es"?Aot():t==="hi"?Tot():Eot()}),Mot=()=>"Checking project location.",Oot=()=>"正在检查项目位置。",Dot=()=>"در حال بررسی محل پروژه.",Lot=()=>"جارٍ التحقق من موقع المشروع.",Iot=()=>"Comprobando la ubicación del proyecto.",$ot=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oot():t==="fa"?Dot():t==="ar"?Lot():t==="es"?Iot():t==="hi"?$ot():Mot()}),Bot=()=>"Existing folder",Pot=()=>"现有文件夹",Fot=()=>"پوشهٔ موجود",Hot=()=>"مجلد موجود",qot=()=>"Carpeta existente",Uot=()=>"मौजूदा फ़ोल्डर",Got=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pot():t==="fa"?Fot():t==="ar"?Hot():t==="es"?qot():t==="hi"?Uot():Bot()}),Vot=()=>"Experiment branches will be pushed to the remote GitHub repository.",Kot=()=>"实验分支将推送到远程 GitHub 仓库。",Wot=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Qot=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",Xot=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",Yot=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",Zot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kot():t==="fa"?Wot():t==="ar"?Qot():t==="es"?Xot():t==="hi"?Yot():Vot()}),Jot=()=>"From a paper",ect=()=>"从论文创建",tct=()=>"از یک مقاله",nct=()=>"من ورقة بحثية",rct=()=>"A partir de un paper",sct=()=>"एक पेपर से",ict=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ect():t==="fa"?tct():t==="ar"?nct():t==="es"?rct():t==="hi"?sct():Jot()}),act=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",oct=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",cct=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",lct=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",uct=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",_ct=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",fct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oct():t==="fa"?cct():t==="ar"?lct():t==="es"?uct():t==="hi"?_ct():act()}),dct=()=>"my-research",hct=()=>"my-research",pct=()=>"my-research",mct=()=>"my-research",gct=()=>"mi-investigacion",vct=()=>"मेरा-शोध",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hct():t==="fa"?pct():t==="ar"?mct():t==="es"?gct():t==="hi"?vct():dct()}),bct=()=>"No papers found. Try an arXiv ID, URL, or a different title.",yct=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",xct=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",wct=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",kct=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Sct=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",Cct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yct():t==="fa"?xct():t==="ar"?wct():t==="es"?kct():t==="hi"?Sct():bct()}),Ect=()=>"No public repository found on alphaXiv",Nct=()=>"在 alphaXiv 上未找到公开仓库",zct=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",jct=()=>"لم يُعثر على مستودع عام على alphaXiv",Act=()=>"No se encontró ningún repositorio público en alphaXiv",Tct=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Rct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nct():t==="fa"?zct():t==="ar"?jct():t==="es"?Act():t==="hi"?Tct():Ect()}),Mct=()=>"OpenResearch will start a blank project with this paper's PDF.",Oct=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Dct=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Lct=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Ict=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",$ct=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Bct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oct():t==="fa"?Dct():t==="ar"?Lct():t==="es"?Ict():t==="hi"?$ct():Mct()}),Pct=()=>"Paper",Fct=()=>"论文",Hct=()=>"مقاله",qct=()=>"ورقة بحثية",Uct=()=>"Paper",Gct=()=>"पेपर",Vct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fct():t==="fa"?Hct():t==="ar"?qct():t==="es"?Uct():t==="hi"?Gct():Pct()}),Kct=()=>"Project location",Wct=()=>"项目位置",Qct=()=>"محل پروژه",Xct=()=>"موقع المشروع",Yct=()=>"Ubicación del proyecto",Zct=()=>"प्रोजेक्ट स्थान",xw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wct():t==="fa"?Qct():t==="ar"?Xct():t==="es"?Yct():t==="hi"?Zct():Kct()}),Jct=()=>"Project name",elt=()=>"项目名称",tlt=()=>"نام پروژه",nlt=()=>"اسم المشروع",rlt=()=>"Nombre del proyecto",slt=()=>"प्रोजेक्ट नाम",F3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?elt():t==="fa"?tlt():t==="ar"?nlt():t==="es"?rlt():t==="hi"?slt():Jct()}),ilt=()=>"Search for a paper by arXiv ID, URL, or title",alt=()=>"按 arXiv ID、网址或标题搜索论文",olt=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",clt=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",llt=()=>"Busca un paper por ID de arXiv, URL o título",ult=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",_lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?alt():t==="fa"?olt():t==="ar"?clt():t==="es"?llt():t==="hi"?ult():ilt()}),flt=()=>"Sync experiments to GitHub",dlt=()=>"将实验同步到 GitHub",hlt=()=>"همگام‌سازی آزمایش‌ها با GitHub",plt=()=>"مزامنة التجارب مع GitHub",mlt=()=>"Sincronizar experimentos con GitHub",glt=()=>"प्रयोग GitHub पर सिंक करें",vlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dlt():t==="fa"?hlt():t==="ar"?plt():t==="es"?mlt():t==="hi"?glt():flt()}),blt=()=>"That folder no longer exists. Choose it again.",ylt=()=>"该文件夹已不存在。请重新选择。",xlt=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",wlt=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",klt=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",Slt=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",Clt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ylt():t==="fa"?xlt():t==="ar"?wlt():t==="es"?klt():t==="hi"?Slt():blt()}),Elt=()=>"The selected folder contains an invalid Git repository.",Nlt=()=>"所选文件夹包含无效的 Git 仓库。",zlt=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",jlt=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Alt=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Tlt=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Rlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nlt():t==="fa"?zlt():t==="ar"?jlt():t==="es"?Alt():t==="hi"?Tlt():Elt()}),Mlt=()=>"The selected path is not a folder.",Olt=()=>"所选路径不是文件夹。",Dlt=()=>"مسیر انتخاب‌شده پوشه نیست.",Llt=()=>"المسار المحدد ليس مجلدًا.",Ilt=()=>"La ruta seleccionada no es una carpeta.",$lt=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Blt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Olt():t==="fa"?Dlt():t==="ar"?Llt():t==="es"?Ilt():t==="hi"?$lt():Mlt()}),Plt=e=>`Checking ${e==null?void 0:e.repository}.`,Flt=e=>`正在检查 ${e==null?void 0:e.repository}。`,Hlt=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,qlt=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,Ult=e=>`Comprobando ${e==null?void 0:e.repository}.`,Glt=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Vlt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Flt(e):t==="fa"?Hlt(e):t==="ar"?qlt(e):t==="es"?Ult(e):t==="hi"?Glt(e):Plt(e)}),Klt=e=>`Creates ${e==null?void 0:e.repository}.`,Wlt=e=>`将创建 ${e==null?void 0:e.repository}。`,Qlt=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,Xlt=e=>`ينشئ ${e==null?void 0:e.repository}.`,Ylt=e=>`Crea ${e==null?void 0:e.repository}.`,Zlt=e=>`${e==null?void 0:e.repository} बनाता है।`,Jlt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wlt(e):t==="fa"?Qlt(e):t==="ar"?Xlt(e):t==="es"?Ylt(e):t==="hi"?Zlt(e):Klt(e)}),eut=e=>`Pushes to ${e==null?void 0:e.repository}.`,tut=e=>`将推送到 ${e==null?void 0:e.repository}。`,nut=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,rut=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,sut=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,iut=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,aut=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tut(e):t==="fa"?nut(e):t==="ar"?rut(e):t==="es"?sut(e):t==="hi"?iut(e):eut(e)}),out=()=>"Project location is required.",cut=()=>"必须填写项目位置。",lut=()=>"محل پروژه الزامی است.",uut=()=>"موقع المشروع مطلوب.",_ut=()=>"La ubicación del proyecto es obligatoria.",fut=()=>"प्रोजेक्ट स्थान ज़रूरी है।",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cut():t==="fa"?lut():t==="ar"?uut():t==="es"?_ut():t==="hi"?fut():out()}),dut=()=>"Choose a different destination. The paper repository needs a new or empty folder.",hut=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",put=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",mut=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",gut=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",vut=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hut():t==="fa"?put():t==="ar"?mut():t==="es"?gut():t==="hi"?vut():dut()}),but=()=>"A linked public code repository is cloned without credentials.",yut=()=>"关联的公开代码仓库无需凭据即可克隆。",xut=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",wut=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",kut=()=>"El repositorio de código público vinculado se clona sin credenciales.",Sut=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",Cut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yut():t==="fa"?xut():t==="ar"?wut():t==="es"?kut():t==="hi"?Sut():but()}),Eut=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Nut=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,zut=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,jut=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,Aut=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Tut=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Rut=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nut(e):t==="fa"?zut(e):t==="ar"?jut(e):t==="es"?Aut(e):t==="hi"?Tut(e):Eut(e)}),Mut=()=>"Searching alphaXiv…",Out=()=>"正在搜索 alphaXiv…",Dut=()=>"در حال جست‌وجوی alphaXiv…",Lut=()=>"جارٍ البحث في alphaXiv…",Iut=()=>"Buscando en alphaXiv…",$ut=()=>"alphaXiv खोजा जा रहा है…",But=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Out():t==="fa"?Dut():t==="ar"?Lut():t==="es"?Iut():t==="hi"?$ut():Mut()}),Put=()=>"Use folder",Fut=()=>"使用文件夹",Hut=()=>"استفاده از پوشه",qut=()=>"استخدام المجلد",Uut=()=>"Usar carpeta",Gut=()=>"फ़ोल्डर इस्तेमाल करें",Vut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fut():t==="fa"?Hut():t==="ar"?qut():t==="es"?Uut():t==="hi"?Gut():Put()}),Kut=()=>"Can’t reach OpenResearch. This page is no longer live.",Wut=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Qut=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Xut=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",Yut=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",Zut=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",H3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wut():t==="fa"?Qut():t==="ar"?Xut():t==="es"?Yut():t==="hi"?Zut():Kut()}),Jut=()=>"A workspace for your research agents",e_t=()=>"面向研究智能体的工作空间",t_t=()=>"فضای کاری برای عامل‌های پژوهشی شما",n_t=()=>"مساحة عمل لوكلاء بحثك",r_t=()=>"Un espacio de trabajo para tus agentes de investigación",s_t=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",i_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e_t():t==="fa"?t_t():t==="ar"?n_t():t==="es"?r_t():t==="hi"?s_t():Jut()}),a_t=()=>"Add papers that represent your research interests, including papers by other authors.",o_t=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",c_t=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",l_t=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",u_t=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",__t=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",f_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o_t():t==="fa"?c_t():t==="ar"?l_t():t==="es"?u_t():t==="hi"?__t():a_t()}),d_t=()=>"API key",h_t=()=>"API 密钥",p_t=()=>"کلید API",m_t=()=>"مفتاح API",g_t=()=>"Clave de API",v_t=()=>"API की",TS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h_t():t==="fa"?p_t():t==="ar"?m_t():t==="es"?g_t():t==="hi"?v_t():d_t()}),b_t=()=>"AI/ML",y_t=()=>"人工智能与机器学习",x_t=()=>"هوش مصنوعی و یادگیری ماشین",w_t=()=>"الذكاء الاصطناعي/تعلّم الآلة",k_t=()=>"IA/ML",S_t=()=>"AI/ML",C_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y_t():t==="fa"?x_t():t==="ar"?w_t():t==="es"?k_t():t==="hi"?S_t():b_t()}),E_t=()=>"Biology",N_t=()=>"生物学",z_t=()=>"زیست‌شناسی",j_t=()=>"الأحياء",A_t=()=>"Biología",T_t=()=>"जीव विज्ञान",R_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N_t():t==="fa"?z_t():t==="ar"?j_t():t==="es"?A_t():t==="hi"?T_t():E_t()}),M_t=()=>"Other",O_t=()=>"其他",D_t=()=>"سایر",L_t=()=>"أخرى",I_t=()=>"Otra",$_t=()=>"अन्य",B_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_t():t==="fa"?D_t():t==="ar"?L_t():t==="es"?I_t():t==="hi"?$_t():M_t()}),P_t=()=>"Physics",F_t=()=>"物理学",H_t=()=>"فیزیک",q_t=()=>"الفيزياء",U_t=()=>"Física",G_t=()=>"भौतिकी",V_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F_t():t==="fa"?H_t():t==="ar"?q_t():t==="es"?U_t():t==="hi"?G_t():P_t()}),K_t=()=>"Back",W_t=()=>"返回",Q_t=()=>"بازگشت",X_t=()=>"رجوع",Y_t=()=>"Atrás",Z_t=()=>"वापस",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W_t():t==="fa"?Q_t():t==="ar"?X_t():t==="es"?Y_t():t==="hi"?Z_t():K_t()}),J_t=()=>"Check failed",eft=()=>"检查失败",tft=()=>"بررسی ناموفق بود",nft=()=>"فشل الفحص",rft=()=>"Error en la comprobación",sft=()=>"जाँच विफल",ift=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eft():t==="fa"?tft():t==="ar"?nft():t==="es"?rft():t==="hi"?sft():J_t()}),aft=()=>"Checking",oft=()=>"正在检查",cft=()=>"در حال بررسی",lft=()=>"جارٍ الفحص",uft=()=>"Comprobando",_ft=()=>"जाँचा जा रहा है",Ef=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oft():t==="fa"?cft():t==="ar"?lft():t==="es"?uft():t==="hi"?_ft():aft()}),fft=()=>"Checking Git…",dft=()=>"正在检查 Git…",hft=()=>"در حال بررسی Git…",pft=()=>"جارٍ فحص Git…",mft=()=>"Comprobando Git…",gft=()=>"Git जाँचा जा रहा है…",vft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dft():t==="fa"?hft():t==="ar"?pft():t==="es"?mft():t==="hi"?gft():fft()}),bft=()=>"Choose a coding agent",yft=()=>"选择编程智能体",xft=()=>"یک عامل کدنویسی انتخاب کنید",wft=()=>"اختر وكيل برمجة",kft=()=>"Elige un agente de programación",Sft=()=>"एक कोडिंग एजेंट चुनें",Cft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yft():t==="fa"?xft():t==="ar"?wft():t==="es"?kft():t==="hi"?Sft():bft()}),Eft=()=>"Choose a coding agent to continue.",Nft=()=>"选择一个编程智能体以继续。",zft=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",jft=()=>"اختر وكيل برمجة للمتابعة.",Aft=()=>"Elige un agente de programación para continuar.",Tft=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Rft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nft():t==="fa"?zft():t==="ar"?jft():t==="es"?Aft():t==="hi"?Tft():Eft()}),Mft=()=>"Choose another coding agent",Oft=()=>"选择其他编程智能体",Dft=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Lft=()=>"اختيار وكيل برمجة آخر",Ift=()=>"Elegir otro agente de programación",$ft=()=>"दूसरा कोडिंग एजेंट चुनें",Bft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oft():t==="fa"?Dft():t==="ar"?Lft():t==="es"?Ift():t==="hi"?$ft():Mft()}),Pft=()=>"Choose at least one research area to continue.",Fft=()=>"请至少选择一个研究领域后再继续。",Hft=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",qft=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",Uft=()=>"Elige al menos un área de investigación para continuar.",Gft=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Vft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fft():t==="fa"?Hft():t==="ar"?qft():t==="es"?Uft():t==="hi"?Gft():Pft()}),Kft=()=>"Choose one or more.",Wft=()=>"请选择一项或多项。",Qft=()=>"یک یا چند مورد را انتخاب کنید.",Xft=()=>"اختر واحدًا أو أكثر.",Yft=()=>"Elige una o varias.",Zft=()=>"एक या अधिक चुनें।",Jft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wft():t==="fa"?Qft():t==="ar"?Xft():t==="es"?Yft():t==="hi"?Zft():Kft()}),edt=()=>"Choose your preferred coding agent",tdt=()=>"请选择首选编程智能体",ndt=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",rdt=()=>"اختر وكيل البرمجة المفضّل لديك",sdt=()=>"Elige tu agente de programación preferido",idt=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",adt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tdt():t==="fa"?ndt():t==="ar"?rdt():t==="es"?sdt():t==="hi"?idt():edt()}),odt=()=>"Consolidate your research",cdt=()=>"集中管理研究",ldt=()=>"پژوهش خود را یکپارچه کنید",udt=()=>"وحّد أبحاثك",_dt=()=>"Consolida tu investigación",fdt=()=>"अपने शोध को एक जगह लाएं",ddt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cdt():t==="fa"?ldt():t==="ar"?udt():t==="es"?_dt():t==="hi"?fdt():odt()}),hdt=()=>"Continue",pdt=()=>"继续",mdt=()=>"ادامه",gdt=()=>"متابعة",vdt=()=>"Continuar",bdt=()=>"जारी रखें",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pdt():t==="fa"?mdt():t==="ar"?gdt():t==="es"?vdt():t==="hi"?bdt():hdt()}),ydt=()=>"Describe your research area to continue.",xdt=()=>"请描述你的研究领域后再继续。",wdt=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",kdt=()=>"صِف مجالك البحثي للمتابعة.",Sdt=()=>"Describe tu área de investigación para continuar.",Cdt=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",Edt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xdt():t==="fa"?wdt():t==="ar"?kdt():t==="es"?Sdt():t==="hi"?Cdt():ydt()}),Ndt=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",zdt=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",jdt=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Adt=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Tdt=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Rdt=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Mdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zdt():t==="fa"?jdt():t==="ar"?Adt():t==="es"?Tdt():t==="hi"?Rdt():Ndt()}),Odt=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Ddt=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Ldt=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Idt=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",$dt=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",Bdt=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",Pdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ddt():t==="fa"?Ldt():t==="ar"?Idt():t==="es"?$dt():t==="hi"?Bdt():Odt()}),Fdt=()=>"Error details",Hdt=()=>"错误详情",qdt=()=>"جزئیات خطا",Udt=()=>"تفاصيل الخطأ",Gdt=()=>"Detalles del error",Vdt=()=>"त्रुटि विवरण",Kdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hdt():t==="fa"?qdt():t==="ar"?Udt():t==="es"?Gdt():t==="hi"?Vdt():Fdt()}),Wdt=()=>"Everything stays local",Qdt=()=>"一切都保留在本地",Xdt=()=>"همه‌چیز محلی می‌ماند",Ydt=()=>"كل شيء يبقى محليًا",Zdt=()=>"Todo se queda en local",Jdt=()=>"सब कुछ लोकल ही रहता है",eht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qdt():t==="fa"?Xdt():t==="ar"?Ydt():t==="es"?Zdt():t==="hi"?Jdt():Wdt()}),tht=()=>"Get started",nht=()=>"开始使用",rht=()=>"شروع",sht=()=>"ابدأ الآن",iht=()=>"Empezar",aht=()=>"शुरू करें",oht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nht():t==="fa"?rht():t==="ar"?sht():t==="es"?iht():t==="hi"?aht():tht()}),cht=()=>"Git is required for local experiments. Install Git, then re-check.",lht=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",uht=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",_ht=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",fht=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",dht=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lht():t==="fa"?uht():t==="ar"?_ht():t==="es"?fht():t==="hi"?dht():cht()}),hht=()=>"Ground your agents",pht=()=>"为智能体提供可靠依据",mht=()=>"عامل‌هایتان را به منابع متصل کنید",ght=()=>"زوّد وكلاءك بأساس بحثي",vht=()=>"Dale contexto a tus agentes",bht=()=>"अपने एजेंटों को आधार दें",yht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pht():t==="fa"?mht():t==="ar"?ght():t==="es"?vht():t==="hi"?bht():hht()}),xht=()=>"Install broken",wht=()=>"安装损坏",kht=()=>"نصب خراب است",Sht=()=>"التثبيت معطوب",Cht=()=>"Instalación dañada",Eht=()=>"इंस्टॉल खराब है",Nht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wht():t==="fa"?kht():t==="ar"?Sht():t==="es"?Cht():t==="hi"?Eht():xht()}),zht=()=>"Install Git to continue",jht=()=>"请安装 Git 后再继续",Aht=()=>"برای ادامه Git را نصب کنید",Tht=()=>"ثبّت Git للمتابعة",Rht=()=>"Instala Git para continuar",Mht=()=>"जारी रखने के लिए Git इंस्टॉल करें",Oht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jht():t==="fa"?Aht():t==="ar"?Tht():t==="es"?Rht():t==="hi"?Mht():zht()}),Dht=()=>"Loading account details…",Lht=()=>"正在加载账户信息…",Iht=()=>"در حال بارگذاری اطلاعات حساب…",$ht=()=>"جارٍ تحميل تفاصيل الحساب…",Bht=()=>"Cargando los datos de la cuenta…",Pht=()=>"खाता विवरण लोड हो रहा है…",Fht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lht():t==="fa"?Iht():t==="ar"?$ht():t==="es"?Bht():t==="hi"?Pht():Dht()}),Hht=()=>"Local Git",qht=()=>"本地 Git",Uht=()=>"Git محلی",Ght=()=>"Git محلي",Vht=()=>"Git local",Kht=()=>"लोकल Git",Wht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qht():t==="fa"?Uht():t==="ar"?Ght():t==="es"?Vht():t==="hi"?Kht():Hht()}),Qht=()=>"Install needed",Xht=()=>"需要安装",Yht=()=>"نیاز به نصب",Zht=()=>"التثبيت مطلوب",Jht=()=>"No detectado",ept=()=>"इंस्टॉल ज़रूरी है",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xht():t==="fa"?Yht():t==="ar"?Zht():t==="es"?Jht():t==="hi"?ept():Qht()}),tpt=()=>"Not found",npt=()=>"未找到",rpt=()=>"پیدا نشد",spt=()=>"غير موجود",ipt=()=>"No encontrado",apt=()=>"नहीं मिला",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?npt():t==="fa"?rpt():t==="ar"?spt():t==="es"?ipt():t==="hi"?apt():tpt()}),opt=()=>"Signed out",cpt=()=>"未登录",lpt=()=>"وارد نشده",upt=()=>"غير مسجل الدخول",_pt=()=>"Sin iniciar sesión",fpt=()=>"साइन आउट",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cpt():t==="fa"?lpt():t==="ar"?upt():t==="es"?_pt():t==="hi"?fpt():opt()}),dpt=()=>"OpenResearch uses a coding agent already installed on this machine.",hpt=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",ppt=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",mpt=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",gpt=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",vpt=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",bpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hpt():t==="fa"?ppt():t==="ar"?mpt():t==="es"?gpt():t==="hi"?vpt():dpt()}),ypt=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",xpt=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",wpt=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",kpt=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",Spt=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",Cpt=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",Ept=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xpt():t==="fa"?wpt():t==="ar"?kpt():t==="es"?Spt():t==="hi"?Cpt():ypt()}),Npt=()=>"Other research area",zpt=()=>"其他研究领域",jpt=()=>"حوزهٔ پژوهشی دیگر",Apt=()=>"مجال بحثي آخر",Tpt=()=>"Otra área de investigación",Rpt=()=>"अन्य शोध क्षेत्र",Mpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zpt():t==="fa"?jpt():t==="ar"?Apt():t==="es"?Tpt():t==="hi"?Rpt():Npt()}),Opt=()=>"Re-check",Dpt=()=>"重新检查",Lpt=()=>"بررسی دوباره",Ipt=()=>"إعادة الفحص",$pt=()=>"Volver a comprobar",Bpt=()=>"फिर से जाँचें",eb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpt():t==="fa"?Lpt():t==="ar"?Ipt():t==="es"?$pt():t==="hi"?Bpt():Opt()}),Ppt=()=>"Ready",Fpt=()=>"已就绪",Hpt=()=>"آماده",qpt=()=>"جاهز",Upt=()=>"Listo",Gpt=()=>"तैयार",RS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fpt():t==="fa"?Hpt():t==="ar"?qpt():t==="es"?Upt():t==="hi"?Gpt():Ppt()}),Vpt=()=>"Re-check Git before continuing",Kpt=()=>"请重新检查 Git 后再继续",Wpt=()=>"پیش از ادامه Git را دوباره بررسی کنید",Qpt=()=>"أعد فحص Git قبل المتابعة",Xpt=()=>"Vuelve a comprobar Git antes de continuar",Ypt=()=>"जारी रखने से पहले Git फिर से जाँचें",Zpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kpt():t==="fa"?Wpt():t==="ar"?Qpt():t==="es"?Xpt():t==="hi"?Ypt():Vpt()}),Jpt=()=>"Representative papers",e0t=()=>"代表性论文",t0t=()=>"مقاله‌های شاخص",n0t=()=>"أوراق تمثّل اهتماماتك البحثية",r0t=()=>"Papers representativos",s0t=()=>"प्रतिनिधि पेपर",i0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e0t():t==="fa"?t0t():t==="ar"?n0t():t==="es"?r0t():t==="hi"?s0t():Jpt()}),a0t=()=>"Research background",o0t=()=>"研究背景",c0t=()=>"پیشینهٔ پژوهشی",l0t=()=>"الخلفية البحثية",u0t=()=>"Trayectoria de investigación",_0t=()=>"शोध पृष्ठभूमि",f0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o0t():t==="fa"?c0t():t==="ar"?l0t():t==="es"?u0t():t==="hi"?_0t():a0t()}),d0t=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",h0t=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",p0t=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",m0t=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",g0t=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",v0t=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",ww=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h0t():t==="fa"?p0t():t==="ar"?m0t():t==="es"?g0t():t==="hi"?v0t():d0t()}),b0t=()=>"Search alphaXiv by title to link a paper…",y0t=()=>"按标题搜索 alphaXiv 以关联论文…",x0t=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",w0t=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",k0t=()=>"Busca en alphaXiv por título para vincular un paper…",S0t=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",C0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y0t():t==="fa"?x0t():t==="ar"?w0t():t==="es"?k0t():t==="hi"?S0t():b0t()}),E0t=()=>"Searching alphaXiv…",N0t=()=>"正在搜索 alphaXiv…",z0t=()=>"در حال جست‌وجوی alphaXiv…",j0t=()=>"جارٍ البحث في alphaXiv…",A0t=()=>"Buscando en alphaXiv…",T0t=()=>"alphaXiv खोजा जा रहा है…",R0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N0t():t==="fa"?z0t():t==="ar"?j0t():t==="es"?A0t():t==="hi"?T0t():E0t()}),M0t=()=>"Selected",O0t=()=>"已选择",D0t=()=>"انتخاب‌شده",L0t=()=>"محدد",I0t=()=>"Seleccionado",$0t=()=>"चयनित",B0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O0t():t==="fa"?D0t():t==="ar"?L0t():t==="es"?I0t():t==="hi"?$0t():M0t()}),P0t=()=>"Local model unavailable",F0t=()=>"本地模型不可用",H0t=()=>"مدل محلی در دسترس نیست",q0t=()=>"النموذج المحلي غير متاح",U0t=()=>"Modelo local no disponible",G0t=()=>"लोकल मॉडल उपलब्ध नहीं",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F0t():t==="fa"?H0t():t==="ar"?q0t():t==="es"?U0t():t==="hi"?G0t():P0t()}),V0t=()=>"Setting things up…",K0t=()=>"正在设置…",W0t=()=>"در حال راه‌اندازی…",Q0t=()=>"جارٍ التهيئة…",X0t=()=>"Preparando todo…",Y0t=()=>"सेट अप किया जा रहा है…",Z0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K0t():t==="fa"?W0t():t==="ar"?Q0t():t==="es"?X0t():t==="hi"?Y0t():V0t()}),J0t=()=>"Connect a local model or sign in to a coding agent to continue",emt=()=>"连接本地模型或登录编码智能体以继续",tmt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",nmt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",rmt=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",smt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",imt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?emt():t==="fa"?tmt():t==="ar"?nmt():t==="es"?rmt():t==="hi"?smt():J0t()}),amt=()=>"Connect a local model or sign in to an agent to continue.",omt=()=>"连接本地模型或登录一个智能体以继续。",cmt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",lmt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",umt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",_mt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",fmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?omt():t==="fa"?cmt():t==="ar"?lmt():t==="es"?umt():t==="hi"?_mt():amt()}),dmt=()=>"Signed in",hmt=()=>"已登录",pmt=()=>"وارد شده",mmt=()=>"تم تسجيل الدخول",gmt=()=>"Sesión iniciada",vmt=()=>"साइन इन",bmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hmt():t==="fa"?pmt():t==="ar"?mmt():t==="es"?gmt():t==="hi"?vmt():dmt()}),ymt=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",xmt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",wmt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",kmt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",Smt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",Cmt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",Emt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xmt():t==="fa"?wmt():t==="ar"?kmt():t==="es"?Smt():t==="hi"?Cmt():ymt()}),Nmt=()=>"· Step 1 of 2",zmt=()=>"· 第 1 步,共 2 步",jmt=()=>"· مرحلهٔ ۱ از ۲",Amt=()=>"· الخطوة 1 من 2",Tmt=()=>"· Paso 1 de 2",Rmt=()=>"· चरण 1 / 2",Mmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zmt():t==="fa"?jmt():t==="ar"?Amt():t==="es"?Tmt():t==="hi"?Rmt():Nmt()}),Omt=()=>"· Step 2 of 2",Dmt=()=>"· 第 2 步,共 2 步",Lmt=()=>"· مرحلهٔ ۲ از ۲",Imt=()=>"· الخطوة 2 من 2",$mt=()=>"· Paso 2 de 2",Bmt=()=>"· चरण 2 / 2",Pmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dmt():t==="fa"?Lmt():t==="ar"?Imt():t==="es"?$mt():t==="hi"?Bmt():Omt()}),Fmt=()=>"Tell us about your research",Hmt=()=>"介绍一下你的研究",qmt=()=>"از پژوهش خود بگویید",Umt=()=>"أخبرنا عن بحثك",Gmt=()=>"Cuéntanos sobre tu investigación",Vmt=()=>"हमें अपने शोध के बारे में बताएं",Kmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hmt():t==="fa"?qmt():t==="ar"?Umt():t==="es"?Gmt():t==="hi"?Vmt():Fmt()}),Wmt=()=>"Tell us your other research area",Qmt=()=>"告诉我们你的其他研究领域",Xmt=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",Ymt=()=>"أخبرنا عن مجالك البحثي الآخر",Zmt=()=>"Cuéntanos cuál es tu otra área de investigación",Jmt=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",egt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qmt():t==="fa"?Xmt():t==="ar"?Ymt():t==="es"?Zmt():t==="hi"?Jmt():Wmt()}),tgt=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",ngt=()=>"在一处跟踪实验、产物、算力、技能和代码。",rgt=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",sgt=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",igt=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",agt=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",ogt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ngt():t==="fa"?rgt():t==="ar"?sgt():t==="es"?igt():t==="hi"?agt():tgt()}),cgt=()=>"Unable to verify",lgt=()=>"无法验证",ugt=()=>"تأیید ممکن نیست",_gt=()=>"تعذّر التحقق",fgt=()=>"No se pudo verificar",dgt=()=>"सत्यापित नहीं हो सका",kw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lgt():t==="fa"?ugt():t==="ar"?_gt():t==="es"?fgt():t==="hi"?dgt():cgt()}),hgt=()=>"Update required",pgt=()=>"需要更新",mgt=()=>"نیازمند به‌روزرسانی",ggt=()=>"مطلوب تحديث",vgt=()=>"Actualización necesaria",bgt=()=>"अपडेट ज़रूरी है",ygt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pgt():t==="fa"?mgt():t==="ar"?ggt():t==="es"?vgt():t==="hi"?bgt():hgt()}),xgt=()=>"Waiting for the Git check",wgt=()=>"正在等待 Git 检查",kgt=()=>"در انتظار بررسی Git",Sgt=()=>"في انتظار فحص Git",Cgt=()=>"Esperando la comprobación de Git",Egt=()=>"Git जाँच का इंतज़ार है",Ngt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wgt():t==="fa"?kgt():t==="ar"?Sgt():t==="es"?Cgt():t==="hi"?Egt():xgt()}),zgt=()=>"Waiting for the local tool checks",jgt=()=>"正在等待本地工具检查",Agt=()=>"در انتظار بررسی ابزارهای محلی",Tgt=()=>"في انتظار فحوص الأدوات المحلية",Rgt=()=>"Esperando las comprobaciones de las herramientas locales",Mgt=()=>"लोकल टूल जाँच का इंतज़ार है",Ogt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jgt():t==="fa"?Agt():t==="ar"?Tgt():t==="es"?Rgt():t==="hi"?Mgt():zgt()}),Dgt=()=>"What areas are you interested in?",Lgt=()=>"你对哪些领域感兴趣?",Igt=()=>"به چه حوزه‌هایی علاقه دارید؟",$gt=()=>"ما المجالات التي تهتم بها؟",Bgt=()=>"¿Qué áreas te interesan?",Pgt=()=>"आपकी रुचि किन क्षेत्रों में है?",Fgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lgt():t==="fa"?Igt():t==="ar"?$gt():t==="es"?Bgt():t==="hi"?Pgt():Dgt()}),Hgt=()=>"Your code, data, and experiment history stay on your machine.",qgt=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",Ugt=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Ggt=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",Vgt=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",Kgt=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",Wgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qgt():t==="fa"?Ugt():t==="ar"?Ggt():t==="es"?Vgt():t==="hi"?Kgt():Hgt()}),Qgt=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Xgt=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",Ygt=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",Zgt=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",Jgt=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",e1t=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",t1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xgt():t==="fa"?Ygt():t==="ar"?Zgt():t==="es"?Jgt():t==="hi"?e1t():Qgt()}),n1t=()=>"Add cookie",r1t=()=>"添加 cookie",s1t=()=>"افزودن کوکی",i1t=()=>"إضافة ملف تعريف الارتباط",a1t=()=>"Añadir cookie",o1t=()=>"कुकी जोड़ें",c1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r1t():t==="fa"?s1t():t==="ar"?i1t():t==="es"?a1t():t==="hi"?o1t():n1t()}),l1t=()=>"Changed here and on Overleaf — choose which copy to keep",u1t=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",_1t=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",f1t=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",d1t=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",h1t=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",p1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u1t():t==="fa"?_1t():t==="ar"?f1t():t==="es"?d1t():t==="hi"?h1t():l1t()}),m1t=()=>"Create a token ↗",g1t=()=>"创建令牌 ↗",v1t=()=>"ساخت توکن ↗",b1t=()=>"إنشاء رمز ↗",y1t=()=>"Crear un token ↗",x1t=()=>"एक टोकन बनाएं ↗",w1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g1t():t==="fa"?v1t():t==="ar"?b1t():t==="es"?y1t():t==="hi"?x1t():m1t()}),k1t=()=>"Overleaf Git token",S1t=()=>"Overleaf Git 令牌",C1t=()=>"توکن Git در Overleaf",E1t=()=>"رمز Git لـ Overleaf",N1t=()=>"Token de Git de Overleaf",z1t=()=>"Overleaf Git टोकन",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S1t():t==="fa"?C1t():t==="ar"?E1t():t==="es"?N1t():t==="hi"?z1t():k1t()}),j1t=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",A1t=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",T1t=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",R1t=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",M1t=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",O1t=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",D1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A1t():t==="fa"?T1t():t==="ar"?R1t():t==="es"?M1t():t==="hi"?O1t():j1t()}),L1t=()=>"Import from browser",I1t=()=>"从浏览器导入",$1t=()=>"وارد کردن از مرورگر",B1t=()=>"الاستيراد من المتصفح",P1t=()=>"Importar desde el navegador",F1t=()=>"ब्राउज़र से इंपोर्ट करें",H1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I1t():t==="fa"?$1t():t==="ar"?B1t():t==="es"?P1t():t==="hi"?F1t():L1t()}),q1t=()=>"In step with Overleaf",U1t=()=>"已与 Overleaf 同步",G1t=()=>"با Overleaf همگام است",V1t=()=>"متزامن مع Overleaf",K1t=()=>"Sincronizado con Overleaf",W1t=()=>"Overleaf के साथ मेल में",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U1t():t==="fa"?G1t():t==="ar"?V1t():t==="es"?K1t():t==="hi"?W1t():q1t()}),Q1t=()=>"The last sync did not finish.",X1t=()=>"上次同步未完成。",Y1t=()=>"آخرین همگام‌سازی کامل نشد.",Z1t=()=>"لم تكتمل آخر مزامنة.",J1t=()=>"La última sincronización no terminó.",evt=()=>"पिछला सिंक पूरा नहीं हुआ।",tvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X1t():t==="fa"?Y1t():t==="ar"?Z1t():t==="es"?J1t():t==="hi"?evt():Q1t()}),nvt=()=>"Link and sync",rvt=()=>"关联并同步",svt=()=>"پیوند و همگام‌سازی",ivt=()=>"الربط والمزامنة",avt=()=>"Vincular y sincronizar",ovt=()=>"लिंक करें और सिंक करें",cvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rvt():t==="fa"?svt():t==="ar"?ivt():t==="es"?avt():t==="hi"?ovt():nvt()}),lvt=()=>"Connecting to Overleaf…",uvt=()=>"正在连接 Overleaf…",_vt=()=>"در حال اتصال به Overleaf…",fvt=()=>"جارٍ الاتصال بـ Overleaf…",dvt=()=>"Conectando con Overleaf…",hvt=()=>"Overleaf से कनेक्ट हो रहा है…",pvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uvt():t==="fa"?_vt():t==="ar"?fvt():t==="es"?dvt():t==="hi"?hvt():lvt()}),mvt=()=>"Edits are live on Overleaf",gvt=()=>"编辑已在 Overleaf 实时同步",vvt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",bvt=()=>"تظهر التعديلات فورًا على Overleaf",yvt=()=>"Los cambios se sincronizan en directo con Overleaf",xvt=()=>"बदलाव Overleaf पर लाइव हैं",wvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gvt():t==="fa"?vvt():t==="ar"?bvt():t==="es"?yvt():t==="hi"?xvt():mvt()}),kvt=()=>"Retry",Svt=()=>"重试",Cvt=()=>"تلاش دوباره",Evt=()=>"إعادة المحاولة",Nvt=()=>"Reintentar",zvt=()=>"फिर से कोशिश करें",jvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Svt():t==="fa"?Cvt():t==="ar"?Evt():t==="es"?Nvt():t==="hi"?zvt():kvt()}),Avt=()=>"Live sync stopped.",Tvt=()=>"实时同步已停止。",Rvt=()=>"همگام‌سازی زنده متوقف شد.",Mvt=()=>"توقفت المزامنة المباشرة.",Ovt=()=>"Sincronización en directo detenida.",Dvt=()=>"लाइव सिंक रुक गया।",Lvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tvt():t==="fa"?Rvt():t==="ar"?Mvt():t==="es"?Ovt():t==="hi"?Dvt():Avt()}),Ivt=()=>"Live sync starts once the paper is in step with Overleaf.",$vt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Bvt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Pvt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Fvt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Hvt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",qvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$vt():t==="fa"?Bvt():t==="ar"?Pvt():t==="es"?Fvt():t==="hi"?Hvt():Ivt()}),Uvt=()=>"My projects ↗",Gvt=()=>"我的项目 ↗",Vvt=()=>"پروژه‌های من ↗",Kvt=()=>"مشاريعي ↗",Wvt=()=>"Mis proyectos ↗",Qvt=()=>"मेरे प्रोजेक्ट ↗",Bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gvt():t==="fa"?Vvt():t==="ar"?Kvt():t==="es"?Wvt():t==="hi"?Qvt():Uvt()}),Xvt=()=>"Nothing could be synced.",Yvt=()=>"没有内容可以同步。",Zvt=()=>"هیچ موردی قابل همگام‌سازی نبود.",Jvt=()=>"تعذّرت مزامنة أي شيء.",ebt=()=>"No se pudo sincronizar nada.",tbt=()=>"कुछ भी सिंक नहीं हो सका।",nbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yvt():t==="fa"?Zvt():t==="ar"?Jvt():t==="es"?ebt():t==="hi"?tbt():Xvt()}),rbt=()=>"Open Overleaf ↗",sbt=()=>"打开 Overleaf ↗",ibt=()=>"باز کردن Overleaf ↗",abt=()=>"فتح Overleaf ↗",obt=()=>"Abrir Overleaf ↗",cbt=()=>"Overleaf खोलें ↗",lbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sbt():t==="fa"?ibt():t==="ar"?abt():t==="es"?obt():t==="hi"?cbt():rbt()}),ubt=()=>"Cancel",_bt=()=>"取消",fbt=()=>"لغو",dbt=()=>"إلغاء",hbt=()=>"Cancelar",pbt=()=>"रद्द करें",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_bt():t==="fa"?fbt():t==="ar"?dbt():t==="es"?hbt():t==="hi"?pbt():ubt()}),mbt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",gbt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",vbt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",bbt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",ybt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",xbt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",wbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gbt():t==="fa"?vbt():t==="ar"?bbt():t==="es"?ybt():t==="hi"?xbt():mbt()}),kbt=()=>"Keep this copy",Sbt=()=>"保留此副本",Cbt=()=>"نگه داشتن این نسخه",Ebt=()=>"الاحتفاظ بهذه النسخة",Nbt=()=>"Conservar esta copia",zbt=()=>"यह कॉपी रखें",jbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sbt():t==="fa"?Cbt():t==="ar"?Ebt():t==="es"?Nbt():t==="hi"?zbt():kbt()}),Abt=()=>"Open in Overleaf",Tbt=()=>"在 Overleaf 中打开",Rbt=()=>"باز کردن در Overleaf",Mbt=()=>"فتح في Overleaf",Obt=()=>"Abrir en Overleaf",Dbt=()=>"Overleaf में खोलें",Lbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tbt():t==="fa"?Rbt():t==="ar"?Mbt():t==="es"?Obt():t==="hi"?Dbt():Abt()}),Ibt=()=>"Replace the Overleaf token",$bt=()=>"替换 Overleaf 令牌",Bbt=()=>"جایگزینی توکن Overleaf",Pbt=()=>"استبدال رمز Overleaf",Fbt=()=>"Reemplazar el token de Overleaf",Hbt=()=>"Overleaf टोकन बदलें",Pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$bt():t==="fa"?Bbt():t==="ar"?Pbt():t==="es"?Fbt():t==="hi"?Hbt():Ibt()}),qbt=()=>"Sync files",Ubt=()=>"同步文件",Gbt=()=>"همگام‌سازی فایل‌ها",Vbt=()=>"مزامنة الملفات",Kbt=()=>"Sincronizar archivos",Wbt=()=>"फ़ाइलें सिंक करें",Qbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ubt():t==="fa"?Gbt():t==="ar"?Vbt():t==="es"?Kbt():t==="hi"?Wbt():qbt()}),Xbt=()=>"Unlink",Ybt=()=>"取消关联",Zbt=()=>"قطع پیوند",Jbt=()=>"إلغاء الربط",eyt=()=>"Desvincular",tyt=()=>"लिंक हटाएं",nyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ybt():t==="fa"?Zbt():t==="ar"?Jbt():t==="es"?eyt():t==="hi"?tyt():Xbt()}),ryt=()=>"Upload a copy as a new project ↗",syt=()=>"上传副本作为新项目 ↗",iyt=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",ayt=()=>"رفع نسخة كمشروع جديد ↗",oyt=()=>"Subir una copia como proyecto nuevo ↗",cyt=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?syt():t==="fa"?iyt():t==="ar"?ayt():t==="es"?oyt():t==="hi"?cyt():ryt()}),lyt=()=>"Use Overleaf's",uyt=()=>"使用 Overleaf 的副本",_yt=()=>"استفاده از نسخهٔ Overleaf",fyt=()=>"استخدام نسخة Overleaf",dyt=()=>"Usar la de Overleaf",hyt=()=>"Overleaf का इस्तेमाल करें",pyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uyt():t==="fa"?_yt():t==="ar"?fyt():t==="es"?dyt():t==="hi"?hyt():lyt()}),myt=()=>"This paper stays in step with Overleaf.",gyt=()=>"此论文将与 Overleaf 保持同步。",vyt=()=>"این مقاله با Overleaf همگام می‌ماند.",byt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",yyt=()=>"Este paper se mantiene sincronizado con Overleaf.",xyt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",wyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gyt():t==="fa"?vyt():t==="ar"?byt():t==="es"?yyt():t==="hi"?xyt():myt()}),kyt=()=>"Paste it instead",Syt=()=>"改为粘贴",Cyt=()=>"به‌جایش بچسبانید",Eyt=()=>"الصقه بدلًا من ذلك",Nyt=()=>"Pegarla manualmente",zyt=()=>"इसके बजाय पेस्ट करें",jyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Syt():t==="fa"?Cyt():t==="ar"?Eyt():t==="es"?Nyt():t==="hi"?zyt():kyt()}),Ayt=e=>`Pulled ${e==null?void 0:e.paths}.`,Tyt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Ryt=e=>`${e==null?void 0:e.paths} دریافت شد.`,Myt=e=>`سُحب ${e==null?void 0:e.paths}.`,Oyt=e=>`Descargado: ${e==null?void 0:e.paths}.`,Dyt=e=>`${e==null?void 0:e.paths} पुल किया।`,Lyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tyt(e):t==="fa"?Ryt(e):t==="ar"?Myt(e):t==="es"?Oyt(e):t==="hi"?Dyt(e):Ayt(e)}),Iyt=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,$yt=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,Byt=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,Pyt=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,Fyt=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,Hyt=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,qyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$yt(e):t==="fa"?Byt(e):t==="ar"?Pyt(e):t==="es"?Fyt(e):t==="hi"?Hyt(e):Iyt(e)}),Uyt=e=>`Pushed ${e==null?void 0:e.paths}.`,Gyt=e=>`已推送 ${e==null?void 0:e.paths}。`,Vyt=e=>`${e==null?void 0:e.paths} ارسال شد.`,Kyt=e=>`رُفع ${e==null?void 0:e.paths}.`,Wyt=e=>`Subido: ${e==null?void 0:e.paths}.`,Qyt=e=>`${e==null?void 0:e.paths} पुश किया।`,Xyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gyt(e):t==="fa"?Vyt(e):t==="ar"?Kyt(e):t==="es"?Wyt(e):t==="hi"?Qyt(e):Uyt(e)}),Yyt=()=>"Add a fresh Overleaf session cookie to start following again.",Zyt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",Jyt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",ext=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",txt=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",nxt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",rxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zyt():t==="fa"?Jyt():t==="ar"?ext():t==="es"?txt():t==="hi"?nxt():Yyt()}),sxt=()=>"Save the file first",ixt=()=>"请先保存文件",axt=()=>"ابتدا فایل را ذخیره کنید",oxt=()=>"احفظ الملف أولًا",cxt=()=>"Guarda el archivo primero",lxt=()=>"पहले फ़ाइल सेव करें",uxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ixt():t==="fa"?axt():t==="ar"?oxt():t==="es"?cxt():t==="hi"?lxt():sxt()}),_xt=()=>"Save this file to sync it with Overleaf",fxt=()=>"保存此文件以与 Overleaf 同步",dxt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",hxt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",pxt=()=>"Guarda este archivo para sincronizarlo con Overleaf",mxt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fxt():t==="fa"?dxt():t==="ar"?hxt():t==="es"?pxt():t==="hi"?mxt():_xt()}),gxt=()=>"Save token",vxt=()=>"保存令牌",bxt=()=>"ذخیرهٔ توکن",yxt=()=>"حفظ الرمز",xxt=()=>"Guardar token",wxt=()=>"टोकन सेव करें",kxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vxt():t==="fa"?bxt():t==="ar"?yxt():t==="es"?xxt():t==="hi"?wxt():gxt()}),Sxt=()=>"Send this paper to Overleaf",Cxt=()=>"将此论文发送到 Overleaf",Ext=()=>"ارسال مقاله به Overleaf",Nxt=()=>"أرسل هذه الورقة إلى Overleaf",zxt=()=>"Enviar este paper a Overleaf",jxt=()=>"यह पेपर Overleaf को भेजें",Axt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cxt():t==="fa"?Ext():t==="ar"?Nxt():t==="es"?zxt():t==="hi"?jxt():Sxt()}),Txt=()=>"Overleaf session cookie",Rxt=()=>"Overleaf 会话 cookie",Mxt=()=>"کوکی نشست Overleaf",Oxt=()=>"ملف تعريف ارتباط جلسة Overleaf",Dxt=()=>"Cookie de sesión de Overleaf",Lxt=()=>"Overleaf सेशन कुकी",q3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rxt():t==="fa"?Mxt():t==="ar"?Oxt():t==="es"?Dxt():t==="hi"?Lxt():Txt()}),Ixt=()=>"To follow Overleaf as people type, paste your Overleaf session cookie: in a browser signed in to Overleaf, open the developer tools, find the overleaf_session2 cookie, and copy its value. It stays on this machine.",$xt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Bxt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Pxt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Fxt=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",Hxt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",qxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$xt():t==="fa"?Bxt():t==="ar"?Pxt():t==="es"?Fxt():t==="hi"?Hxt():Ixt()}),Uxt=()=>"Overleaf sync failed",Gxt=()=>"Overleaf 同步失败",Vxt=()=>"همگام‌سازی با Overleaf ناموفق بود",Kxt=()=>"فشلت مزامنة Overleaf",Wxt=()=>"Error al sincronizar con Overleaf",Qxt=()=>"Overleaf सिंक विफल",U3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gxt():t==="fa"?Vxt():t==="ar"?Kxt():t==="es"?Wxt():t==="hi"?Qxt():Uxt()}),Xxt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",Yxt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",Zxt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",Jxt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",e2t=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",t2t=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",n2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxt():t==="fa"?Zxt():t==="ar"?Jxt():t==="es"?e2t():t==="hi"?t2t():Xxt()}),r2t=()=>"Syncing with Overleaf…",s2t=()=>"正在与 Overleaf 同步…",i2t=()=>"در حال همگام‌سازی با Overleaf…",a2t=()=>"جارٍ المزامنة مع Overleaf…",o2t=()=>"Sincronizando con Overleaf…",c2t=()=>"Overleaf के साथ सिंक हो रहा है…",LL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s2t():t==="fa"?i2t():t==="ar"?a2t():t==="es"?o2t():t==="hi"?c2t():r2t()}),l2t=()=>"Paste an Overleaf Git authentication token to keep this paper in step with an Overleaf project. Create one in Overleaf under Account Settings — Git integration comes with a paid Overleaf plan.",u2t=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",_2t=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",f2t=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",d2t=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",h2t=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",p2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u2t():t==="fa"?_2t():t==="ar"?f2t():t==="es"?d2t():t==="hi"?h2t():l2t()}),m2t=()=>"Paste the URL of the Overleaf project this paper belongs to. Overleaf cannot create one over Git, so open or create the project there first.",g2t=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",v2t=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",b2t=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",y2t=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",x2t=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",w2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g2t():t==="fa"?v2t():t==="ar"?b2t():t==="es"?y2t():t==="hi"?x2t():m2t()}),k2t=()=>"Toggle Plan mode for this chat",S2t=()=>"切换此聊天的计划模式",C2t=()=>"تغییر حالت طرح این گفت‌وگو",E2t=()=>"تبديل وضع التخطيط لهذه المحادثة",N2t=()=>"Activa o desactiva el modo Plan en este chat",z2t=()=>"इस चैट के लिए प्लान मोड टॉगल करें",j2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S2t():t==="fa"?C2t():t==="ar"?E2t():t==="es"?N2t():t==="hi"?z2t():k2t()}),A2t=()=>"Accept and auto mode",T2t=()=>"接受并使用自动模式",R2t=()=>"پذیرش و حالت خودکار",M2t=()=>"قبول وتفعيل الوضع التلقائي",O2t=()=>"Aceptar en modo automático",D2t=()=>"स्वीकार करें और ऑटो मोड",L2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T2t():t==="fa"?R2t():t==="ar"?M2t():t==="es"?O2t():t==="hi"?D2t():A2t()}),I2t=()=>"Accept and bypass all",$2t=()=>"接受并跳过所有审批",B2t=()=>"پذیرش و عبور از همهٔ تأییدها",P2t=()=>"القبول وتجاوز الكل",F2t=()=>"Aceptar y omitir permisos",H2t=()=>"स्वीकार करें और सब बायपास करें",q2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$2t():t==="fa"?B2t():t==="ar"?P2t():t==="es"?F2t():t==="hi"?H2t():I2t()}),U2t=()=>"Accept plan",G2t=()=>"接受计划",V2t=()=>"پذیرش طرح",K2t=()=>"قبول الخطة",W2t=()=>"Aceptar plan",Q2t=()=>"प्लान स्वीकार करें",X2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G2t():t==="fa"?V2t():t==="ar"?K2t():t==="es"?W2t():t==="hi"?Q2t():U2t()}),Y2t=e=>`${e==null?void 0:e.agent} proposed a plan`,Z2t=e=>`${e==null?void 0:e.agent} 提出了一个计划`,J2t=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,ewt=e=>`${e==null?void 0:e.agent} اقترح خطة`,twt=e=>`${e==null?void 0:e.agent} propuso un plan`,nwt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,rwt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Z2t(e):t==="fa"?J2t(e):t==="ar"?ewt(e):t==="es"?twt(e):t==="hi"?nwt(e):Y2t(e)}),swt=e=>`${e==null?void 0:e.agent} is ready to proceed`,iwt=e=>`${e==null?void 0:e.agent} 已准备好继续`,awt=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,owt=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,cwt=e=>`${e==null?void 0:e.agent} está listo para continuar`,lwt=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,uwt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iwt(e):t==="fa"?awt(e):t==="ar"?owt(e):t==="es"?cwt(e):t==="hi"?lwt(e):swt(e)}),_wt=()=>"Back",fwt=()=>"返回",dwt=()=>"بازگشت",hwt=()=>"رجوع",pwt=()=>"Atrás",mwt=()=>"वापस",IL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fwt():t==="fa"?dwt():t==="ar"?hwt():t==="es"?pwt():t==="hi"?mwt():_wt()}),gwt=()=>"More approval options",vwt=()=>"更多批准选项",bwt=()=>"گزینه‌های تأیید بیشتر",ywt=()=>"خيارات موافقة إضافية",xwt=()=>"Más opciones de aprobación",wwt=()=>"और स्वीकृति विकल्प",kwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vwt():t==="fa"?bwt():t==="ar"?ywt():t==="es"?xwt():t==="hi"?wwt():gwt()}),Swt=()=>"Open plan",Cwt=()=>"打开计划",Ewt=()=>"باز کردن طرح",Nwt=()=>"فتح الخطة",zwt=()=>"Abrir plan",jwt=()=>"प्लान खोलें",Awt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cwt():t==="fa"?Ewt():t==="ar"?Nwt():t==="es"?zwt():t==="hi"?jwt():Swt()}),Twt=()=>"Reject",Rwt=()=>"拒绝",Mwt=()=>"رد کردن",Owt=()=>"رفض",Dwt=()=>"Rechazar",Lwt=()=>"अस्वीकार करें",Iwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rwt():t==="fa"?Mwt():t==="ar"?Owt():t==="es"?Dwt():t==="hi"?Lwt():Twt()}),$wt=()=>"Revise",Bwt=()=>"修改",Pwt=()=>"بازنگری",Fwt=()=>"طلب تعديل",Hwt=()=>"Pedir cambios",qwt=()=>"संशोधित करें",Uwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bwt():t==="fa"?Pwt():t==="ar"?Fwt():t==="es"?Hwt():t==="hi"?qwt():$wt()}),Gwt=()=>"Revise…",Vwt=()=>"修改…",Kwt=()=>"بازنگری…",Wwt=()=>"طلب تعديل…",Qwt=()=>"Pedir cambios…",Xwt=()=>"संशोधित करें…",Ywt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vwt():t==="fa"?Kwt():t==="ar"?Wwt():t==="es"?Qwt():t==="hi"?Xwt():Gwt()}),Zwt=()=>"What should change? (optional)",Jwt=()=>"需要更改什么?(可选)",e4t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",t4t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",n4t=()=>"¿Qué debería cambiar? (opcional)",r4t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",s4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jwt():t==="fa"?e4t():t==="ar"?t4t():t==="es"?n4t():t==="hi"?r4t():Zwt()}),i4t=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,a4t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,o4t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,c4t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,l4t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,u4t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,_4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a4t(e):t==="fa"?o4t(e):t==="ar"?c4t(e):t==="es"?l4t(e):t==="hi"?u4t(e):i4t(e)}),f4t=()=>"Cancel",d4t=()=>"取消",h4t=()=>"لغو",p4t=()=>"إلغاء",m4t=()=>"Cancelar",g4t=()=>"रद्द करें",v4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d4t():t==="fa"?h4t():t==="ar"?p4t():t==="es"?m4t():t==="hi"?g4t():f4t()}),b4t=()=>"Delete project",y4t=()=>"删除项目",x4t=()=>"حذف پروژه",w4t=()=>"حذف المشروع",k4t=()=>"Eliminar proyecto",S4t=()=>"प्रोजेक्ट हटाएं",$L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y4t():t==="fa"?x4t():t==="ar"?w4t():t==="es"?k4t():t==="hi"?S4t():b4t()}),C4t=()=>"The local folder and linked GitHub repository are kept.",E4t=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",N4t=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",z4t=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",j4t=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",A4t=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",T4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E4t():t==="fa"?N4t():t==="ar"?z4t():t==="es"?j4t():t==="hi"?A4t():C4t()}),R4t=()=>"The local folder is kept.",M4t=()=>"本地文件夹会保留。",O4t=()=>"پوشهٔ محلی نگه داشته می‌شود.",D4t=()=>"يُحتفظ بالمجلد المحلي.",L4t=()=>"La carpeta local se conserva.",I4t=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",$4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M4t():t==="fa"?O4t():t==="ar"?D4t():t==="es"?L4t():t==="hi"?I4t():R4t()}),B4t=()=>"New project",P4t=()=>"新建项目",F4t=()=>"پروژهٔ جدید",H4t=()=>"مشروع جديد",q4t=()=>"Nuevo proyecto",U4t=()=>"नया प्रोजेक्ट",tb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P4t():t==="fa"?F4t():t==="ar"?H4t():t==="es"?q4t():t==="hi"?U4t():B4t()}),G4t=()=>"Projects",V4t=()=>"项目",K4t=()=>"پروژه‌ها",W4t=()=>"المشاريع",Q4t=()=>"Proyectos",X4t=()=>"प्रोजेक्ट",MS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V4t():t==="fa"?K4t():t==="ar"?W4t():t==="es"?Q4t():t==="hi"?X4t():G4t()}),Y4t=()=>"Local",Z4t=()=>"本地",J4t=()=>"محلی",e3t=()=>"محلي",t3t=()=>"Local",n3t=()=>"लोकल",G3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z4t():t==="fa"?J4t():t==="ar"?e3t():t==="es"?t3t():t==="hi"?n3t():Y4t()}),r3t=()=>"Installing the compatible binary. This may take a few minutes.",s3t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",i3t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",a3t=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",o3t=()=>"Instalando el binario compatible. Puede tardar unos minutos.",c3t=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",l3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s3t():t==="fa"?i3t():t==="ar"?a3t():t==="es"?o3t():t==="hi"?c3t():r3t()}),u3t=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,_3t=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,f3t=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,d3t=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,h3t=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,p3t=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,m3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_3t(e):t==="fa"?f3t(e):t==="ar"?d3t(e):t==="es"?h3t(e):t==="hi"?p3t(e):u3t(e)}),g3t=()=>"Check again",v3t=()=>"再次检查",b3t=()=>"بررسی دوباره",y3t=()=>"تحقق مجددًا",x3t=()=>"Volver a comprobar",w3t=()=>"फिर से जाँचें",Fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v3t():t==="fa"?b3t():t==="ar"?y3t():t==="es"?x3t():t==="hi"?w3t():g3t()}),k3t=()=>"Closing…",S3t=()=>"正在关闭…",C3t=()=>"در حال بستن…",E3t=()=>"جارٍ الإغلاق…",N3t=()=>"Cerrando…",z3t=()=>"बंद हो रहा है…",j3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S3t():t==="fa"?C3t():t==="ar"?E3t():t==="es"?N3t():t==="hi"?z3t():k3t()}),A3t=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,T3t=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,R3t=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,M3t=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,O3t=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,D3t=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,L3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?T3t(e):t==="fa"?R3t(e):t==="ar"?M3t(e):t==="es"?O3t(e):t==="hi"?D3t(e):A3t(e)}),I3t=()=>"Preparing your remote workspace…",$3t=()=>"正在准备远程工作区…",B3t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",P3t=()=>"جارٍ تحضير مساحة عملك البعيدة…",F3t=()=>"Preparando tu espacio de trabajo remoto…",H3t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",q3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$3t():t==="fa"?B3t():t==="ar"?P3t():t==="es"?F3t():t==="hi"?H3t():I3t()}),U3t=e=>`Connecting to ${e==null?void 0:e.host}`,G3t=e=>`正在连接到 ${e==null?void 0:e.host}`,V3t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,K3t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,W3t=e=>`Conectando a ${e==null?void 0:e.host}`,Q3t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,X3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G3t(e):t==="fa"?V3t(e):t==="ar"?K3t(e):t==="es"?W3t(e):t==="hi"?Q3t(e):U3t(e)}),Y3t=()=>"Close remote host picker",Z3t=()=>"关闭远程主机选择器",J3t=()=>"بستن انتخاب‌گر میزبان راه‌دور",e5t=()=>"إغلاق مُنتقي المضيف البعيد",t5t=()=>"Cerrar el selector de hosts remotos",n5t=()=>"रिमोट होस्ट पिकर बंद करें",r5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z3t():t==="fa"?J3t():t==="ar"?e5t():t==="es"?t5t():t==="hi"?n5t():Y3t()}),s5t=()=>"Choose a configured SSH host.",i5t=()=>"选择已配置的 SSH 主机。",a5t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",o5t=()=>"اختر مضيف SSH مُعدًّا.",c5t=()=>"Elige un host SSH configurado.",l5t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",u5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i5t():t==="fa"?a5t():t==="ar"?o5t():t==="es"?c5t():t==="hi"?l5t():s5t()}),_5t=()=>"Connect to remote",f5t=()=>"连接到远程主机",d5t=()=>"اتصال به میزبان راه‌دور",h5t=()=>"الاتصال بجهاز بعيد",p5t=()=>"Conectar a un host remoto",m5t=()=>"रिमोट से कनेक्ट करें",V3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f5t():t==="fa"?d5t():t==="ar"?h5t():t==="es"?p5t():t==="hi"?m5t():_5t()}),g5t=()=>"Disconnect",v5t=()=>"断开连接",b5t=()=>"قطع اتصال",y5t=()=>"قطع الاتصال",x5t=()=>"Desconectar",w5t=()=>"डिस्कनेक्ट करें",K3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v5t():t==="fa"?b5t():t==="ar"?y5t():t==="es"?x5t():t==="hi"?w5t():g5t()}),k5t=()=>"Your remote work is still running. Reconnect when you’re ready.",S5t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",C5t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",E5t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",N5t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",z5t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",j5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S5t():t==="fa"?C5t():t==="ar"?E5t():t==="es"?N5t():t==="hi"?z5t():k5t()}),A5t=e=>`Disconnected from ${e==null?void 0:e.host}`,T5t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,R5t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,M5t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,O5t=e=>`Desconectado de ${e==null?void 0:e.host}`,D5t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,BL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?T5t(e):t==="fa"?R5t(e):t==="ar"?M5t(e):t==="es"?O5t(e):t==="hi"?D5t(e):A5t(e)}),L5t=e=>`Could not connect to ${e==null?void 0:e.host}`,I5t=e=>`无法连接到 ${e==null?void 0:e.host}`,$5t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,B5t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,P5t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,F5t=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,H5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?I5t(e):t==="fa"?$5t(e):t==="ar"?B5t(e):t==="es"?P5t(e):t==="hi"?F5t(e):L5t(e)}),q5t=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",U5t=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",G5t=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",V5t=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",K5t=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",W5t=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",Q5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U5t():t==="fa"?G5t():t==="ar"?V5t():t==="es"?K5t():t==="hi"?W5t():q5t()}),X5t=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",Y5t=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",Z5t=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",J5t=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",ekt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",tkt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",nkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y5t():t==="fa"?Z5t():t==="ar"?J5t():t==="es"?ekt():t==="hi"?tkt():X5t()}),rkt=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,skt=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,ikt=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,akt=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,okt=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,ckt=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,lkt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?skt(e):t==="fa"?ikt(e):t==="ar"?akt(e):t==="es"?okt(e):t==="hi"?ckt(e):rkt(e)}),ukt=()=>"OpenResearch binary",_kt=()=>"OpenResearch 二进制文件",fkt=()=>"فایل اجرایی OpenResearch",dkt=()=>"الملف التنفيذي لـ OpenResearch",hkt=()=>"Binario de OpenResearch",pkt=()=>"OpenResearch बाइनरी",mkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_kt():t==="fa"?fkt():t==="ar"?dkt():t==="es"?hkt():t==="hi"?pkt():ukt()}),gkt=()=>"OpenResearch Database",vkt=()=>"OpenResearch 数据库",bkt=()=>"پایگاه دادهٔ OpenResearch",ykt=()=>"قاعدة بيانات OpenResearch",xkt=()=>"Base de datos de OpenResearch",wkt=()=>"OpenResearch डेटाबेस",kkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vkt():t==="fa"?bkt():t==="ar"?ykt():t==="es"?xkt():t==="hi"?wkt():gkt()}),Skt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",Ckt=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",Ekt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",Nkt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",zkt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",jkt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",Akt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ckt():t==="fa"?Ekt():t==="ar"?Nkt():t==="es"?zkt():t==="hi"?jkt():Skt()}),Tkt=()=>"Install OpenResearch?",Rkt=()=>"安装 OpenResearch?",Mkt=()=>"OpenResearch نصب شود؟",Okt=()=>"تثبيت OpenResearch؟",Dkt=()=>"¿Instalar OpenResearch?",Lkt=()=>"OpenResearch इंस्टॉल करें?",Ikt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rkt():t==="fa"?Mkt():t==="ar"?Okt():t==="es"?Dkt():t==="hi"?Lkt():Tkt()}),$kt=()=>"Installing…",Bkt=()=>"正在安装…",Pkt=()=>"در حال نصب…",Fkt=()=>"جارٍ التثبيت…",Hkt=()=>"Instalando…",qkt=()=>"इंस्टॉल हो रहा है…",Ukt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bkt():t==="fa"?Pkt():t==="ar"?Fkt():t==="es"?Hkt():t==="hi"?qkt():$kt()}),Gkt=()=>"No matching SSH hosts",Vkt=()=>"没有匹配的 SSH 主机",Kkt=()=>"میزبان SSH منطبقی پیدا نشد",Wkt=()=>"لا توجد مضيفات SSH مطابقة",Qkt=()=>"No hay hosts SSH que coincidan",Xkt=()=>"कोई मेल खाता SSH होस्ट नहीं",Ykt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vkt():t==="fa"?Kkt():t==="ar"?Wkt():t==="es"?Qkt():t==="hi"?Xkt():Gkt()}),Zkt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,Jkt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,eSt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,tSt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,nSt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,rSt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,sSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jkt(e):t==="fa"?eSt(e):t==="ar"?tSt(e):t==="es"?nSt(e):t==="hi"?rSt(e):Zkt(e)}),iSt=()=>"Open remote",aSt=()=>"打开远程工作区",oSt=()=>"باز کردن راه‌دور",cSt=()=>"فتح مساحة العمل البعيدة",lSt=()=>"Abrir remoto",uSt=()=>"रिमोट खोलें",_St=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aSt():t==="fa"?oSt():t==="ar"?cSt():t==="es"?lSt():t==="hi"?uSt():iSt()}),fSt=()=>"Closing this tab or disconnecting leaves agents and experiments running. Approval requests remain pending for up to 55 minutes. A host restart or administrator policy may stop OpenResearch.",dSt=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",hSt=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",pSt=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",mSt=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",gSt=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",vSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dSt():t==="fa"?hSt():t==="ar"?pSt():t==="es"?mSt():t==="hi"?gSt():fSt()}),bSt=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",ySt=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",xSt=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",wSt=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",kSt=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",SSt=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",CSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ySt():t==="fa"?xSt():t==="ar"?wSt():t==="es"?kSt():t==="hi"?SSt():bSt()}),ESt=()=>"Preparing remote workspace…",NSt=()=>"正在准备远程工作区…",zSt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",jSt=()=>"جارٍ تحضير مساحة العمل البعيدة…",ASt=()=>"Preparando el espacio de trabajo remoto…",TSt=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",RSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NSt():t==="fa"?zSt():t==="ar"?jSt():t==="es"?ASt():t==="hi"?TSt():ESt()}),MSt=()=>"Reconnect",OSt=()=>"重新连接",DSt=()=>"اتصال دوباره",LSt=()=>"إعادة الاتصال",ISt=()=>"Reconectar",$St=()=>"फिर से कनेक्ट करें",Hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OSt():t==="fa"?DSt():t==="ar"?LSt():t==="es"?ISt():t==="hi"?$St():MSt()}),BSt=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",PSt=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",FSt=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",HSt=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",qSt=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",USt=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",GSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PSt():t==="fa"?FSt():t==="ar"?HSt():t==="es"?qSt():t==="hi"?USt():BSt()}),VSt=e=>`Reconnecting to ${e==null?void 0:e.host}`,KSt=e=>`正在重新连接到 ${e==null?void 0:e.host}`,WSt=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,QSt=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,XSt=e=>`Reconectando a ${e==null?void 0:e.host}`,YSt=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,ZSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KSt(e):t==="fa"?WSt(e):t==="ar"?QSt(e):t==="es"?XSt(e):t==="hi"?YSt(e):VSt(e)}),JSt=()=>"Search SSH hosts",e6t=()=>"搜索 SSH 主机",t6t=()=>"جستجوی میزبان‌های SSH",n6t=()=>"البحث في مضيفات SSH",r6t=()=>"Buscar hosts SSH",s6t=()=>"SSH होस्ट खोजें",qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e6t():t==="fa"?t6t():t==="ar"?n6t():t==="es"?r6t():t==="hi"?s6t():JSt()}),i6t=e=>`SSH: ${e==null?void 0:e.host}`,a6t=e=>`SSH:${e==null?void 0:e.host}`,o6t=e=>`SSH: ${e==null?void 0:e.host}`,c6t=e=>`SSH: ${e==null?void 0:e.host}`,l6t=e=>`SSH: ${e==null?void 0:e.host}`,u6t=e=>`SSH: ${e==null?void 0:e.host}`,Sw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a6t(e):t==="fa"?o6t(e):t==="ar"?c6t(e):t==="es"?l6t(e):t==="hi"?u6t(e):i6t(e)}),_6t=()=>"Start a new OpenResearch host",f6t=()=>"启动新的 OpenResearch 主机",d6t=()=>"راه‌اندازی میزبان جدید OpenResearch",h6t=()=>"بدء مضيف OpenResearch جديد",p6t=()=>"Iniciar un nuevo host de OpenResearch",m6t=()=>"एक नया OpenResearch होस्ट शुरू करें",g6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f6t():t==="fa"?d6t():t==="ar"?h6t():t==="es"?p6t():t==="hi"?m6t():_6t()}),v6t=e=>`End ${e==null?void 0:e.count} pending approvals.`,b6t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,y6t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,x6t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,w6t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,k6t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,S6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b6t(e):t==="fa"?y6t(e):t==="ar"?x6t(e):t==="es"?w6t(e):t==="hi"?k6t(e):v6t(e)}),C6t=()=>"Stop OpenResearch",E6t=()=>"停止 OpenResearch",N6t=()=>"توقف OpenResearch",z6t=()=>"إيقاف OpenResearch",j6t=()=>"Detener OpenResearch",A6t=()=>"OpenResearch रोकें",T6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E6t():t==="fa"?N6t():t==="ar"?z6t():t==="es"?j6t():t==="hi"?A6t():C6t()}),R6t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,M6t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,O6t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,D6t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,L6t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,I6t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,$6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M6t(e):t==="fa"?O6t(e):t==="ar"?D6t(e):t==="es"?L6t(e):t==="hi"?I6t(e):R6t(e)}),B6t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,P6t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,F6t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,H6t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,q6t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,U6t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,G6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P6t(e):t==="fa"?F6t(e):t==="ar"?H6t(e):t==="es"?q6t(e):t==="hi"?U6t(e):B6t(e)}),V6t=()=>"Stop OpenResearch on host",K6t=()=>"停止主机上的 OpenResearch",W6t=()=>"توقف OpenResearch روی میزبان",Q6t=()=>"إيقاف OpenResearch على المضيف",X6t=()=>"Detener OpenResearch en el host",Y6t=()=>"होस्ट पर OpenResearch रोकें",PL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K6t():t==="fa"?W6t():t==="ar"?Q6t():t==="es"?X6t():t==="hi"?Y6t():V6t()}),Z6t=()=>"This will also:",J6t=()=>"这还将:",eCt=()=>"این کار همچنین:",tCt=()=>"سيؤدي هذا أيضًا إلى:",nCt=()=>"Esto también:",rCt=()=>"इससे यह भी होगा:",sCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J6t():t==="fa"?eCt():t==="ar"?tCt():t==="es"?nCt():t==="hi"?rCt():Z6t()}),iCt=()=>"End 1 pending approval.",aCt=()=>"结束 1 个待审批请求。",oCt=()=>"۱ تأیید در انتظار را پایان می‌دهد.",cCt=()=>"إنهاء طلب موافقة معلّق واحد.",lCt=()=>"Cancelará 1 aprobación pendiente.",uCt=()=>"1 लंबित स्वीकृति खत्म होगी।",_Ct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aCt():t==="fa"?oCt():t==="ar"?cCt():t==="es"?lCt():t==="hi"?uCt():iCt()}),fCt=()=>"Leave 1 submitted experiment running.",dCt=()=>"让 1 个已提交实验继续运行。",hCt=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",pCt=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",mCt=()=>"Dejará 1 experimento enviado en ejecución.",gCt=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",vCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dCt():t==="fa"?hCt():t==="ar"?pCt():t==="es"?mCt():t==="hi"?gCt():fCt()}),bCt=()=>"Disconnect 1 other client.",yCt=()=>"断开 1 个其他客户端。",xCt=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",wCt=()=>"قطع اتصال عميل آخر واحد.",kCt=()=>"Desconectará a otro cliente.",SCt=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",CCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yCt():t==="fa"?xCt():t==="ar"?wCt():t==="es"?kCt():t==="hi"?SCt():bCt()}),ECt=()=>"Keep 1 queued message saved.",NCt=()=>"保留 1 条排队消息。",zCt=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",jCt=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",ACt=()=>"Conservará 1 mensaje en cola.",TCt=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",RCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NCt():t==="fa"?zCt():t==="ar"?jCt():t==="es"?ACt():t==="hi"?TCt():ECt()}),MCt=()=>"Interrupt 1 active agent turn.",OCt=()=>"中断 1 个活动代理任务。",DCt=()=>"۱ نوبت فعال عامل را قطع می‌کند.",LCt=()=>"مقاطعة جولة وكيل نشطة واحدة.",ICt=()=>"Interrumpirá 1 turno activo de un agente.",$Ct=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",BCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OCt():t==="fa"?DCt():t==="ar"?LCt():t==="es"?ICt():t==="hi"?$Ct():MCt()}),PCt=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,FCt=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,HCt=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,qCt=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,UCt=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,GCt=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,VCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FCt(e):t==="fa"?HCt(e):t==="ar"?qCt(e):t==="es"?UCt(e):t==="hi"?GCt(e):PCt(e)}),KCt=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,WCt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,QCt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,XCt=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,YCt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,ZCt=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,JCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WCt(e):t==="fa"?QCt(e):t==="ar"?XCt(e):t==="es"?YCt(e):t==="hi"?ZCt(e):KCt(e)}),e7t=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,t7t=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,n7t=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,r7t=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,s7t=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,i7t=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,a7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?t7t(e):t==="fa"?n7t(e):t==="ar"?r7t(e):t==="es"?s7t(e):t==="hi"?i7t(e):e7t(e)}),o7t=()=>"Stopping host…",c7t=()=>"正在停止主机…",l7t=()=>"در حال توقف میزبان…",u7t=()=>"جارٍ إيقاف المضيف…",_7t=()=>"Deteniendo el host…",f7t=()=>"होस्ट रोका जा रहा है…",d7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c7t():t==="fa"?l7t():t==="ar"?u7t():t==="es"?_7t():t==="hi"?f7t():o7t()}),h7t=()=>"Update",p7t=()=>"更新",m7t=()=>"به‌روزرسانی",g7t=()=>"تحديث",v7t=()=>"Actualizar",b7t=()=>"अपडेट करें",Uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p7t():t==="fa"?m7t():t==="ar"?g7t():t==="es"?v7t():t==="hi"?b7t():h7t()}),y7t=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,x7t=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,w7t=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,k7t=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,S7t=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,C7t=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,E7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?x7t(e):t==="fa"?w7t(e):t==="ar"?k7t(e):t==="es"?S7t(e):t==="hi"?C7t(e):y7t(e)}),N7t=()=>"Update OpenResearch?",z7t=()=>"更新 OpenResearch?",j7t=()=>"OpenResearch به‌روزرسانی شود؟",A7t=()=>"تحديث OpenResearch؟",T7t=()=>"¿Actualizar OpenResearch?",R7t=()=>"OpenResearch अपडेट करें?",M7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z7t():t==="fa"?j7t():t==="ar"?A7t():t==="es"?T7t():t==="hi"?R7t():N7t()}),O7t=()=>"Updating…",D7t=()=>"正在更新…",L7t=()=>"در حال به‌روزرسانی…",I7t=()=>"جارٍ التحديث…",$7t=()=>"Actualizando…",B7t=()=>"अपडेट हो रहा है…",P7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D7t():t==="fa"?L7t():t==="ar"?I7t():t==="es"?$7t():t==="hi"?B7t():O7t()}),F7t=()=>"Disable syncing",H7t=()=>"关闭同步",q7t=()=>"غیرفعال کردن همگام‌سازی",U7t=()=>"تعطيل المزامنة",G7t=()=>"Desactivar sincronización",V7t=()=>"सिंकिंग बंद करें",K7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H7t():t==="fa"?q7t():t==="ar"?U7t():t==="es"?G7t():t==="hi"?V7t():F7t()}),W7t=()=>"Enable GitHub syncing",Q7t=()=>"启用 GitHub 同步",X7t=()=>"فعال‌سازی همگام‌سازی GitHub",Y7t=()=>"تفعيل مزامنة GitHub",Z7t=()=>"Activar sincronización con GitHub",J7t=()=>"GitHub सिंकिंग चालू करें",e8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q7t():t==="fa"?X7t():t==="ar"?Y7t():t==="es"?Z7t():t==="hi"?J7t():W7t()}),t8t=()=>"Enabling…",n8t=()=>"正在启用…",r8t=()=>"در حال فعال‌سازی…",s8t=()=>"جارٍ التفعيل…",i8t=()=>"Activando…",a8t=()=>"चालू हो रहा है…",o8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n8t():t==="fa"?r8t():t==="ar"?s8t():t==="es"?i8t():t==="hi"?a8t():t8t()}),c8t=()=>"Updating…",l8t=()=>"正在更新…",u8t=()=>"در حال به‌روزرسانی…",_8t=()=>"جارٍ التحديث…",f8t=()=>"Actualizando…",d8t=()=>"अपडेट हो रहा है…",h8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l8t():t==="fa"?u8t():t==="ar"?_8t():t==="es"?f8t():t==="hi"?d8t():c8t()}),p8t=()=>"Reopen a previous chat",m8t=()=>"重新打开之前的聊天",g8t=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",v8t=()=>"إعادة فتح محادثة سابقة",b8t=()=>"Vuelve a abrir un chat anterior",y8t=()=>"पिछली चैट फिर से खोलें",x8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m8t():t==="fa"?g8t():t==="ar"?v8t():t==="es"?b8t():t==="hi"?y8t():p8t()}),w8t=()=>"No chats to resume",k8t=()=>"没有可恢复的聊天",S8t=()=>"گفت‌وگویی برای ادامه وجود ندارد",C8t=()=>"لا توجد محادثات لاستئنافها",E8t=()=>"No hay chats que reanudar",N8t=()=>"फिर से शुरू करने के लिए कोई चैट नहीं है",z8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k8t():t==="fa"?S8t():t==="ar"?C8t():t==="es"?E8t():t==="hi"?N8t():w8t()}),j8t=()=>"From your terminal — adopting copies the transcript, and new turns continue there",A8t=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",T8t=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",R8t=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",M8t=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",O8t=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",Gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A8t():t==="fa"?T8t():t==="ar"?R8t():t==="es"?M8t():t==="hi"?O8t():j8t()}),D8t=()=>"Search chats",L8t=()=>"搜索聊天",I8t=()=>"جست‌وجوی گفت‌وگوها",$8t=()=>"البحث في المحادثات",B8t=()=>"Buscar chats",P8t=()=>"चैट खोजें",Vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L8t():t==="fa"?I8t():t==="ar"?$8t():t==="es"?B8t():t==="hi"?P8t():D8t()}),F8t=()=>"Resume a chat",H8t=()=>"恢复聊天",q8t=()=>"ادامهٔ یک گفت‌وگو",U8t=()=>"استئناف محادثة",G8t=()=>"Reanudar un chat",V8t=()=>"चैट फिर से शुरू करें",Kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H8t():t==="fa"?q8t():t==="ar"?U8t():t==="es"?G8t():t==="hi"?V8t():F8t()}),K8t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,W8t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,Q8t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,X8t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,Y8t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,Z8t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,J8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?W8t(e):t==="fa"?Q8t(e):t==="ar"?X8t(e):t==="es"?Y8t(e):t==="hi"?Z8t(e):K8t(e)}),e9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,t9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,n9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,r9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,s9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,i9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,a9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?t9t(e):t==="fa"?n9t(e):t==="ar"?r9t(e):t==="es"?s9t(e):t==="hi"?i9t(e):e9t(e)}),o9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · next attempt in ${e==null?void 0:e.seconds}s`,c9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,l9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,u9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,_9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,f9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,d9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c9t(e):t==="fa"?l9t(e):t==="ar"?u9t(e):t==="es"?_9t(e):t==="hi"?f9t(e):o9t(e)}),h9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,p9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,m9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,g9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,v9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,b9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,y9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?p9t(e):t==="fa"?m9t(e):t==="ar"?g9t(e):t==="es"?v9t(e):t==="hi"?b9t(e):h9t(e)}),x9t=()=>"CLI is retrying…",w9t=()=>"CLI 正在重试…",k9t=()=>"CLI در حال تلاش دوباره است…",S9t=()=>"تعيد واجهة سطر الأوامر المحاولة…",C9t=()=>"La CLI está reintentando…",E9t=()=>"CLI फिर से कोशिश कर रहा है…",N9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w9t():t==="fa"?k9t():t==="ar"?S9t():t==="es"?C9t():t==="hi"?E9t():x9t()}),z9t=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,j9t=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,A9t=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,T9t=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,R9t=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,M9t=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,O9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j9t(e):t==="fa"?A9t(e):t==="ar"?T9t(e):t==="es"?R9t(e):t==="hi"?M9t(e):z9t(e)}),D9t=()=>"Sending again…",L9t=()=>"正在重新发送…",I9t=()=>"در حال ارسال دوباره…",$9t=()=>"جارٍ إعادة الإرسال…",B9t=()=>"Reenviando…",P9t=()=>"फिर से भेजा जा रहा है…",F9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L9t():t==="fa"?I9t():t==="ar"?$9t():t==="es"?B9t():t==="hi"?P9t():D9t()}),H9t=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,q9t=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,U9t=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,G9t=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,V9t=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,K9t=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,W9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q9t(e):t==="fa"?U9t(e):t==="ar"?G9t(e):t==="es"?V9t(e):t==="hi"?K9t(e):H9t(e)}),Q9t=()=>"Retrying…",X9t=()=>"正在重试…",Y9t=()=>"در حال تلاش دوباره…",Z9t=()=>"جارٍ إعادة المحاولة…",J9t=()=>"Reintentando…",eEt=()=>"फिर से कोशिश हो रही है…",FL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X9t():t==="fa"?Y9t():t==="ar"?Z9t():t==="es"?J9t():t==="hi"?eEt():Q9t()}),tEt=()=>"Default speed",nEt=()=>"默认速度",rEt=()=>"سرعت پیش‌فرض",sEt=()=>"السرعة الافتراضية",iEt=()=>"Velocidad predeterminada",aEt=()=>"डिफ़ॉल्ट गति",oEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nEt():t==="fa"?rEt():t==="ar"?sEt():t==="es"?iEt():t==="hi"?aEt():tEt()}),cEt=()=>"Standard",lEt=()=>"标准",uEt=()=>"استاندارد",_Et=()=>"قياسي",fEt=()=>"Estándar",dEt=()=>"स्टैंडर्ड",hEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lEt():t==="fa"?uEt():t==="ar"?_Et():t==="es"?fEt():t==="hi"?dEt():cEt()}),pEt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,mEt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,gEt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,vEt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,bEt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,yEt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,xEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mEt(e):t==="fa"?gEt(e):t==="ar"?vEt(e):t==="es"?bEt(e):t==="hi"?yEt(e):pEt(e)}),wEt=()=>"Appearance",kEt=()=>"外观",SEt=()=>"ظاهر",CEt=()=>"المظهر",EEt=()=>"Apariencia",NEt=()=>"रूप-रंग",zEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kEt():t==="fa"?SEt():t==="ar"?CEt():t==="es"?EEt():t==="hi"?NEt():wEt()}),jEt=()=>"Check",AEt=()=>"检查",TEt=()=>"بررسی",REt=()=>"فحص",MEt=()=>"Comprobar",OEt=()=>"जाँचें",DEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AEt():t==="fa"?TEt():t==="ar"?REt():t==="es"?MEt():t==="hi"?OEt():jEt()}),LEt=()=>"Check again",IEt=()=>"再次检查",$Et=()=>"بررسی دوباره",BEt=()=>"تحقق مجددًا",PEt=()=>"Volver a comprobar",FEt=()=>"फिर से जाँचें",Wm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IEt():t==="fa"?$Et():t==="ar"?BEt():t==="es"?PEt():t==="hi"?FEt():LEt()}),HEt=()=>"Check for updates",qEt=()=>"检查更新",UEt=()=>"بررسی به‌روزرسانی",GEt=()=>"التحقق من التحديثات",VEt=()=>"Buscar actualizaciones",KEt=()=>"अपडेट के लिए जाँचें",WEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qEt():t==="fa"?UEt():t==="ar"?GEt():t==="es"?VEt():t==="hi"?KEt():HEt()}),QEt=()=>"Check now",XEt=()=>"立即检查",YEt=()=>"اکنون بررسی کن",ZEt=()=>"التحقق الآن",JEt=()=>"Comprobar ahora",eNt=()=>"अभी जाँचें",tNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XEt():t==="fa"?YEt():t==="ar"?ZEt():t==="es"?JEt():t==="hi"?eNt():QEt()}),nNt=()=>"Check setup",rNt=()=>"检查设置",sNt=()=>"بررسی راه‌اندازی",iNt=()=>"فحص الإعداد",aNt=()=>"Comprobar configuración",oNt=()=>"सेटअप जाँचें",cNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rNt():t==="fa"?sNt():t==="ar"?iNt():t==="es"?aNt():t==="hi"?oNt():nNt()}),lNt=()=>"orx checks a few times a day on its own.",uNt=()=>"orx 每天会自动检查几次。",_Nt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",fNt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",dNt=()=>"orx lo comprueba por sí solo varias veces al día.",hNt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",pNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uNt():t==="fa"?_Nt():t==="ar"?fNt():t==="es"?dNt():t==="hi"?hNt():lNt()}),mNt=()=>"Choose a flavor",gNt=()=>"选择配置",vNt=()=>"انتخاب پیکربندی",bNt=()=>"اختر تكوين الموارد",yNt=()=>"Elige una opción",xNt=()=>"एक फ़्लेवर चुनें",wNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gNt():t==="fa"?vNt():t==="ar"?bNt():t==="es"?yNt():t==="hi"?xNt():mNt()}),kNt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,SNt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,CNt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,ENt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,NNt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,zNt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,jNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SNt(e):t==="fa"?CNt(e):t==="ar"?ENt(e):t==="es"?NNt(e):t==="hi"?zNt(e):kNt(e)}),ANt=()=>"clean",TNt=()=>"无更改",RNt=()=>"بدون تغییر",MNt=()=>"نظيف",ONt=()=>"sin cambios",DNt=()=>"साफ़",LNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TNt():t==="fa"?RNt():t==="ar"?MNt():t==="es"?ONt():t==="hi"?DNt():ANt()}),INt=e=>`Already linked at ${e==null?void 0:e.link}.`,$Nt=e=>`已链接到 ${e==null?void 0:e.link}。`,BNt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,PNt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,FNt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,HNt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,qNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Nt(e):t==="fa"?BNt(e):t==="ar"?PNt(e):t==="es"?FNt(e):t==="hi"?HNt(e):INt(e)}),UNt=e=>`Linked ${e==null?void 0:e.link}.`,GNt=e=>`已链接 ${e==null?void 0:e.link}。`,VNt=e=>`${e==null?void 0:e.link} پیوند شد.`,KNt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,WNt=e=>`Enlazado en ${e==null?void 0:e.link}.`,QNt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,XNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GNt(e):t==="fa"?VNt(e):t==="ar"?KNt(e):t==="es"?WNt(e):t==="hi"?QNt(e):UNt(e)}),YNt=()=>"Close terminal",ZNt=()=>"关闭终端",JNt=()=>"بستن ترمینال",ezt=()=>"إغلاق الطرفية",tzt=()=>"Cerrar la terminal",nzt=()=>"टर्मिनल बंद करें",Wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZNt():t==="fa"?JNt():t==="ar"?ezt():t==="es"?tzt():t==="hi"?nzt():YNt()}),rzt=()=>"Terminal closed",szt=()=>"终端已关闭",izt=()=>"ترمینال بسته شد",azt=()=>"أُغلقت الطرفية",ozt=()=>"Terminal cerrada",czt=()=>"टर्मिनल बंद हो गया",lzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?szt():t==="fa"?izt():t==="ar"?azt():t==="es"?ozt():t==="hi"?czt():rzt()}),uzt=()=>"Finished",_zt=()=>"已完成",fzt=()=>"انجام شد",dzt=()=>"اكتمل",hzt=()=>"Finalizado",pzt=()=>"पूर्ण",mzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_zt():t==="fa"?fzt():t==="ar"?dzt():t==="es"?hzt():t==="hi"?pzt():uzt()}),gzt=()=>"Command failed",vzt=()=>"命令失败",bzt=()=>"دستور ناموفق بود",yzt=()=>"فشل الأمر",xzt=()=>"El comando falló",wzt=()=>"कमांड विफल रही",kzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vzt():t==="fa"?bzt():t==="ar"?yzt():t==="es"?xzt():t==="hi"?wzt():gzt()}),Szt=()=>"Running…",Czt=()=>"运行中…",Ezt=()=>"در حال اجرا…",Nzt=()=>"قيد التشغيل…",zzt=()=>"Ejecutando…",jzt=()=>"चल रहा है…",Azt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Czt():t==="fa"?Ezt():t==="ar"?Nzt():t==="es"?zzt():t==="hi"?jzt():Szt()}),Tzt=()=>"Connect",Rzt=()=>"连接",Mzt=()=>"اتصال",Ozt=()=>"اتصال",Dzt=()=>"Conectar",Lzt=()=>"कनेक्ट करें",OS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rzt():t==="fa"?Mzt():t==="ar"?Ozt():t==="es"?Dzt():t==="hi"?Lzt():Tzt()}),Izt=()=>"Connected via GitHub CLI",$zt=()=>"已通过 GitHub CLI 连接",Bzt=()=>"از طریق GitHub CLI متصل است",Pzt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",Fzt=()=>"Conectado mediante GitHub CLI",Hzt=()=>"GitHub CLI के ज़रिए कनेक्टेड",HL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$zt():t==="fa"?Bzt():t==="ar"?Pzt():t==="es"?Fzt():t==="hi"?Hzt():Izt()}),qzt=()=>"Connecting…",Uzt=()=>"正在连接…",Gzt=()=>"در حال اتصال…",Vzt=()=>"جارٍ الاتصال…",Kzt=()=>"Conectando…",Wzt=()=>"कनेक्ट हो रहा है…",qL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uzt():t==="fa"?Gzt():t==="ar"?Vzt():t==="es"?Kzt():t==="hi"?Wzt():qzt()}),Qzt=e=>`CPU cores: ${e==null?void 0:e.count}`,Xzt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,Yzt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,Zzt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,Jzt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,ejt=e=>`CPU कोर: ${e==null?void 0:e.count}`,tjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xzt(e):t==="fa"?Yzt(e):t==="ar"?Zzt(e):t==="es"?Jzt(e):t==="hi"?ejt(e):Qzt(e)}),njt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",rjt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",sjt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",ijt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",ajt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",ojt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",cjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rjt():t==="fa"?sjt():t==="ar"?ijt():t==="es"?ajt():t==="hi"?ojt():njt()}),ljt=()=>"the current project",ujt=()=>"当前项目",_jt=()=>"پروژهٔ فعلی",fjt=()=>"المشروع الحالي",djt=()=>"el proyecto actual",hjt=()=>"मौजूदा प्रोजेक्ट",pjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ujt():t==="fa"?_jt():t==="ar"?fjt():t==="es"?djt():t==="hi"?hjt():ljt()}),mjt=e=>`${e==null?void 0:e.value} (custom)`,gjt=e=>`${e==null?void 0:e.value}(自定义)`,vjt=e=>`${e==null?void 0:e.value} (سفارشی)`,bjt=e=>`${e==null?void 0:e.value} (مخصص)`,yjt=e=>`${e==null?void 0:e.value} (personalizado)`,xjt=e=>`${e==null?void 0:e.value} (कस्टम)`,wjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gjt(e):t==="fa"?vjt(e):t==="ar"?bjt(e):t==="es"?yjt(e):t==="hi"?xjt(e):mjt(e)}),kjt=()=>"detached",Sjt=()=>"分离头指针",Cjt=()=>"جدا از شاخه",Ejt=()=>"منفصل",Njt=()=>"desacoplado",zjt=()=>"डिटैच्ड",DS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sjt():t==="fa"?Cjt():t==="ar"?Ejt():t==="es"?Njt():t==="hi"?zjt():kjt()}),jjt=()=>"Disconnected",Ajt=()=>"已断开连接",Tjt=()=>"قطع اتصال",Rjt=()=>"غير متصل",Mjt=()=>"Desconectado",Ojt=()=>"डिस्कनेक्ट हो गया",UL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ajt():t==="fa"?Tjt():t==="ar"?Rjt():t==="es"?Mjt():t==="hi"?Ojt():jjt()}),Djt=()=>"Environment tab",Ljt=()=>"环境标签页",Ijt=()=>"زبانهٔ محیط",$jt=()=>"تبويب البيئة",Bjt=()=>"pestaña Entorno",Pjt=()=>"एनवायरनमेंट टैब",Fjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ljt():t==="fa"?Ijt():t==="ar"?$jt():t==="es"?Bjt():t==="hi"?Pjt():Djt()}),Hjt=()=>"Free models · No sign-in required",qjt=()=>"免费模型 · 无需登录",Ujt=()=>"مدل‌های رایگان · بدون نیاز به ورود",Gjt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",Vjt=()=>"Modelos gratuitos · No es necesario iniciar sesión",Kjt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",Wjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qjt():t==="fa"?Ujt():t==="ar"?Gjt():t==="es"?Vjt():t==="hi"?Kjt():Hjt()}),Qjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Xjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Yjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Zjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,Jjt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,eAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,tAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xjt(e):t==="fa"?Yjt(e):t==="ar"?Zjt(e):t==="es"?Jjt(e):t==="hi"?eAt(e):Qjt(e)}),nAt=()=>"GitHub rejected the push because this repository is archived and read-only. The local project is still available. Unarchive the repository on GitHub, then enable syncing here.",rAt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",sAt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",iAt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",aAt=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",oAt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",cAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rAt():t==="fa"?sAt():t==="ar"?iAt():t==="es"?aAt():t==="hi"?oAt():nAt()}),lAt=()=>"GitHub contains changes that are not in this local project. Pull the latest GitHub changes and resolve any conflicts in Git, then try enabling syncing again.",uAt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",_At=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",fAt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",dAt=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",hAt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",pAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uAt():t==="fa"?_At():t==="ar"?fAt():t==="es"?dAt():t==="hi"?hAt():lAt()}),mAt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",gAt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",vAt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",bAt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",yAt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",xAt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",wAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gAt():t==="fa"?vAt():t==="ar"?bAt():t==="es"?yAt():t==="hi"?xAt():mAt()}),kAt=e=>`GPU × ${e==null?void 0:e.count}`,SAt=e=>`${e==null?void 0:e.count} 个 GPU`,CAt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,EAt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,NAt=e=>`GPU × ${e==null?void 0:e.count}`,zAt=e=>`GPU × ${e==null?void 0:e.count}`,jAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SAt(e):t==="fa"?CAt(e):t==="ar"?EAt(e):t==="es"?NAt(e):t==="hi"?zAt(e):kAt(e)}),AAt=()=>"has changes",TAt=()=>"有更改",RAt=()=>"دارای تغییر",MAt=()=>"به تغييرات",OAt=()=>"con cambios",DAt=()=>"बदलाव हैं",LAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TAt():t==="fa"?RAt():t==="ar"?MAt():t==="es"?OAt():t==="hi"?DAt():AAt()}),IAt=e=>`This token is valid but does not report whether it can launch Jobs; OAuth tokens from ${e==null?void 0:e.login} never do. Launches may still work. For a definitive check, save a write-scoped token from ${e==null?void 0:e.url}.`,$At=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,BAt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,PAt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,FAt=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,HAt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,qAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$At(e):t==="fa"?BAt(e):t==="ar"?PAt(e):t==="es"?FAt(e):t==="hi"?HAt(e):IAt(e)}),UAt=()=>"This token is valid, but cannot submit Hugging Face Jobs. Create a token with Jobs write permission in Hugging Face token settings, then replace it here.",GAt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",VAt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",KAt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",WAt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",QAt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",XAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GAt():t==="fa"?VAt():t==="ar"?KAt():t==="es"?WAt():t==="hi"?QAt():UAt()}),YAt=()=>"Install",ZAt=()=>"安装",JAt=()=>"نصب",eTt=()=>"تثبيت",tTt=()=>"Instalar",nTt=()=>"इंस्टॉल करें",rTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZAt():t==="fa"?JAt():t==="ar"?eTt():t==="es"?tTt():t==="hi"?nTt():YAt()}),sTt=e=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,iTt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,aTt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,oTt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,cTt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,lTt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,uTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iTt(e):t==="fa"?aTt(e):t==="ar"?oTt(e):t==="es"?cTt(e):t==="hi"?lTt(e):sTt(e)}),_Tt=e=>`Install the ${e==null?void 0:e.command} command`,fTt=e=>`安装 ${e==null?void 0:e.command} 命令`,dTt=e=>`نصب فرمان ${e==null?void 0:e.command}`,hTt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,pTt=e=>`Instalar el comando ${e==null?void 0:e.command}`,mTt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,gTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fTt(e):t==="fa"?dTt(e):t==="ar"?hTt(e):t==="es"?pTt(e):t==="hi"?mTt(e):_Tt(e)}),vTt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",bTt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",yTt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",xTt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",wTt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",kTt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",STt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bTt():t==="fa"?yTt():t==="ar"?xTt():t==="es"?wTt():t==="hi"?kTt():vTt()}),CTt=()=>"Install the new release now instead of waiting for the background update.",ETt=()=>"立即安装新版本,无需等待后台更新。",NTt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",zTt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",jTt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",ATt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",TTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ETt():t==="fa"?NTt():t==="ar"?zTt():t==="es"?jTt():t==="hi"?ATt():CTt()}),RTt=()=>"Discard your unsaved Kubernetes changes?",MTt=()=>"要放弃未保存的 Kubernetes 更改吗?",OTt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",DTt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",LTt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",ITt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",$Tt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MTt():t==="fa"?OTt():t==="ar"?DTt():t==="es"?LTt():t==="hi"?ITt():RTt()}),BTt=()=>"Key from",PTt=()=>"密钥来自",FTt=()=>"کلید از",HTt=()=>"المفتاح من",qTt=()=>"Clave tomada de la",UTt=()=>"की स्रोत",GTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PTt():t==="fa"?FTt():t==="ar"?HTt():t==="es"?qTt():t==="hi"?UTt():BTt()}),VTt=()=>"Use current kubectl context",KTt=()=>"使用当前 kubectl 上下文",WTt=()=>"استفاده از کانتکست فعلی kubectl",QTt=()=>"استخدام سياق kubectl الحالي",XTt=()=>"Usar el contexto actual de kubectl",YTt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",ZTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KTt():t==="fa"?WTt():t==="ar"?QTt():t==="es"?XTt():t==="hi"?YTt():VTt()}),JTt=e=>`Use current context (${e==null?void 0:e.context})`,eRt=e=>`使用当前上下文(${e==null?void 0:e.context})`,tRt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,nRt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,rRt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,sRt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,iRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eRt(e):t==="fa"?tRt(e):t==="ar"?nRt(e):t==="es"?rRt(e):t==="hi"?sRt(e):JTt(e)}),aRt=()=>"Language",oRt=()=>"语言",cRt=()=>"زبان",lRt=()=>"اللغة",uRt=()=>"Idioma",_Rt=()=>"भाषा",fRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oRt():t==="fa"?cRt():t==="ar"?lRt():t==="es"?uRt():t==="hi"?_Rt():aRt()}),dRt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,hRt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,pRt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,mRt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,gRt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,vRt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,bRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hRt(e):t==="fa"?pRt(e):t==="ar"?mRt(e):t==="es"?gRt(e):t==="hi"?vRt(e):dRt(e)}),yRt=()=>"Make default",xRt=()=>"设为默认值",wRt=()=>"پیش‌فرض شود",kRt=()=>"جعله افتراضيًا",SRt=()=>"Establecer como predeterminado",CRt=()=>"डिफ़ॉल्ट बनाएं",ERt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xRt():t==="fa"?wRt():t==="ar"?kRt():t==="es"?SRt():t==="hi"?CRt():yRt()}),NRt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",zRt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",jRt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",ARt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",TRt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",RRt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",MRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zRt():t==="fa"?jRt():t==="ar"?ARt():t==="es"?TRt():t==="hi"?RRt():NRt()}),ORt=()=>"Replace token ID",DRt=()=>"替换令牌 ID",LRt=()=>"جایگزینی شناسهٔ توکن",IRt=()=>"استبدال معرّف الرمز",$Rt=()=>"Reemplazar ID del token",BRt=()=>"टोकन ID बदलें",PRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DRt():t==="fa"?LRt():t==="ar"?IRt():t==="es"?$Rt():t==="hi"?BRt():ORt()}),FRt=()=>"Replace token secret",HRt=()=>"替换令牌密钥",qRt=()=>"جایگزینی رمز توکن",URt=()=>"استبدال سرّ الرمز",GRt=()=>"Reemplazar secreto del token",VRt=()=>"टोकन सीक्रेट बदलें",KRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HRt():t==="fa"?qRt():t==="ar"?URt():t==="es"?GRt():t==="hi"?VRt():FRt()}),WRt=()=>"How to get a Modal token",QRt=()=>"如何获取 Modal 令牌",XRt=()=>"روش دریافت توکن Modal",YRt=()=>"كيفية الحصول على رمز Modal",ZRt=()=>"Cómo obtener un token de Modal",JRt=()=>"Modal टोकन कैसे लें",eMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QRt():t==="fa"?XRt():t==="ar"?YRt():t==="es"?ZRt():t==="hi"?JRt():WRt()}),tMt=()=>"Token ID",nMt=()=>"令牌 ID",rMt=()=>"شناسهٔ توکن",sMt=()=>"معرّف الرمز",iMt=()=>"ID del token",aMt=()=>"टोकन ID",oMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nMt():t==="fa"?rMt():t==="ar"?sMt():t==="es"?iMt():t==="hi"?aMt():tMt()}),cMt=()=>"Token secret",lMt=()=>"令牌密钥",uMt=()=>"رمز توکن",_Mt=()=>"سرّ الرمز",fMt=()=>"Secreto del token",dMt=()=>"टोकन सीक्रेट",hMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lMt():t==="fa"?uMt():t==="ar"?_Mt():t==="es"?fMt():t==="hi"?dMt():cMt()}),pMt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,mMt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,gMt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,vMt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,bMt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,yMt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,xMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mMt(e):t==="fa"?gMt(e):t==="ar"?vMt(e):t==="es"?bMt(e):t==="hi"?yMt(e):pMt(e)}),wMt=e=>`Needs ${e==null?void 0:e.tool}`,kMt=e=>`需要 ${e==null?void 0:e.tool}`,SMt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,CMt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,EMt=e=>`Requiere ${e==null?void 0:e.tool}`,NMt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,zMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kMt(e):t==="fa"?SMt(e):t==="ar"?CMt(e):t==="es"?EMt(e):t==="hi"?NMt(e):wMt(e)}),jMt=()=>"Needs tools",AMt=()=>"缺少工具",TMt=()=>"به ابزارها نیاز دارد",RMt=()=>"يحتاج إلى أدوات",MMt=()=>"Requiere herramientas",OMt=()=>"टूल की ज़रूरत है",DMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AMt():t==="fa"?TMt():t==="ar"?RMt():t==="es"?MMt():t==="hi"?OMt():jMt()}),LMt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,IMt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,$Mt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,BMt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,PMt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,FMt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,HMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IMt(e):t==="fa"?$Mt(e):t==="ar"?BMt(e):t==="es"?PMt(e):t==="hi"?FMt(e):LMt(e)}),qMt=()=>"New runs use SSH; choose a host when launching.",UMt=()=>"新运行将使用 SSH;启动时请选择主机。",GMt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",VMt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",KMt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",WMt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",QMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UMt():t==="fa"?GMt():t==="ar"?VMt():t==="es"?KMt():t==="hi"?WMt():qMt()}),XMt=()=>"New token",YMt=()=>"新令牌",ZMt=()=>"توکن جدید",JMt=()=>"رمز جديد",eOt=()=>"Nuevo token",tOt=()=>"नया टोकन",nOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YMt():t==="fa"?ZMt():t==="ar"?JMt():t==="es"?eOt():t==="hi"?tOt():XMt()}),rOt=()=>"No default flavor",sOt=()=>"不设默认配置",iOt=()=>"بدون پیکربندی پیش‌فرض",aOt=()=>"لا يوجد تكوين افتراضي للموارد",oOt=()=>"Sin opción predeterminada",cOt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",lOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sOt():t==="fa"?iOt():t==="ar"?aOt():t==="es"?oOt():t==="hi"?cOt():rOt()}),uOt=()=>"none",_Ot=()=>"无",fOt=()=>"هیچ‌کدام",dOt=()=>"لا شيء",hOt=()=>"ninguno",pOt=()=>"कोई नहीं",GL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ot():t==="fa"?fOt():t==="ar"?dOt():t==="es"?hOt():t==="hi"?pOt():uOt()}),mOt=()=>"Not connected",gOt=()=>"未连接",vOt=()=>"متصل نیست",bOt=()=>"غير متصل",yOt=()=>"No conectado",xOt=()=>"कनेक्टेड नहीं",VL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gOt():t==="fa"?vOt():t==="ar"?bOt():t==="es"?yOt():t==="hi"?xOt():mOt()}),wOt=()=>"not found on PATH",kOt=()=>"在 PATH 中未找到",SOt=()=>"در PATH پیدا نشد",COt=()=>"غير موجود في PATH",EOt=()=>"no se encontró en el PATH",NOt=()=>"PATH पर नहीं मिला",zOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kOt():t==="fa"?SOt():t==="ar"?COt():t==="es"?EOt():t==="hi"?NOt():wOt()}),jOt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,AOt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,TOt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,ROt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,MOt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,OOt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,DOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AOt(e):t==="fa"?TOt(e):t==="ar"?ROt(e):t==="es"?MOt(e):t==="hi"?OOt(e):jOt(e)}),LOt=()=>"not initialized",IOt=()=>"尚未初始化",$Ot=()=>"راه‌اندازی نشده",BOt=()=>"غير مهيّأ",POt=()=>"sin inicializar",FOt=()=>"शुरू नहीं किया गया",HOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IOt():t==="fa"?$Ot():t==="ar"?BOt():t==="es"?POt():t==="hi"?FOt():LOt()}),qOt=()=>"Not set",UOt=()=>"未设置",GOt=()=>"تنظیم نشده",VOt=()=>"غير مضبوط",KOt=()=>"Sin definir",WOt=()=>"सेट नहीं",W3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UOt():t==="fa"?GOt():t==="ar"?VOt():t==="es"?KOt():t==="hi"?WOt():qOt()}),QOt=()=>"OAuth (subscription login)",XOt=()=>"OAuth(订阅登录)",YOt=()=>"OAuth (ورود با اشتراک)",ZOt=()=>"OAuth (تسجيل دخول الاشتراك)",JOt=()=>"OAuth (inicio de sesión con suscripción)",eDt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",tDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XOt():t==="fa"?YOt():t==="ar"?ZOt():t==="es"?JOt():t==="hi"?eDt():QOt()}),nDt=e=>`The old copy was left at ${e==null?void 0:e.path} on a different disk. You can delete it after confirming everything works.`,rDt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,sDt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,iDt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,aDt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,oDt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,cDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rDt(e):t==="fa"?sDt(e):t==="ar"?iDt(e):t==="es"?aDt(e):t==="hi"?oDt(e):nDt(e)}),lDt=()=>"Setting up…",uDt=()=>"正在设置…",_Dt=()=>"در حال راه‌اندازی…",fDt=()=>"جارٍ الإعداد…",dDt=()=>"Configurando…",hDt=()=>"सेट अप हो रहा है…",pDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uDt():t==="fa"?_Dt():t==="ar"?fDt():t==="es"?dDt():t==="hi"?hDt():lDt()}),mDt=()=>"Account",gDt=()=>"账户",vDt=()=>"حساب",bDt=()=>"الحساب",yDt=()=>"Cuenta",xDt=()=>"खाता",LS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gDt():t==="fa"?vDt():t==="ar"?bDt():t==="es"?yDt():t==="hi"?xDt():mDt()}),wDt=()=>"Add one with",kDt=()=>"使用以下命令添加:",SDt=()=>"یکی با این فرمان اضافه کنید:",CDt=()=>"أضِف واحدًا عبر",EDt=()=>"Añade una con",NDt=()=>"इसके साथ एक जोड़ें",zDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kDt():t==="fa"?SDt():t==="ar"?CDt():t==="es"?EDt():t==="hi"?NDt():wDt()}),jDt=()=>"Add variable",ADt=()=>"添加变量",TDt=()=>"افزودن متغیر",RDt=()=>"إضافة متغيّر",MDt=()=>"Añadir variable",ODt=()=>"वेरिएबल जोड़ें",DDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ADt():t==="fa"?TDt():t==="ar"?RDt():t==="es"?MDt():t==="hi"?ODt():jDt()}),LDt=()=>"Agent models",IDt=()=>"智能体模型",$Dt=()=>"مدل‌های عامل",BDt=()=>"نماذج الوكيل",PDt=()=>"Modelos de los agentes",FDt=()=>"एजेंट मॉडल",HDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IDt():t==="fa"?$Dt():t==="ar"?BDt():t==="es"?PDt():t==="hi"?FDt():LDt()}),qDt=()=>"Anonymous usage analytics",UDt=()=>"匿名使用情况分析",GDt=()=>"تحلیل ناشناس استفاده",VDt=()=>"تحليلات استخدام مجهولة الهوية",KDt=()=>"Estadísticas de uso anónimas",WDt=()=>"अनाम उपयोग एनालिटिक्स",Qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UDt():t==="fa"?GDt():t==="ar"?VDt():t==="es"?KDt():t==="hi"?WDt():qDt()}),QDt=()=>"Auth",XDt=()=>"身份验证",YDt=()=>"احراز هویت",ZDt=()=>"المصادقة",JDt=()=>"Autenticación",eLt=()=>"ऑथ",tLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XDt():t==="fa"?YDt():t==="ar"?ZDt():t==="es"?JDt():t==="hi"?eLt():QDt()}),nLt=()=>"Authentication",rLt=()=>"身份验证",sLt=()=>"احراز هویت",iLt=()=>"المصادقة",aLt=()=>"Autenticación",oLt=()=>"प्रमाणीकरण",KL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rLt():t==="fa"?sLt():t==="ar"?iLt():t==="es"?aLt():t==="hi"?oLt():nLt()}),cLt=()=>"Back to Compute",lLt=()=>"返回算力设置",uLt=()=>"بازگشت به رایانش",_Lt=()=>"العودة إلى الحوسبة",fLt=()=>"Volver a Cómputo",dLt=()=>"कंप्यूट पर वापस जाएं",WL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lLt():t==="fa"?uLt():t==="ar"?_Lt():t==="es"?fLt():t==="hi"?dLt():cLt()}),hLt=()=>"Backend",pLt=()=>"后端",mLt=()=>"بک‌اند",gLt=()=>"بيئة التنفيذ",vLt=()=>"Backend",bLt=()=>"बैकएंड",yLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pLt():t==="fa"?mLt():t==="ar"?gLt():t==="es"?vLt():t==="hi"?bLt():hLt()}),xLt=()=>"Baseline",wLt=()=>"基线",kLt=()=>"خط مبنا",SLt=()=>"الأساس المرجعي",CLt=()=>"Rama base",ELt=()=>"बेसलाइन",NLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wLt():t==="fa"?kLt():t==="ar"?SLt():t==="es"?CLt():t==="hi"?ELt():xLt()}),zLt=()=>"Binary",jLt=()=>"可执行文件",ALt=()=>"فایل اجرایی",TLt=()=>"الملف التنفيذي",RLt=()=>"Binario",MLt=()=>"बाइनरी",OLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jLt():t==="fa"?ALt():t==="ar"?TLt():t==="es"?RLt():t==="hi"?MLt():zLt()}),DLt=()=>"Cancel",LLt=()=>"取消",ILt=()=>"لغو",$Lt=()=>"إلغاء",BLt=()=>"Cancelar",PLt=()=>"रद्द करें",Nf=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LLt():t==="fa"?ILt():t==="ar"?$Lt():t==="es"?BLt():t==="hi"?PLt():DLt()}),FLt=()=>"Cancel new variable",HLt=()=>"取消新变量",qLt=()=>"لغو متغیر جدید",ULt=()=>"إلغاء المتغيّر الجديد",GLt=()=>"Cancelar nueva variable",VLt=()=>"नया वेरिएबल रद्द करें",KLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HLt():t==="fa"?qLt():t==="ar"?ULt():t==="es"?GLt():t==="hi"?VLt():FLt()}),WLt=()=>"Checking compute targets…",QLt=()=>"正在检查算力目标…",XLt=()=>"در حال بررسی مقصدهای رایانشی…",YLt=()=>"جارٍ التحقق من أهداف الحوسبة…",ZLt=()=>"Comprobando destinos de cómputo…",JLt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",eIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QLt():t==="fa"?XLt():t==="ar"?YLt():t==="es"?ZLt():t==="hi"?JLt():WLt()}),tIt=()=>"Checking kubectl…",nIt=()=>"正在检查 kubectl…",rIt=()=>"در حال بررسی kubectl…",sIt=()=>"جارٍ التحقق من kubectl…",iIt=()=>"Comprobando kubectl…",aIt=()=>"kubectl जाँचा जा रहा है…",oIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nIt():t==="fa"?rIt():t==="ar"?sIt():t==="es"?iIt():t==="hi"?aIt():tIt()}),cIt=()=>"Checking Modal…",lIt=()=>"正在检查 Modal…",uIt=()=>"در حال بررسی Modal…",_It=()=>"جارٍ التحقق من Modal…",fIt=()=>"Comprobando Modal…",dIt=()=>"Modal जाँचा जा रहा है…",hIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lIt():t==="fa"?uIt():t==="ar"?_It():t==="es"?fIt():t==="hi"?dIt():cIt()}),pIt=()=>"Choose a preset flavor",mIt=()=>"选择预设规格",gIt=()=>"یک پیکربندی آماده انتخاب کنید",vIt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",bIt=()=>"Elige una opción predefinida",yIt=()=>"एक प्रीसेट फ़्लेवर चुनें",Xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mIt():t==="fa"?gIt():t==="ar"?vIt():t==="es"?bIt():t==="hi"?yIt():pIt()}),xIt=()=>"cluster default",wIt=()=>"集群默认值",kIt=()=>"پیش‌فرض خوشه",SIt=()=>"افتراضي العنقود",CIt=()=>"valor predeterminado del clúster",EIt=()=>"क्लस्टर डिफ़ॉल्ट",Yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wIt():t==="fa"?kIt():t==="ar"?SIt():t==="es"?CIt():t==="hi"?EIt():xIt()}),NIt=()=>"cluster default (e.g. 4h, 30m)",zIt=()=>"集群默认值(例如 4h、30m)",jIt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",AIt=()=>"افتراضي العنقود (مثل 4h أو 30m)",TIt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",RIt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",MIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zIt():t==="fa"?jIt():t==="ar"?AIt():t==="es"?TIt():t==="hi"?RIt():NIt()}),OIt=()=>"Cluster unreachable",DIt=()=>"无法连接集群",LIt=()=>"خوشه در دسترس نیست",IIt=()=>"تعذّر الوصول إلى العنقود",$It=()=>"Clúster inaccesible",BIt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",PIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DIt():t==="fa"?LIt():t==="ar"?IIt():t==="es"?$It():t==="hi"?BIt():OIt()}),FIt=()=>"Compute",HIt=()=>"算力",qIt=()=>"رایانش",UIt=()=>"الحوسبة",GIt=()=>"Cómputo",VIt=()=>"कंप्यूट",QL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HIt():t==="fa"?qIt():t==="ar"?UIt():t==="es"?GIt():t==="hi"?VIt():FIt()}),KIt=()=>"Connect compute backends and choose where new runs execute.",WIt=()=>"连接算力后端,并选择新运行的执行位置。",QIt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",XIt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",YIt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",ZIt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",JIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WIt():t==="fa"?QIt():t==="ar"?XIt():t==="es"?YIt():t==="hi"?ZIt():KIt()}),e$t=()=>"Connected",t$t=()=>"已连接",n$t=()=>"متصل",r$t=()=>"متصل",s$t=()=>"Conectado",i$t=()=>"कनेक्टेड",a$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t$t():t==="fa"?n$t():t==="ar"?r$t():t==="es"?s$t():t==="hi"?i$t():e$t()}),o$t=()=>"Context",c$t=()=>"上下文",l$t=()=>"زمینه",u$t=()=>"السياق",_$t=()=>"Contexto",f$t=()=>"कॉन्टेक्स्ट",d$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c$t():t==="fa"?l$t():t==="ar"?u$t():t==="es"?_$t():t==="hi"?f$t():o$t()}),h$t=()=>"Current",p$t=()=>"当前",m$t=()=>"فعلی",g$t=()=>"الحالي",v$t=()=>"Actual",b$t=()=>"मौजूदा",y$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p$t():t==="fa"?m$t():t==="ar"?g$t():t==="es"?v$t():t==="hi"?b$t():h$t()}),x$t=()=>"Currently off:",w$t=()=>"当前已关闭:",k$t=()=>"اکنون خاموش است:",S$t=()=>"معطّل حاليًا:",C$t=()=>"Desactivado actualmente:",E$t=()=>"फ़िलहाल बंद:",N$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w$t():t==="fa"?k$t():t==="ar"?S$t():t==="es"?C$t():t==="hi"?E$t():x$t()}),z$t=()=>"Custom flavor",j$t=()=>"自定义规格",A$t=()=>"پیکربندی سفارشی",T$t=()=>"تكوين موارد مخصّص",R$t=()=>"Opción personalizada",M$t=()=>"कस्टम फ़्लेवर",O$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j$t():t==="fa"?A$t():t==="ar"?T$t():t==="es"?R$t():t==="hi"?M$t():z$t()}),D$t=()=>"Custom flavor…",L$t=()=>"自定义规格…",I$t=()=>"پیکربندی سفارشی…",$$t=()=>"تكوين موارد مخصّص…",B$t=()=>"Opción personalizada…",P$t=()=>"कस्टम फ़्लेवर…",F$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L$t():t==="fa"?I$t():t==="ar"?$$t():t==="es"?B$t():t==="hi"?P$t():D$t()}),H$t=()=>"Data directory",q$t=()=>"数据目录",U$t=()=>"پوشهٔ داده",G$t=()=>"دليل البيانات",V$t=()=>"Directorio de datos",K$t=()=>"डेटा डायरेक्टरी",W$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q$t():t==="fa"?U$t():t==="ar"?G$t():t==="es"?V$t():t==="hi"?K$t():H$t()}),Q$t=()=>"default",X$t=()=>"默认",Y$t=()=>"پیش‌فرض",Z$t=()=>"افتراضي",J$t=()=>"predeterminado",eBt=()=>"डिफ़ॉल्ट",tBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X$t():t==="fa"?Y$t():t==="ar"?Z$t():t==="es"?J$t():t==="hi"?eBt():Q$t()}),nBt=()=>"Default",rBt=()=>"默认",sBt=()=>"پیش‌فرض",iBt=()=>"الافتراضي",aBt=()=>"Predeterminado",oBt=()=>"डिफ़ॉल्ट",XL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rBt():t==="fa"?sBt():t==="ar"?iBt():t==="es"?aBt():t==="hi"?oBt():nBt()}),cBt=()=>"Default destination",lBt=()=>"默认目标",uBt=()=>"مقصد پیش‌فرض",_Bt=()=>"الوجهة الافتراضية",fBt=()=>"Destino predeterminado",dBt=()=>"डिफ़ॉल्ट गंतव्य",hBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lBt():t==="fa"?uBt():t==="ar"?_Bt():t==="es"?fBt():t==="hi"?dBt():cBt()}),pBt=()=>"Detecting hardware…",mBt=()=>"正在检测硬件…",gBt=()=>"در حال شناسایی سخت‌افزار…",vBt=()=>"جارٍ اكتشاف العتاد…",bBt=()=>"Detectando hardware…",yBt=()=>"हार्डवेयर पहचाना जा रहा है…",xBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mBt():t==="fa"?gBt():t==="ar"?vBt():t==="es"?bBt():t==="hi"?yBt():pBt()}),wBt=()=>"Detecting harnesses…",kBt=()=>"正在检测智能体工具…",SBt=()=>"در حال شناسایی ابزارهای عامل…",CBt=()=>"جارٍ اكتشاف أدوات البرمجة…",EBt=()=>"Detectando agentes…",NBt=()=>"हार्नेस पहचाने जा रहे हैं…",zBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kBt():t==="fa"?SBt():t==="ar"?CBt():t==="es"?EBt():t==="hi"?NBt():wBt()}),jBt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",ABt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",TBt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",RBt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",MBt=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",OBt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",DBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ABt():t==="fa"?TBt():t==="ar"?RBt():t==="es"?MBt():t==="hi"?OBt():jBt()}),LBt=()=>"Effective URL",IBt=()=>"实际使用的网址",$Bt=()=>"نشانی مؤثر",BBt=()=>"الرابط الفعّال",PBt=()=>"URL efectiva",FBt=()=>"प्रभावी URL",HBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IBt():t==="fa"?$Bt():t==="ar"?BBt():t==="es"?PBt():t==="hi"?FBt():LBt()}),qBt=()=>"Enable GitHub syncing for new projects",UBt=()=>"为新项目启用 GitHub 同步",GBt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",VBt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",KBt=()=>"Activar la sincronización con GitHub en proyectos nuevos",WBt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",Zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBt():t==="fa"?GBt():t==="ar"?VBt():t==="es"?KBt():t==="hi"?WBt():qBt()}),QBt=()=>"Environment",XBt=()=>"环境",YBt=()=>"محیط",ZBt=()=>"البيئة",JBt=()=>"Entorno",ePt=()=>"एनवायरनमेंट",YL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XBt():t==="fa"?YBt():t==="ar"?ZBt():t==="es"?JBt():t==="hi"?ePt():QBt()}),tPt=()=>"Failed",nPt=()=>"失败",rPt=()=>"ناموفق",sPt=()=>"فشل",iPt=()=>"Error",aPt=()=>"विफल",IS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nPt():t==="fa"?rPt():t==="ar"?sPt():t==="es"?iPt():t==="hi"?aPt():tPt()}),oPt=()=>"General",cPt=()=>"常规",lPt=()=>"عمومی",uPt=()=>"عام",_Pt=()=>"General",fPt=()=>"सामान्य",dPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cPt():t==="fa"?lPt():t==="ar"?uPt():t==="es"?_Pt():t==="hi"?fPt():oPt()}),hPt=()=>"GitHub publishing",pPt=()=>"GitHub 发布",mPt=()=>"انتشار در GitHub",gPt=()=>"النشر على GitHub",vPt=()=>"Publicación en GitHub",bPt=()=>"GitHub प्रकाशन",yPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pPt():t==="fa"?mPt():t==="ar"?gPt():t==="es"?vPt():t==="hi"?bPt():hPt()}),xPt=()=>"Git token",wPt=()=>"Git 令牌",kPt=()=>"توکن Git",SPt=()=>"رمز Git",CPt=()=>"Token de Git",EPt=()=>"Git टोकन",NPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wPt():t==="fa"?kPt():t==="ar"?SPt():t==="es"?CPt():t==="hi"?EPt():xPt()}),zPt=()=>"Harnesses",jPt=()=>"智能体工具",APt=()=>"ابزارهای عامل",TPt=()=>"أدوات البرمجة",RPt=()=>"Agentes",MPt=()=>"हार्नेस",Q3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jPt():t==="fa"?APt():t==="ar"?TPt():t==="es"?RPt():t==="hi"?MPt():zPt()}),OPt=()=>"hf_…",DPt=()=>"hf_…",LPt=()=>"hf_…",IPt=()=>"hf_…",$Pt=()=>"hf_…",BPt=()=>"hf_…",PPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPt():t==="fa"?LPt():t==="ar"?IPt():t==="es"?$Pt():t==="hi"?BPt():OPt()}),FPt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",HPt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",qPt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",UPt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",GPt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",VPt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",KPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HPt():t==="fa"?qPt():t==="ar"?UPt():t==="es"?GPt():t==="hi"?VPt():FPt()}),WPt=()=>"Initialize Git",QPt=()=>"初始化 Git",XPt=()=>"راه‌اندازی Git",YPt=()=>"تهيئة Git",ZPt=()=>"Inicializar Git",JPt=()=>"Git शुरू करें",eFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QPt():t==="fa"?XPt():t==="ar"?YPt():t==="es"?ZPt():t==="hi"?JPt():WPt()}),tFt=()=>"Install",nFt=()=>"安装",rFt=()=>"نصب",sFt=()=>"تثبيت",iFt=()=>"Instalar",aFt=()=>"इंस्टॉल करें",ZL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nFt():t==="fa"?rFt():t==="ar"?sFt():t==="es"?iFt():t==="hi"?aFt():tFt()}),oFt=()=>"Install broken",cFt=()=>"安装损坏",lFt=()=>"نصب خراب است",uFt=()=>"التثبيت معطوب",_Ft=()=>"Instalación dañada",fFt=()=>"इंस्टॉल खराब है",dFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cFt():t==="fa"?lFt():t==="ar"?uFt():t==="es"?_Ft():t==="hi"?fFt():oFt()}),hFt=()=>"Install GitHub CLI",pFt=()=>"安装 GitHub CLI",mFt=()=>"نصب GitHub CLI",gFt=()=>"تثبيت واجهة GitHub لسطر الأوامر",vFt=()=>"Instalar GitHub CLI",bFt=()=>"GitHub CLI इंस्टॉल करें",yFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pFt():t==="fa"?mFt():t==="ar"?gFt():t==="es"?vFt():t==="hi"?bFt():hFt()}),xFt=()=>"Install updates automatically",wFt=()=>"自动安装更新",kFt=()=>"نصب خودکار به‌روزرسانی‌ها",SFt=()=>"تثبيت التحديثات تلقائيًا",CFt=()=>"Instalar actualizaciones automáticamente",EFt=()=>"अपडेट अपने आप इंस्टॉल करें",Jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wFt():t==="fa"?kFt():t==="ar"?SFt():t==="es"?CFt():t==="hi"?EFt():xFt()}),NFt=()=>"Instance history",zFt=()=>"实例历史",jFt=()=>"تاریخچهٔ نمونه‌ها",AFt=()=>"سجل المثيلات",TFt=()=>"Historial de instancias",RFt=()=>"इंस्टेंस इतिहास",MFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFt():t==="fa"?jFt():t==="ar"?AFt():t==="es"?TFt():t==="hi"?RFt():NFt()}),OFt=()=>"Invalid Token",DFt=()=>"令牌无效",LFt=()=>"توکن نامعتبر",IFt=()=>"رمز غير صالح",$Ft=()=>"Token no válido",BFt=()=>"अमान्य टोकन",PFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DFt():t==="fa"?LFt():t==="ar"?IFt():t==="es"?$Ft():t==="hi"?BFt():OFt()}),FFt=()=>"Jobs / Dashboard URL",HFt=()=>"Jobs / 控制台网址",qFt=()=>"نشانی Jobs / داشبورد",UFt=()=>"رابط المهام / لوحة التحكم",GFt=()=>"URL de jobs / dashboard",VFt=()=>"Jobs / डैशबोर्ड URL",KFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFt():t==="fa"?qFt():t==="ar"?UFt():t==="es"?GFt():t==="hi"?VFt():FFt()}),WFt=()=>"kubectl not found",QFt=()=>"未找到 kubectl",XFt=()=>"kubectl پیدا نشد",YFt=()=>"لم يُعثر على kubectl",ZFt=()=>"No se encontró kubectl",JFt=()=>"kubectl नहीं मिला",eHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QFt():t==="fa"?XFt():t==="ar"?YFt():t==="es"?ZFt():t==="hi"?JFt():WFt()}),tHt=()=>"Latest",nHt=()=>"最新版本",rHt=()=>"جدیدترین",sHt=()=>"الأحدث",iHt=()=>"Última",aHt=()=>"नवीनतम",oHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nHt():t==="fa"?rHt():t==="ar"?sHt():t==="es"?iHt():t==="hi"?aHt():tHt()}),cHt=()=>"Loading…",lHt=()=>"正在加载…",uHt=()=>"در حال بارگیری…",_Ht=()=>"جارٍ التحميل…",fHt=()=>"Cargando…",dHt=()=>"लोड हो रहा है…",__=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lHt():t==="fa"?uHt():t==="ar"?_Ht():t==="es"?fHt():t==="hi"?dHt():cHt()}),hHt=()=>"Loading Ray settings…",pHt=()=>"正在加载 Ray 设置…",mHt=()=>"در حال بارگیری تنظیمات Ray…",gHt=()=>"جارٍ تحميل إعدادات Ray…",vHt=()=>"Cargando configuración de Ray…",bHt=()=>"Ray सेटिंग्स लोड हो रही हैं…",yHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pHt():t==="fa"?mHt():t==="ar"?gHt():t==="es"?vHt():t==="hi"?bHt():hHt()}),xHt=()=>"Loading slurm settings…",wHt=()=>"正在加载 Slurm 设置…",kHt=()=>"در حال بارگیری تنظیمات Slurm…",SHt=()=>"جارٍ تحميل إعدادات slurm…",CHt=()=>"Cargando configuración de Slurm…",EHt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",NHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wHt():t==="fa"?kHt():t==="ar"?SHt():t==="es"?CHt():t==="hi"?EHt():xHt()}),zHt=()=>"Loading status…",jHt=()=>"正在加载状态…",AHt=()=>"در حال بارگیری وضعیت…",THt=()=>"جارٍ تحميل الحالة…",RHt=()=>"Cargando estado…",MHt=()=>"स्थिति लोड हो रही है…",OHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jHt():t==="fa"?AHt():t==="ar"?THt():t==="es"?RHt():t==="hi"?MHt():zHt()}),DHt=()=>"Local only",LHt=()=>"仅本地",IHt=()=>"فقط محلی",$Ht=()=>"محلي فقط",BHt=()=>"Solo local",PHt=()=>"केवल लोकल",FHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LHt():t==="fa"?IHt():t==="ar"?$Ht():t==="es"?BHt():t==="hi"?PHt():DHt()}),HHt=()=>"Local repository",qHt=()=>"本地仓库",UHt=()=>"مخزن محلی",GHt=()=>"مستودع محلي",VHt=()=>"Repositorio local",KHt=()=>"लोकल रिपॉज़िटरी",WHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qHt():t==="fa"?UHt():t==="ar"?GHt():t==="es"?VHt():t==="hi"?KHt():HHt()}),QHt=()=>"Login node",XHt=()=>"登录节点",YHt=()=>"گرهٔ ورود",ZHt=()=>"عقدة الدخول",JHt=()=>"Nodo de acceso",eqt=()=>"लॉगिन नोड",tqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XHt():t==="fa"?YHt():t==="ar"?ZHt():t==="es"?JHt():t==="hi"?eqt():QHt()}),nqt=()=>"Make GitHub syncing the default?",rqt=()=>"将 GitHub 同步设为默认值?",sqt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",iqt=()=>"جعل مزامنة GitHub افتراضية؟",aqt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",oqt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",cqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rqt():t==="fa"?sqt():t==="ar"?iqt():t==="es"?aqt():t==="hi"?oqt():nqt()}),lqt=()=>"Missing bash/tar",uqt=()=>"缺少 bash/tar",_qt=()=>"bash/tar موجود نیست",fqt=()=>"‏bash/tar مفقودان",dqt=()=>"Falta bash/tar",hqt=()=>"bash/tar गुम है",pqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uqt():t==="fa"?_qt():t==="ar"?fqt():t==="es"?dqt():t==="hi"?hqt():lqt()}),mqt=()=>"More compute options",gqt=()=>"更多算力选项",vqt=()=>"گزینه‌های رایانشی بیشتر",bqt=()=>"خيارات حوسبة إضافية",yqt=()=>"Más opciones de cómputo",xqt=()=>"और कंप्यूट विकल्प",wqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gqt():t==="fa"?vqt():t==="ar"?bqt():t==="es"?yqt():t==="hi"?xqt():mqt()}),kqt=()=>"Move failed:",Sqt=()=>"移动失败:",Cqt=()=>"انتقال ناموفق بود:",Eqt=()=>"فشل النقل:",Nqt=()=>"Error al mover:",zqt=()=>"स्थानांतरण विफल:",jqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sqt():t==="fa"?Cqt():t==="ar"?Eqt():t==="es"?Nqt():t==="hi"?zqt():kqt()}),Aqt=()=>"Moved. orx is now using the new location.",Tqt=()=>"已移动。orx 现在使用新位置。",Rqt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",Mqt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",Oqt=()=>"Movido. orx ya usa la nueva ubicación.",Dqt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",Lqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tqt():t==="fa"?Rqt():t==="ar"?Mqt():t==="es"?Oqt():t==="hi"?Dqt():Aqt()}),Iqt=()=>"Namespace",$qt=()=>"命名空间",Bqt=()=>"فضای نام",Pqt=()=>"مساحة الأسماء",Fqt=()=>"Namespace",Hqt=()=>"नेमस्पेस",qqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$qt():t==="fa"?Bqt():t==="ar"?Pqt():t==="es"?Fqt():t==="hi"?Hqt():Iqt()}),Uqt=()=>"New location",Gqt=()=>"新位置",Vqt=()=>"محل جدید",Kqt=()=>"الموقع الجديد",Wqt=()=>"Nueva ubicación",Qqt=()=>"नया स्थान",Xqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gqt():t==="fa"?Vqt():t==="ar"?Kqt():t==="es"?Wqt():t==="hi"?Qqt():Uqt()}),Yqt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",Zqt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",Jqt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",eUt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",tUt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",nUt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",rUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zqt():t==="fa"?Jqt():t==="ar"?eUt():t==="es"?tUt():t==="hi"?nUt():Yqt()}),sUt=()=>"New variable key",iUt=()=>"新变量键名",aUt=()=>"کلید متغیر جدید",oUt=()=>"مفتاح المتغيّر الجديد",cUt=()=>"Nombre de la nueva variable",lUt=()=>"नई वेरिएबल की",uUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iUt():t==="fa"?aUt():t==="ar"?oUt():t==="es"?cUt():t==="hi"?lUt():sUt()}),_Ut=()=>"New variable value",fUt=()=>"新变量值",dUt=()=>"مقدار متغیر جدید",hUt=()=>"قيمة المتغيّر الجديد",pUt=()=>"Valor de la nueva variable",mUt=()=>"नई वेरिएबल वैल्यू",gUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fUt():t==="fa"?dUt():t==="ar"?hUt():t==="es"?pUt():t==="hi"?mUt():_Ut()}),vUt=()=>"No code, prompts, file contents, or account identifiers are sent.",bUt=()=>"不会发送代码、提示词、文件内容或账户标识符。",yUt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",xUt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",wUt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",kUt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",SUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bUt():t==="fa"?yUt():t==="ar"?xUt():t==="es"?wUt():t==="hi"?kUt():vUt()}),CUt=()=>"No hosts found in ~/.ssh/config.",EUt=()=>"在 ~/.ssh/config 中未找到主机。",NUt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",zUt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",jUt=()=>"No se encontraron hosts en ~/.ssh/config.",AUt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",TUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EUt():t==="fa"?NUt():t==="ar"?zUt():t==="es"?jUt():t==="hi"?AUt():CUt()}),RUt=()=>"No job-create permission",MUt=()=>"没有创建 Job 的权限",OUt=()=>"مجوز ساخت Job وجود ندارد",DUt=()=>"لا صلاحية لإنشاء المهام",LUt=()=>"Sin permiso para crear jobs",IUt=()=>"जॉब बनाने की अनुमति नहीं",$Ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUt():t==="fa"?OUt():t==="ar"?DUt():t==="es"?LUt():t==="hi"?IUt():RUt()}),BUt=()=>"No Write Permissions",PUt=()=>"无写入权限",FUt=()=>"بدون مجوز نوشتن",HUt=()=>"لا صلاحيات كتابة",qUt=()=>"Sin permisos de escritura",UUt=()=>"लिखने की अनुमति नहीं",GUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PUt():t==="fa"?FUt():t==="ar"?HUt():t==="es"?qUt():t==="hi"?UUt():BUt()}),VUt=()=>"No key on this computer to register — load a registered key with",KUt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",WUt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",QUt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",XUt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",YUt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",ZUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KUt():t==="fa"?WUt():t==="ar"?QUt():t==="es"?XUt():t==="hi"?YUt():VUt()}),JUt=()=>"No key on this computer yet — create one with",eGt=()=>"此计算机上还没有密钥——使用以下命令创建:",tGt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",nGt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",rGt=()=>"Aún no hay ninguna clave en este equipo — crea una con",sGt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",iGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eGt():t==="fa"?tGt():t==="ar"?nGt():t==="es"?rGt():t==="hi"?sGt():JUt()}),aGt=()=>"No Slurm CLI",oGt=()=>"无 Slurm CLI",cGt=()=>"بدون CLI اسلورم",lGt=()=>"لا توجد واجهة Slurm لسطر الأوامر",uGt=()=>"Sin CLI de Slurm",_Gt=()=>"कोई Slurm CLI नहीं",fGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oGt():t==="fa"?cGt():t==="ar"?lGt():t==="es"?uGt():t==="hi"?_Gt():aGt()}),dGt=()=>"None registered",hGt=()=>"未注册任何密钥",pGt=()=>"هیچ‌کدام ثبت نشده",mGt=()=>"لا شيء مسجّل",gGt=()=>"Ninguna registrada",vGt=()=>"कोई रजिस्टर्ड नहीं",bGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hGt():t==="fa"?pGt():t==="ar"?mGt():t==="es"?gGt():t==="hi"?vGt():dGt()}),yGt=()=>"Not checked",xGt=()=>"未检查",wGt=()=>"بررسی نشده",kGt=()=>"لم يُفحص",SGt=()=>"Sin comprobar",CGt=()=>"जाँचा नहीं गया",JL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xGt():t==="fa"?wGt():t==="ar"?kGt():t==="es"?SGt():t==="hi"?CGt():yGt()}),EGt=()=>"Not configured",NGt=()=>"未配置",zGt=()=>"پیکربندی نشده",jGt=()=>"غير مُعَد",AGt=()=>"Sin configurar",TGt=()=>"कॉन्फ़िगर नहीं किया गया",iy=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NGt():t==="fa"?zGt():t==="ar"?jGt():t==="es"?AGt():t==="hi"?TGt():EGt()}),RGt=()=>"Not installed",MGt=()=>"未安装",OGt=()=>"نصب نیست",DGt=()=>"غير مثبّت",LGt=()=>"No instalado",IGt=()=>"इंस्टॉल नहीं है",$Gt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MGt():t==="fa"?OGt():t==="ar"?DGt():t==="es"?LGt():t==="hi"?IGt():RGt()}),BGt=()=>"Not now",PGt=()=>"暂不",FGt=()=>"اکنون نه",HGt=()=>"ليس الآن",qGt=()=>"Ahora no",UGt=()=>"अभी नहीं",GGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PGt():t==="fa"?FGt():t==="ar"?HGt():t==="es"?qGt():t==="hi"?UGt():BGt()}),VGt=()=>"Not on this computer",KGt=()=>"不在此计算机上",WGt=()=>"روی این رایانه نیست",QGt=()=>"ليس على هذا الحاسوب",XGt=()=>"No en este equipo",YGt=()=>"इस कंप्यूटर पर नहीं",ZGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KGt():t==="fa"?WGt():t==="ar"?QGt():t==="es"?XGt():t==="hi"?YGt():VGt()}),JGt=()=>"Not set (pass --host per launch)",eVt=()=>"未设置(每次启动时传入 --host)",tVt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",nVt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",rVt=()=>"Sin definir (pasa --host en cada lanzamiento)",sVt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",eI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eVt():t==="fa"?tVt():t==="ar"?nVt():t==="es"?rVt():t==="hi"?sVt():JGt()}),iVt=()=>"Not signed in",aVt=()=>"未登录",oVt=()=>"وارد نشده",cVt=()=>"لم يتم تسجيل الدخول",lVt=()=>"Sin iniciar sesión",uVt=()=>"साइन इन नहीं है",tI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aVt():t==="fa"?oVt():t==="ar"?cVt():t==="es"?lVt():t==="hi"?uVt():iVt()}),_Vt=()=>"On this computer",fVt=()=>"在此计算机上",dVt=()=>"روی این رایانه",hVt=()=>"على هذا الحاسوب",pVt=()=>"En este equipo",mVt=()=>"इस कंप्यूटर पर",gVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fVt():t==="fa"?dVt():t==="ar"?hVt():t==="es"?pVt():t==="hi"?mVt():_Vt()}),vVt=()=>"Open a project to inspect its repository and GitHub publication state.",bVt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",yVt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",xVt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",wVt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",kVt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",SVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bVt():t==="fa"?yVt():t==="ar"?xVt():t==="es"?wVt():t==="hi"?kVt():vVt()}),CVt=()=>"Open job page",EVt=()=>"打开作业页面",NVt=()=>"باز کردن صفحهٔ کار",zVt=()=>"فتح صفحة المهمة",jVt=()=>"Abrir página del job",AVt=()=>"जॉब पेज खोलें",ej=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EVt():t==="fa"?NVt():t==="ar"?zVt():t==="es"?jVt():t==="hi"?AVt():CVt()}),TVt=()=>"Open on GitHub",RVt=()=>"在 GitHub 上打开",MVt=()=>"باز کردن در GitHub",OVt=()=>"فتح على GitHub",DVt=()=>"Abrir en GitHub",LVt=()=>"GitHub पर खोलें",tj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RVt():t==="fa"?MVt():t==="ar"?OVt():t==="es"?DVt():t==="hi"?LVt():TVt()}),IVt=()=>", or create one with",$Vt=()=>",或使用以下命令创建:",BVt=()=>"، یا با این فرمان یکی بسازید:",PVt=()=>"، أو أنشئ واحدًا عبر",FVt=()=>", o crea una con",HVt=()=>", या इसके साथ एक बनाएं",qVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Vt():t==="fa"?BVt():t==="ar"?PVt():t==="es"?FVt():t==="hi"?HVt():IVt()}),UVt=()=>"Org",GVt=()=>"组织",VVt=()=>"سازمان",KVt=()=>"المؤسسة",WVt=()=>"Org.",QVt=()=>"संगठन",XVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GVt():t==="fa"?VVt():t==="ar"?KVt():t==="es"?WVt():t==="hi"?QVt():UVt()}),YVt=()=>"Orgs",ZVt=()=>"组织",JVt=()=>"سازمان‌ها",eKt=()=>"المؤسسات",tKt=()=>"Orgs.",nKt=()=>"संगठन",rKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZVt():t==="fa"?JVt():t==="ar"?eKt():t==="es"?tKt():t==="hi"?nKt():YVt()}),sKt=()=>"orx can't update this install",iKt=()=>"orx 无法更新此安装",aKt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",oKt=()=>"لا يستطيع orx تحديث هذا التثبيت",cKt=()=>"orx no puede actualizar esta instalación",lKt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",uKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iKt():t==="fa"?aKt():t==="ar"?oKt():t==="es"?cKt():t==="hi"?lKt():sKt()}),_Kt=()=>"Overleaf",fKt=()=>"Overleaf",dKt=()=>"Overleaf",hKt=()=>"Overleaf",pKt=()=>"Overleaf",mKt=()=>"Overleaf",nI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fKt():t==="fa"?dKt():t==="ar"?hKt():t==="es"?pKt():t==="hi"?mKt():_Kt()}),gKt=()=>"Overleaf Git authentication token",vKt=()=>"Overleaf Git 身份验证令牌",bKt=()=>"توکن احراز هویت Git در Overleaf",yKt=()=>"رمز مصادقة Git لـ Overleaf",xKt=()=>"Token de autenticación de Git de Overleaf",wKt=()=>"Overleaf Git प्रमाणीकरण टोकन",kKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vKt():t==="fa"?bKt():t==="ar"?yKt():t==="es"?xKt():t==="hi"?wKt():gKt()}),SKt=()=>"Overridden by env",CKt=()=>"已被环境变量覆盖",EKt=()=>"بازنویسی‌شده توسط محیط",NKt=()=>"متجاوَز عبر متغيّر البيئة",zKt=()=>"Sobrescrito por el entorno",jKt=()=>"env द्वारा ओवरराइड किया गया",AKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CKt():t==="fa"?EKt():t==="ar"?NKt():t==="es"?zKt():t==="hi"?jKt():SKt()}),TKt=()=>"Partition",RKt=()=>"分区",MKt=()=>"پارتیشن",OKt=()=>"القسم",DKt=()=>"Partición",LKt=()=>"पार्टीशन",IKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RKt():t==="fa"?MKt():t==="ar"?OKt():t==="es"?DKt():t==="hi"?LKt():TKt()}),$Kt=()=>"Path",BKt=()=>"路径",PKt=()=>"مسیر",FKt=()=>"المسار",HKt=()=>"Ruta",qKt=()=>"पथ",UKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BKt():t==="fa"?PKt():t==="ar"?FKt():t==="es"?HKt():t==="hi"?qKt():$Kt()}),GKt=()=>"Plan",VKt=()=>"方案",KKt=()=>"سطح اشتراک",WKt=()=>"الخطة",QKt=()=>"Plan",XKt=()=>"प्लान",YKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VKt():t==="fa"?KKt():t==="ar"?WKt():t==="es"?QKt():t==="hi"?XKt():GKt()}),ZKt=()=>"Project",JKt=()=>"项目",eWt=()=>"پروژه",tWt=()=>"المشروع",nWt=()=>"Proyecto",rWt=()=>"प्रोजेक्ट",sWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JKt():t==="fa"?eWt():t==="ar"?tWt():t==="es"?nWt():t==="hi"?rWt():ZKt()}),iWt=()=>"Ray version",aWt=()=>"Ray 版本",oWt=()=>"نسخهٔ Ray",cWt=()=>"إصدار Ray",lWt=()=>"Versión de Ray",uWt=()=>"Ray वर्शन",_Wt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aWt():t==="fa"?oWt():t==="ar"?cWt():t==="es"?lWt():t==="hi"?uWt():iWt()}),fWt=()=>"Reachable",dWt=()=>"可访问",hWt=()=>"در دسترس",pWt=()=>"يمكن الوصول إليه",mWt=()=>"Accesible",gWt=()=>"पहुँच योग्य",vWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dWt():t==="fa"?hWt():t==="ar"?pWt():t==="es"?mWt():t==="hi"?gWt():fWt()}),bWt=()=>"Reading ~/.ssh/config…",yWt=()=>"正在读取 ~/.ssh/config…",xWt=()=>"در حال خواندن ‎~/.ssh/config…",wWt=()=>"جارٍ قراءة ‎~/.ssh/config…",kWt=()=>"Leyendo ~/.ssh/config…",SWt=()=>"~/.ssh/config पढ़ा जा रहा है…",rI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yWt():t==="fa"?xWt():t==="ar"?wWt():t==="es"?kWt():t==="hi"?SWt():bWt()}),CWt=()=>"Ready",EWt=()=>"就绪",NWt=()=>"آماده",zWt=()=>"جاهز",jWt=()=>"Listo",AWt=()=>"तैयार",Qm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EWt():t==="fa"?NWt():t==="ar"?zWt():t==="es"?jWt():t==="hi"?AWt():CWt()}),TWt=()=>"Ready to move",RWt=()=>"可以移动",MWt=()=>"آمادهٔ انتقال",OWt=()=>"جاهز للنقل",DWt=()=>"Listo para mover",LWt=()=>"स्थानांतरण के लिए तैयार",IWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RWt():t==="fa"?MWt():t==="ar"?OWt():t==="es"?DWt():t==="hi"?LWt():TWt()}),$Wt=()=>"Configured",BWt=()=>"已配置",PWt=()=>"پیکربندی‌شده",FWt=()=>"مُعَد",HWt=()=>"Configurado",qWt=()=>"कॉन्फ़िगर किया गया",Xm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BWt():t==="fa"?PWt():t==="ar"?FWt():t==="es"?HWt():t==="hi"?qWt():$Wt()}),UWt=()=>"Refresh",GWt=()=>"刷新",VWt=()=>"تازه‌سازی",KWt=()=>"تحديث",WWt=()=>"Actualizar",QWt=()=>"रीफ़्रेश करें",Ym=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GWt():t==="fa"?VWt():t==="ar"?KWt():t==="es"?WWt():t==="hi"?QWt():UWt()}),XWt=()=>"Remotes",YWt=()=>"远程仓库",ZWt=()=>"مخزن‌های دوردست",JWt=()=>"المستودعات البعيدة",eQt=()=>"Remotos",tQt=()=>"रिमोट",nQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YWt():t==="fa"?ZWt():t==="ar"?JWt():t==="es"?eQt():t==="hi"?tQt():XWt()}),rQt=()=>"Repository",sQt=()=>"仓库",iQt=()=>"مخزن",aQt=()=>"المستودع",oQt=()=>"Repositorio",cQt=()=>"रिपॉज़िटरी",lQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sQt():t==="fa"?iQt():t==="ar"?aQt():t==="es"?oQt():t==="hi"?cQt():rQt()}),uQt=()=>"Restart to finish updating",_Qt=()=>"重新启动以完成更新",fQt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",dQt=()=>"أعد التشغيل لإكمال التحديث",hQt=()=>"Reinicia para terminar la actualización",pQt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",mQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Qt():t==="fa"?fQt():t==="ar"?dQt():t==="es"?hQt():t==="hi"?pQt():uQt()}),gQt=()=>"Running instances",vQt=()=>"正在运行的实例",bQt=()=>"نمونه‌های در حال اجرا",yQt=()=>"المثيلات قيد التشغيل",xQt=()=>"Instancias en ejecución",wQt=()=>"चल रहे इंस्टेंस",kQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vQt():t==="fa"?bQt():t==="ar"?yQt():t==="es"?xQt():t==="hi"?wQt():gQt()}),SQt=()=>"Runtime",CQt=()=>"运行时间",EQt=()=>"زمان اجرا",NQt=()=>"مدة التشغيل",zQt=()=>"Runtime",jQt=()=>"रनटाइम",AQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CQt():t==="fa"?EQt():t==="ar"?NQt():t==="es"?zQt():t==="hi"?jQt():SQt()}),TQt=()=>". Save it under that key if it's meant for HF Jobs.",RQt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",MQt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",OQt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",DQt=()=>". Guárdalo con ese nombre si es para HF Jobs.",LQt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",IQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RQt():t==="fa"?MQt():t==="ar"?OQt():t==="es"?DQt():t==="hi"?LQt():TQt()}),$Qt=()=>"Session cookie",BQt=()=>"会话 cookie",PQt=()=>"کوکی نشست",FQt=()=>"ملف تعريف ارتباط الجلسة",HQt=()=>"Cookie de sesión",qQt=()=>"सेशन कुकी",UQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BQt():t==="fa"?PQt():t==="ar"?FQt():t==="es"?HQt():t==="hi"?qQt():$Qt()}),GQt=()=>"With a session cookie saved, a linked paper follows Overleaf as people type and sends saves straight back. Figures still move on the slower Git sync. Copy the overleaf_session2 cookie from a browser signed in to Overleaf; it stops working when that sign-in does.",VQt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",KQt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",WQt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",QQt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",XQt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",YQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VQt():t==="fa"?KQt():t==="ar"?WQt():t==="es"?QQt():t==="hi"?XQt():GQt()}),ZQt=()=>"Settings",JQt=()=>"设置",eXt=()=>"تنظیمات",tXt=()=>"الإعدادات",nXt=()=>"Configuración",rXt=()=>"सेटिंग्स",$S=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JQt():t==="fa"?eXt():t==="ar"?tXt():t==="es"?nXt():t==="hi"?rXt():ZQt()}),sXt=()=>"Signed in",iXt=()=>"已登录",aXt=()=>"وارد شده",oXt=()=>"تم تسجيل الدخول",cXt=()=>"Sesión iniciada",lXt=()=>"साइन इन है",uXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iXt():t==="fa"?aXt():t==="ar"?oXt():t==="es"?cXt():t==="hi"?lXt():sXt()}),_Xt=()=>"Source",fXt=()=>"来源",dXt=()=>"منبع",hXt=()=>"المصدر",pXt=()=>"Origen",mXt=()=>"स्रोत",sI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fXt():t==="fa"?dXt():t==="ar"?hXt():t==="es"?pXt():t==="hi"?mXt():_Xt()}),gXt=()=>"SSH Key",vXt=()=>"SSH 密钥",bXt=()=>"کلید SSH",yXt=()=>"مفتاح SSH",xXt=()=>"Clave SSH",wXt=()=>"SSH की",kXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vXt():t==="fa"?bXt():t==="ar"?yXt():t==="es"?xXt():t==="hi"?wXt():gXt()}),SXt=()=>"Started",CXt=()=>"开始时间",EXt=()=>"آغاز",NXt=()=>"بدأ",zXt=()=>"Inicio",jXt=()=>"शुरू हुआ",AXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CXt():t==="fa"?EXt():t==="ar"?NXt():t==="es"?zXt():t==="hi"?jXt():SXt()}),TXt=()=>"State",RXt=()=>"状态",MXt=()=>"وضعیت",OXt=()=>"الحالة",DXt=()=>"Estado",LXt=()=>"स्थिति",IXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RXt():t==="fa"?MXt():t==="ar"?OXt():t==="es"?DXt():t==="hi"?LXt():TXt()}),$Xt=()=>"Status",BXt=()=>"状态",PXt=()=>"وضعیت",FXt=()=>"الحالة",HXt=()=>"Estado",qXt=()=>"स्थिति",np=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BXt():t==="fa"?PXt():t==="ar"?FXt():t==="es"?HXt():t==="hi"?qXt():$Xt()}),UXt=()=>"Storage",GXt=()=>"存储",VXt=()=>"ذخیره‌سازی",KXt=()=>"التخزين",WXt=()=>"Almacenamiento",QXt=()=>"स्टोरेज",XXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GXt():t==="fa"?VXt():t==="ar"?KXt():t==="es"?WXt():t==="hi"?QXt():UXt()}),YXt=()=>"Sync",ZXt=()=>"同步",JXt=()=>"همگام‌سازی",eYt=()=>"مزامنة",tYt=()=>"Sincronización",nYt=()=>"सिंक",rYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZXt():t==="fa"?JXt():t==="ar"?eYt():t==="es"?tYt():t==="hi"?nYt():YXt()}),sYt=()=>"Syncing off",iYt=()=>"同步已关闭",aYt=()=>"همگام‌سازی خاموش",oYt=()=>"المزامنة معطّلة",cYt=()=>"Sincronización desactivada",lYt=()=>"सिंकिंग बंद है",uYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iYt():t==="fa"?aYt():t==="ar"?oYt():t==="es"?cYt():t==="hi"?lYt():sYt()}),_Yt=()=>"Test connection",fYt=()=>"测试连接",dYt=()=>"آزمایش اتصال",hYt=()=>"اختبار الاتصال",pYt=()=>"Probar conexión",mYt=()=>"कनेक्शन जाँचें",gYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fYt():t==="fa"?dYt():t==="ar"?hYt():t==="es"?pYt():t==="hi"?mYt():_Yt()}),vYt=()=>"Testing…",bYt=()=>"正在测试…",yYt=()=>"در حال آزمایش…",xYt=()=>"جارٍ الاختبار…",wYt=()=>"Probando…",kYt=()=>"जाँचा जा रहा है…",SYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bYt():t==="fa"?yYt():t==="ar"?xYt():t==="es"?wYt():t==="hi"?kYt():vYt()}),CYt=()=>", then add it with",EYt=()=>",然后使用以下命令添加:",NYt=()=>"، سپس با این فرمان اضافه‌اش کنید:",zYt=()=>"، ثم أضِفه عبر",jYt=()=>" y luego añádela con",AYt=()=>", फिर इसे इसके साथ जोड़ें",TYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EYt():t==="fa"?NYt():t==="ar"?zYt():t==="es"?jYt():t==="hi"?AYt():CYt()}),RYt=()=>"This is useful when collaborators follow project changes on GitHub. New projects will enable syncing automatically, creating a private repository when needed and pushing experiment branches for visibility.",MYt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",OYt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",DYt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",LYt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",IYt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",$Yt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MYt():t==="fa"?OYt():t==="ar"?DYt():t==="es"?LYt():t==="hi"?IYt():RYt()}),BYt=()=>"This saved destination is not configured. Set it up below or choose another backend.",PYt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",FYt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",HYt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",qYt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",UYt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",GYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PYt():t==="fa"?FYt():t==="ar"?HYt():t==="es"?qYt():t==="hi"?UYt():BYt()}),VYt=()=>"This value looks like a Hugging Face token — compute runs only read it from",KYt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",WYt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",QYt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",XYt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",YYt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",ZYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KYt():t==="fa"?WYt():t==="ar"?QYt():t==="es"?XYt():t==="hi"?YYt():VYt()}),JYt=()=>"Time limit",eZt=()=>"时间限制",tZt=()=>"محدودیت زمانی",nZt=()=>"الحد الزمني",rZt=()=>"Límite de tiempo",sZt=()=>"समय सीमा",iZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eZt():t==="fa"?tZt():t==="ar"?nZt():t==="es"?rZt():t==="hi"?sZt():JYt()}),aZt=()=>"Unable to verify",oZt=()=>"无法验证",cZt=()=>"تأیید ممکن نیست",lZt=()=>"تعذّر التحقق",uZt=()=>"No se pudo verificar",_Zt=()=>"सत्यापित नहीं हो सका",nb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oZt():t==="fa"?cZt():t==="ar"?lZt():t==="es"?uZt():t==="hi"?_Zt():aZt()}),fZt=()=>"Unknown",dZt=()=>"未知",hZt=()=>"نامشخص",pZt=()=>"غير معروف",mZt=()=>"Desconocido",gZt=()=>"अज्ञात",iI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dZt():t==="fa"?hZt():t==="ar"?pZt():t==="es"?mZt():t==="hi"?gZt():fZt()}),vZt=()=>"Update required",bZt=()=>"需要更新",yZt=()=>"نیازمند به‌روزرسانی",xZt=()=>"مطلوب تحديث",wZt=()=>"Actualización necesaria",kZt=()=>"अपडेट ज़रूरी है",SZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bZt():t==="fa"?yZt():t==="ar"?xZt():t==="es"?wZt():t==="hi"?kZt():vZt()}),CZt=()=>"Updates",EZt=()=>"更新",NZt=()=>"به‌روزرسانی‌ها",zZt=()=>"التحديثات",jZt=()=>"Actualizaciones",AZt=()=>"अपडेट",nj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EZt():t==="fa"?NZt():t==="ar"?zZt():t==="es"?jZt():t==="hi"?AZt():CZt()}),TZt=()=>"Usage analytics",RZt=()=>"使用情况分析",MZt=()=>"تحلیل استفاده",OZt=()=>"تحليلات الاستخدام",DZt=()=>"Estadísticas de uso",LZt=()=>"उपयोग एनालिटिक्स",IZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RZt():t==="fa"?MZt():t==="ar"?OZt():t==="es"?DZt():t==="hi"?LZt():TZt()}),$Zt=()=>"value",BZt=()=>"值",PZt=()=>"مقدار",FZt=()=>"القيمة",HZt=()=>"valor",qZt=()=>"वैल्यू",aI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BZt():t==="fa"?PZt():t==="ar"?FZt():t==="es"?HZt():t==="hi"?qZt():$Zt()}),UZt=()=>"Variables available to runs and the research agent (API keys, tokens).",GZt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",VZt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",KZt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",WZt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",QZt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",XZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GZt():t==="fa"?VZt():t==="ar"?KZt():t==="es"?WZt():t==="hi"?QZt():UZt()}),YZt=()=>"Version",ZZt=()=>"版本",JZt=()=>"نسخه",eJt=()=>"الإصدار",tJt=()=>"Versión",nJt=()=>"वर्शन",oI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZZt():t==="fa"?JZt():t==="ar"?eJt():t==="es"?tJt():t==="hi"?nJt():YZt()}),rJt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",sJt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",iJt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",aJt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",oJt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",cJt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",lJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sJt():t==="fa"?iJt():t==="ar"?aJt():t==="es"?oJt():t==="hi"?cJt():rJt()}),uJt=()=>"With a token saved, a paper opened in the dashboard can be kept in step with an Overleaf project, in both directions. Overleaf's Git integration comes with a paid Overleaf plan; without one, a paper can still be uploaded to Overleaf as a new project. The token stays on this machine and is not sent to compute backends.",_Jt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",fJt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",dJt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",hJt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",pJt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",mJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Jt():t==="fa"?fJt():t==="ar"?dJt():t==="es"?hJt():t==="hi"?pJt():uJt()}),gJt=()=>"Pick a login node first",vJt=()=>"请先选择登录节点",bJt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",yJt=()=>"اختر عقدة دخول أولًا",xJt=()=>"Elige primero un nodo de acceso",wJt=()=>"पहले एक लॉगिन नोड चुनें",kJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vJt():t==="fa"?bJt():t==="ar"?yJt():t==="es"?xJt():t==="hi"?wJt():gJt()}),SJt=()=>"Providers",CJt=()=>"提供商",EJt=()=>"ارائه‌دهندگان",NJt=()=>"المزوّدون",zJt=()=>"Proveedores",jJt=()=>"प्रोवाइडर",cI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CJt():t==="fa"?EJt():t==="ar"?NJt():t==="es"?zJt():t==="hi"?jJt():SJt()}),AJt=()=>"Reconnect",TJt=()=>"重新连接",RJt=()=>"اتصال دوباره",MJt=()=>"إعادة الاتصال",OJt=()=>"Reconectar",DJt=()=>"फिर से कनेक्ट करें",lI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TJt():t==="fa"?RJt():t==="ar"?MJt():t==="es"?OJt():t==="hi"?DJt():AJt()}),LJt=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,IJt=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,$Jt=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,BJt=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,PJt=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,FJt=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,HJt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IJt(e):t==="fa"?$Jt(e):t==="ar"?BJt(e):t==="es"?PJt(e):t==="hi"?FJt(e):LJt(e)}),qJt=()=>"Reinstall with the orx installer to get automatic updates.",UJt=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",GJt=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",VJt=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",KJt=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",WJt=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",QJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UJt():t==="fa"?GJt():t==="ar"?VJt():t==="es"?KJt():t==="hi"?WJt():qJt()}),XJt=()=>"Release notes",YJt=()=>"版本说明",ZJt=()=>"یادداشت‌های انتشار",JJt=()=>"ملاحظات الإصدار",een=()=>"Notas de la versión",ten=()=>"रिलीज़ नोट्स",uI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YJt():t==="fa"?ZJt():t==="ar"?JJt():t==="es"?een():t==="hi"?ten():XJt()}),nen=()=>"Re-link",ren=()=>"重新链接",sen=()=>"پیوند دوباره",ien=()=>"إعادة الربط",aen=()=>"Volver a enlazar",oen=()=>"फिर से लिंक करें",cen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ren():t==="fa"?sen():t==="ar"?ien():t==="es"?aen():t==="hi"?oen():nen()}),len=()=>"Remove cookie",uen=()=>"移除 cookie",_en=()=>"حذف کوکی",fen=()=>"إزالة ملف تعريف الارتباط",den=()=>"Quitar cookie",hen=()=>"कुकी हटाएं",pen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uen():t==="fa"?_en():t==="ar"?fen():t==="es"?den():t==="hi"?hen():len()}),men=()=>"Remove token",gen=()=>"移除令牌",ven=()=>"حذف توکن",ben=()=>"إزالة الرمز",yen=()=>"Quitar token",xen=()=>"टोकन हटाएं",wen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gen():t==="fa"?ven():t==="ar"?ben():t==="es"?yen():t==="hi"?xen():men()}),ken=()=>"Removing…",Sen=()=>"正在移除…",Cen=()=>"در حال حذف…",Een=()=>"جارٍ الإزالة…",Nen=()=>"Quitando…",zen=()=>"हटाया जा रहा है…",rj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sen():t==="fa"?Cen():t==="ar"?Een():t==="es"?Nen():t==="hi"?zen():ken()}),jen=()=>"Replace anyway",Aen=()=>"仍要替换",Ten=()=>"به‌هرحال جایگزین کن",Ren=()=>"الاستبدال على أي حال",Men=()=>"Reemplazar de todos modos",Oen=()=>"फिर भी बदलें",Den=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aen():t==="fa"?Ten():t==="ar"?Ren():t==="es"?Men():t==="hi"?Oen():jen()}),Len=()=>"Replace key",Ien=()=>"替换密钥",$en=()=>"جایگزینی کلید",Ben=()=>"استبدال المفتاح",Pen=()=>"Reemplazar clave",Fen=()=>"की बदलें",Hen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ien():t==="fa"?$en():t==="ar"?Ben():t==="es"?Pen():t==="hi"?Fen():Len()}),qen=()=>"Replace token",Uen=()=>"替换令牌",Gen=()=>"جایگزینی توکن",Ven=()=>"استبدال الرمز",Ken=()=>"Reemplazar token",Wen=()=>"टोकन बदलें",Qen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uen():t==="fa"?Gen():t==="ar"?Ven():t==="es"?Ken():t==="hi"?Wen():qen()}),Xen=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,Yen=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,Zen=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,Jen=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,etn=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,ttn=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,ntn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yen(e):t==="fa"?Zen(e):t==="ar"?Jen(e):t==="es"?etn(e):t==="hi"?ttn(e):Xen(e)}),rtn=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,stn=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,itn=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,atn=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,otn=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,ctn=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,ltn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?stn(e):t==="fa"?itn(e):t==="ar"?atn(e):t==="es"?otn(e):t==="hi"?ctn(e):rtn(e)}),utn=()=>"Run `gh auth login` in your terminal.",_tn=()=>"请在终端中运行 `gh auth login`。",ftn=()=>"در پایانه `gh auth login` را اجرا کنید.",dtn=()=>"نفّذ `gh auth login` في طرفيتك.",htn=()=>"Ejecuta `gh auth login` en tu terminal.",ptn=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",mtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_tn():t==="fa"?ftn():t==="ar"?dtn():t==="es"?htn():t==="hi"?ptn():utn()}),gtn=()=>"Saved",vtn=()=>"已保存",btn=()=>"ذخیره شده",ytn=()=>"تم الحفظ",xtn=()=>"Guardado",wtn=()=>"सेव हो गया",sj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vtn():t==="fa"?btn():t==="ar"?ytn():t==="es"?xtn():t==="hi"?wtn():gtn()}),ktn=()=>"Set up",Stn=()=>"设置",Ctn=()=>"راه‌اندازی",Etn=()=>"إعداد",Ntn=()=>"Configurar",ztn=()=>"सेट अप करें",jtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Stn():t==="fa"?Ctn():t==="ar"?Etn():t==="es"?Ntn():t==="hi"?ztn():ktn()}),Atn=()=>"Set up SSH key",Ttn=()=>"设置 SSH 密钥",Rtn=()=>"راه‌اندازی کلید SSH",Mtn=()=>"إعداد مفتاح SSH",Otn=()=>"Configurar clave SSH",Dtn=()=>"SSH की सेट अप करें",Ltn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ttn():t==="fa"?Rtn():t==="ar"?Mtn():t==="es"?Otn():t==="hi"?Dtn():Atn()}),Itn=()=>"Sign in",$tn=()=>"登录",Btn=()=>"ورود",Ptn=()=>"تسجيل الدخول",Ftn=()=>"Iniciar sesión",Htn=()=>"साइन इन करें",_I=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$tn():t==="fa"?Btn():t==="ar"?Ptn():t==="es"?Ftn():t==="hi"?Htn():Itn()}),qtn=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,Utn=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,Gtn=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,Vtn=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,Ktn=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,Wtn=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,fI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Utn(e):t==="fa"?Gtn(e):t==="ar"?Vtn(e):t==="es"?Ktn(e):t==="hi"?Wtn(e):qtn(e)}),Qtn=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",Xtn=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",Ytn=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",Ztn=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",Jtn=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",enn=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",tnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xtn():t==="fa"?Ytn():t==="ar"?Ztn():t==="es"?Jtn():t==="hi"?enn():Qtn()}),nnn=()=>"The terminal disconnected before setup completed. Try again.",rnn=()=>"设置完成前终端连接已断开。请重试。",snn=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",inn=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",ann=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",onn=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",rb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rnn():t==="fa"?snn():t==="ar"?inn():t==="es"?ann():t==="hi"?onn():nnn()}),cnn=()=>"Dark",lnn=()=>"深色",unn=()=>"تیره",_nn=()=>"داكن",fnn=()=>"Oscuro",dnn=()=>"डार्क",hnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lnn():t==="fa"?unn():t==="ar"?_nn():t==="es"?fnn():t==="hi"?dnn():cnn()}),pnn=()=>"Theme",mnn=()=>"主题",gnn=()=>"پوسته",vnn=()=>"السمة",bnn=()=>"Tema",ynn=()=>"थीम",ij=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mnn():t==="fa"?gnn():t==="ar"?vnn():t==="es"?bnn():t==="hi"?ynn():pnn()}),xnn=()=>"Light",wnn=()=>"浅色",knn=()=>"روشن",Snn=()=>"فاتح",Cnn=()=>"Claro",Enn=()=>"लाइट",Nnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wnn():t==="fa"?knn():t==="ar"?Snn():t==="es"?Cnn():t==="hi"?Enn():xnn()}),znn=()=>"System",jnn=()=>"系统",Ann=()=>"سیستم",Tnn=()=>"النظام",Rnn=()=>"Sistema",Mnn=()=>"सिस्टम",Onn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jnn():t==="fa"?Ann():t==="ar"?Tnn():t==="es"?Rnn():t==="hi"?Mnn():znn()}),Dnn=()=>"Set up billing in the Tinker console",Lnn=()=>"在 Tinker 控制台设置账单",Inn=()=>"تنظیم پرداخت در کنسول Tinker",$nn=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Bnn=()=>"Configura la facturación en la consola de Tinker",Pnn=()=>"Tinker कंसोल में बिलिंग सेट अप करें",Fnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lnn():t==="fa"?Inn():t==="ar"?$nn():t==="es"?Bnn():t==="hi"?Pnn():Dnn()}),Hnn=()=>"Billing setup required",qnn=()=>"需要设置账单",Unn=()=>"تنظیم پرداخت لازم است",Gnn=()=>"مطلوب إعداد الفوترة",Vnn=()=>"Hay que configurar la facturación",Knn=()=>"बिलिंग सेटअप ज़रूरी है",Wnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qnn():t==="fa"?Unn():t==="ar"?Gnn():t==="es"?Vnn():t==="hi"?Knn():Hnn()}),Qnn=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",Xnn=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",Ynn=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",Znn=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",Jnn=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",ern=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",trn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xnn():t==="fa"?Ynn():t==="ar"?Znn():t==="es"?Jnn():t==="hi"?ern():Qnn()}),nrn=()=>"Invalid Key",rrn=()=>"密钥无效",srn=()=>"کلید نامعتبر",irn=()=>"مفتاح غير صالح",arn=()=>"Clave no válida",orn=()=>"अमान्य की",crn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rrn():t==="fa"?srn():t==="ar"?irn():t==="es"?arn():t==="hi"?orn():nrn()}),lrn=()=>"Token from",urn=()=>"令牌来自",_rn=()=>"توکن از",frn=()=>"الرمز من",drn=()=>"Token tomado de la",hrn=()=>"टोकन स्रोत",prn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?urn():t==="fa"?_rn():t==="ar"?frn():t==="es"?drn():t==="hi"?hrn():lrn()}),mrn=()=>"Update now",grn=()=>"立即更新",vrn=()=>"اکنون به‌روزرسانی کن",brn=()=>"التحديث الآن",yrn=()=>"Actualizar ahora",xrn=()=>"अभी अपडेट करें",wrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?grn():t==="fa"?vrn():t==="ar"?brn():t==="es"?yrn():t==="hi"?xrn():mrn()}),krn=e=>`Update to ${e==null?void 0:e.version}`,Srn=e=>`更新到 ${e==null?void 0:e.version}`,Crn=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,Ern=e=>`التحديث إلى ${e==null?void 0:e.version}`,Nrn=e=>`Actualizar a ${e==null?void 0:e.version}`,zrn=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,jrn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Srn(e):t==="fa"?Crn(e):t==="ar"?Ern(e):t==="es"?Nrn(e):t==="hi"?zrn(e):krn(e)}),Arn=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",Trn=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Rrn=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Mrn=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",Orn=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",Drn=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",Lrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Trn():t==="fa"?Rrn():t==="ar"?Mrn():t==="es"?Orn():t==="hi"?Drn():Arn()}),Irn=()=>"Updating default destination…",$rn=()=>"正在更新默认运行位置…",Brn=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",Prn=()=>"جارٍ تحديث الوجهة الافتراضية…",Frn=()=>"Actualizando el destino predeterminado…",Hrn=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",qrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$rn():t==="fa"?Brn():t==="ar"?Prn():t==="es"?Frn():t==="hi"?Hrn():Irn()}),Urn=()=>"Use this repository for automatic experiment-branch pushes when your connected account can write to it. Otherwise, OpenResearch creates a separate private repository for collaboration.",Grn=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",Vrn=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",Krn=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",Wrn=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",Qrn=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",Xrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Grn():t==="fa"?Vrn():t==="ar"?Krn():t==="es"?Wrn():t==="hi"?Qrn():Urn()}),Yrn=()=>"Validating…",Zrn=()=>"正在验证…",Jrn=()=>"در حال اعتبارسنجی…",esn=()=>"جارٍ التحقق…",tsn=()=>"Validando…",nsn=()=>"सत्यापित हो रहा है…",dI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zrn():t==="fa"?Jrn():t==="ar"?esn():t==="es"?tsn():t==="hi"?nsn():Yrn()}),rsn=()=>"View settings",ssn=()=>"查看设置",isn=()=>"مشاهدهٔ تنظیمات",asn=()=>"عرض الإعدادات",osn=()=>"Ver configuración",csn=()=>"सेटिंग्स देखें",lsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ssn():t==="fa"?isn():t==="ar"?asn():t==="es"?osn():t==="hi"?csn():rsn()}),usn=e=>`Couldn't delete the side chat: ${e==null?void 0:e.error}`,_sn=e=>`无法删除侧边对话:${e==null?void 0:e.error}`,fsn=e=>`حذف گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,dsn=e=>`تعذّر حذف المحادثة الجانبية: ${e==null?void 0:e.error}`,hsn=e=>`No se pudo eliminar el chat lateral: ${e==null?void 0:e.error}`,psn=e=>`साइड चैट हटाई नहीं जा सकी: ${e==null?void 0:e.error}`,aj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_sn(e):t==="fa"?fsn(e):t==="ar"?dsn(e):t==="es"?hsn(e):t==="hi"?psn(e):usn(e)}),msn=()=>"Side chats are deleted when you close them or quit the app.",gsn=()=>"关闭侧边对话或退出应用后,侧边对话会被删除。",vsn=()=>"گفت‌وگوهای جانبی با بستن آن‌ها یا خروج از برنامه حذف می‌شوند.",bsn=()=>"تُحذف المحادثات الجانبية عند إغلاقها أو الخروج من التطبيق.",ysn=()=>"Los chats laterales se eliminan cuando los cierras o sales de la app.",xsn=()=>"साइड चैट उन्हें बंद करने या ऐप से बाहर निकलने पर हटा दी जाती हैं।",wsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gsn():t==="fa"?vsn():t==="ar"?bsn():t==="es"?ysn():t==="hi"?xsn():msn()}),ksn=()=>"Open a chat first, then start a side chat from it.",Ssn=()=>"请先打开一个对话,再从中开启侧边对话。",Csn=()=>"ابتدا یک گفت‌وگو باز کنید، سپس از آن گفت‌وگوی جانبی شروع کنید.",Esn=()=>"افتح محادثة أولًا، ثم ابدأ منها محادثة جانبية.",Nsn=()=>"Abre primero un chat y luego inicia un chat lateral desde él.",zsn=()=>"पहले कोई चैट खोलें, फिर उससे साइड चैट शुरू करें।",jsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ssn():t==="fa"?Csn():t==="ar"?Esn():t==="es"?Nsn():t==="hi"?zsn():ksn()}),Asn=()=>"A side chat can't open its own side chat.",Tsn=()=>"侧边对话不能再开启自己的侧边对话。",Rsn=()=>"گفت‌وگوی جانبی نمی‌تواند گفت‌وگوی جانبی خودش را باز کند.",Msn=()=>"لا يمكن للمحادثة الجانبية فتح محادثة جانبية خاصة بها.",Osn=()=>"Un chat lateral no puede abrir su propio chat lateral.",Dsn=()=>"साइड चैट अपनी खुद की साइड चैट नहीं खोल सकती।",Lsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tsn():t==="fa"?Rsn():t==="ar"?Msn():t==="es"?Osn():t==="hi"?Dsn():Asn()}),Isn=()=>"Side chat",$sn=()=>"侧边对话",Bsn=()=>"گفت‌وگوی جانبی",Psn=()=>"محادثة جانبية",Fsn=()=>"Chat lateral",Hsn=()=>"साइड चैट",X3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$sn():t==="fa"?Bsn():t==="ar"?Psn():t==="es"?Fsn():t==="hi"?Hsn():Isn()}),qsn=e=>`Couldn't open a side chat: ${e==null?void 0:e.error}`,Usn=e=>`无法打开侧边对话:${e==null?void 0:e.error}`,Gsn=e=>`باز کردن گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,Vsn=e=>`تعذّر فتح محادثة جانبية: ${e==null?void 0:e.error}`,Ksn=e=>`No se pudo abrir un chat lateral: ${e==null?void 0:e.error}`,Wsn=e=>`साइड चैट नहीं खुल सकी: ${e==null?void 0:e.error}`,Qsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Usn(e):t==="fa"?Gsn(e):t==="ar"?Vsn(e):t==="es"?Ksn(e):t==="hi"?Wsn(e):qsn(e)}),Xsn=()=>"Ask a quick question in a temporary side chat",Ysn=()=>"在临时侧边对话中快速提问",Zsn=()=>"یک پرسش کوتاه را در گفت‌وگوی جانبی موقت بپرسید",Jsn=()=>"اطرح سؤالًا سريعًا في محادثة جانبية مؤقتة",ein=()=>"Haz una pregunta rápida en un chat lateral temporal",tin=()=>"अस्थायी साइड चैट में एक छोटा सवाल पूछें",nin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ysn():t==="fa"?Zsn():t==="ar"?Jsn():t==="es"?ein():t==="hi"?tin():Xsn()}),rin=()=>"Edit project",sin=()=>"编辑项目",iin=()=>"ویرایش پروژه",ain=()=>"تعديل المشروع",oin=()=>"Editar proyecto",cin=()=>"प्रोजेक्ट संपादित करें",lin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sin():t==="fa"?iin():t==="ar"?ain():t==="es"?oin():t==="hi"?cin():rin()}),uin=()=>"Filter",_in=()=>"筛选",fin=()=>"فیلتر",din=()=>"تصفية",hin=()=>"Filtrar",pin=()=>"फ़िल्टर",min=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_in():t==="fa"?fin():t==="ar"?din():t==="es"?hin():t==="hi"?pin():uin()}),gin=()=>"Group by",vin=()=>"分组方式",bin=()=>"گروه‌بندی بر اساس",yin=()=>"تجميع حسب",xin=()=>"Agrupar por",win=()=>"समूह बनाएँ",kin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vin():t==="fa"?bin():t==="ar"?yin():t==="es"?xin():t==="hi"?win():gin()}),Sin=()=>"In one list",Cin=()=>"单一列表",Ein=()=>"در یک فهرست",Nin=()=>"في قائمة واحدة",zin=()=>"En una lista",jin=()=>"एक सूची में",Ain=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cin():t==="fa"?Ein():t==="ar"?Nin():t==="es"?zin():t==="hi"?jin():Sin()}),Tin=()=>"Pin",Rin=()=>"置顶",Min=()=>"سنجاق کردن",Oin=()=>"تثبيت",Din=()=>"Fijar",Lin=()=>"पिन करें",Iin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rin():t==="fa"?Min():t==="ar"?Oin():t==="es"?Din():t==="hi"?Lin():Tin()}),$in=e=>`${e==null?void 0:e.count} chats`,Bin=e=>`${e==null?void 0:e.count} 个聊天`,Pin=e=>`${e==null?void 0:e.count} گفت‌وگو`,Fin=e=>`${e==null?void 0:e.count} محادثات`,Hin=e=>`${e==null?void 0:e.count} chats`,qin=e=>`${e==null?void 0:e.count} चैट`,Uin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bin(e):t==="fa"?Pin(e):t==="ar"?Fin(e):t==="es"?Hin(e):t==="hi"?qin(e):$in(e)}),Gin=e=>`Project details · ${e==null?void 0:e.name}`,Vin=e=>`项目详情 · ${e==null?void 0:e.name}`,Kin=e=>`جزئیات پروژه · ${e==null?void 0:e.name}`,Win=e=>`تفاصيل المشروع · ${e==null?void 0:e.name}`,Qin=e=>`Detalles del proyecto · ${e==null?void 0:e.name}`,Xin=e=>`प्रोजेक्ट विवरण · ${e==null?void 0:e.name}`,Yin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vin(e):t==="fa"?Kin(e):t==="ar"?Win(e):t==="es"?Qin(e):t==="hi"?Xin(e):Gin(e)}),Zin=()=>"Reveal in Finder",Jin=()=>"在访达中显示",ean=()=>"نمایش در Finder",tan=()=>"إظهار في Finder",nan=()=>"Mostrar en Finder",ran=()=>"Finder में दिखाएँ",san=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jin():t==="fa"?ean():t==="ar"?tan():t==="es"?nan():t==="hi"?ran():Zin()}),ian=()=>"Source folder",aan=()=>"源文件夹",oan=()=>"پوشهٔ منبع",can=()=>"مجلد المصدر",lan=()=>"Carpeta de origen",uan=()=>"स्रोत फ़ोल्डर",_an=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aan():t==="fa"?oan():t==="ar"?can():t==="es"?lan():t==="hi"?uan():ian()}),fan=()=>"Unpin",dan=()=>"取消置顶",han=()=>"برداشتن سنجاق",pan=()=>"إلغاء التثبيت",man=()=>"Desfijar",gan=()=>"पिन हटाएँ",van=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dan():t==="fa"?han():t==="ar"?pan():t==="es"?man():t==="hi"?gan():fan()}),ban=()=>"Skill",yan=()=>"技能",xan=()=>"مهارت",wan=()=>"مهارة",kan=()=>"Skill",San=()=>"स्किल",Can=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yan():t==="fa"?xan():t==="ar"?wan():t==="es"?kan():t==="hi"?San():ban()}),Ean=()=>"Loading skill…",Nan=()=>"正在加载技能…",zan=()=>"در حال بارگیری مهارت…",jan=()=>"جارٍ تحميل المهارة…",Aan=()=>"Cargando skill…",Tan=()=>"स्किल लोड हो रही है…",Ran=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nan():t==="fa"?zan():t==="ar"?jan():t==="es"?Aan():t==="hi"?Tan():Ean()}),Man=()=>"Personal",Oan=()=>"个人",Dan=()=>"شخصی",Lan=()=>"شخصي",Ian=()=>"Personal",$an=()=>"व्यक्तिगत",Ban=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oan():t==="fa"?Dan():t==="ar"?Lan():t==="es"?Ian():t==="hi"?$an():Man()}),Pan=()=>"Alternatively, tell your agent to save a reusable skill for you.",Fan=()=>"或者,请你的智能体为你保存可重复使用的技能。",Han=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",qan=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",Uan=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",Gan=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",Van=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fan():t==="fa"?Han():t==="ar"?qan():t==="es"?Uan():t==="hi"?Gan():Pan()}),Kan=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Wan=e=>`删除技能“${e==null?void 0:e.name}”?`,Qan=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,Xan=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,Yan=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Zan=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Jan=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wan(e):t==="fa"?Qan(e):t==="ar"?Xan(e):t==="es"?Yan(e):t==="hi"?Zan(e):Kan(e)}),eon=e=>`Delete skill ${e==null?void 0:e.name}`,ton=e=>`删除技能 ${e==null?void 0:e.name}`,non=e=>`حذف مهارت ${e==null?void 0:e.name}`,ron=e=>`حذف المهارة ${e==null?void 0:e.name}`,son=e=>`Eliminar la skill ${e==null?void 0:e.name}`,ion=e=>`${e==null?void 0:e.name} स्किल हटाएं`,aon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ton(e):t==="fa"?non(e):t==="ar"?ron(e):t==="es"?son(e):t==="hi"?ion(e):eon(e)}),oon=e=>`Delete the “${e==null?void 0:e.name}” template?`,con=e=>`删除模板“${e==null?void 0:e.name}”?`,lon=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,uon=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,_on=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,fon=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,don=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?con(e):t==="fa"?lon(e):t==="ar"?uon(e):t==="es"?_on(e):t==="hi"?fon(e):oon(e)}),hon=e=>`Delete template ${e==null?void 0:e.name}`,pon=e=>`删除模板 ${e==null?void 0:e.name}`,mon=e=>`حذف قالب ${e==null?void 0:e.name}`,gon=e=>`حذف القالب ${e==null?void 0:e.name}`,von=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,bon=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,yon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pon(e):t==="fa"?mon(e):t==="ar"?gon(e):t==="es"?von(e):t==="hi"?bon(e):hon(e)}),xon=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",won=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",kon=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",Son=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",Con=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",Eon=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",Non=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?won():t==="fa"?kon():t==="ar"?Son():t==="es"?Con():t==="hi"?Eon():xon()}),zon=()=>"Drop a SKILL.md or .zip here, or click to choose",jon=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",Aon=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Ton=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Ron=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",Mon=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",Oon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jon():t==="fa"?Aon():t==="ar"?Ton():t==="es"?Ron():t==="hi"?Mon():zon()}),Don=()=>"Drop a .tex or .zip here, or click to choose",Lon=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Ion=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",$on=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Bon=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",Pon=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",Fon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lon():t==="fa"?Ion():t==="ar"?$on():t==="es"?Bon():t==="hi"?Pon():Don()}),Hon=()=>"File too large (max 20 MB).",qon=()=>"文件过大(最大 20 MB)。",Uon=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Gon=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",Von=()=>"Archivo demasiado grande (máx. 20 MB).",Kon=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",hI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qon():t==="fa"?Uon():t==="ar"?Gon():t==="es"?Von():t==="hi"?Kon():Hon()}),Won=()=>" + 1 file",Qon=()=>" + 1 个文件",Xon=()=>" + ۱ فایل",Yon=()=>" + ملف واحد",Zon=()=>" + 1 archivo",Jon=()=>" + 1 फ़ाइल",ecn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qon():t==="fa"?Xon():t==="ar"?Yon():t==="es"?Zon():t==="hi"?Jon():Won()}),tcn=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",ncn=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",rcn=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",scn=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",icn=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",acn=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",ocn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ncn():t==="fa"?rcn():t==="ar"?scn():t==="es"?icn():t==="hi"?acn():tcn()}),ccn=()=>"Remove from OpenResearch",lcn=()=>"从 OpenResearch 移除",ucn=()=>"حذف از OpenResearch",_cn=()=>"إزالة من OpenResearch",fcn=()=>"Quitar de OpenResearch",dcn=()=>"OpenResearch से हटाएं",hcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lcn():t==="fa"?ucn():t==="ar"?_cn():t==="es"?fcn():t==="hi"?dcn():ccn()}),pcn=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,mcn=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,gcn=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,vcn=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,bcn=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,ycn=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,xcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mcn(e):t==="fa"?gcn(e):t==="ar"?vcn(e):t==="es"?bcn(e):t==="hi"?ycn(e):pcn(e)}),wcn=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,kcn=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,Scn=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,Ccn=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,Ecn=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,Ncn=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,zcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kcn(e):t==="fa"?Scn(e):t==="ar"?Ccn(e):t==="es"?Ecn(e):t==="hi"?Ncn(e):wcn(e)}),jcn=e=>` + ${e==null?void 0:e.count} files`,Acn=e=>` + ${e==null?void 0:e.count} 个文件`,Tcn=e=>` + ${e==null?void 0:e.count} فایل`,Rcn=e=>` + ملفات (${e==null?void 0:e.count})`,Mcn=e=>` + ${e==null?void 0:e.count} archivos`,Ocn=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,Dcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Acn(e):t==="fa"?Tcn(e):t==="ar"?Rcn(e):t==="es"?Mcn(e):t==="hi"?Ocn(e):jcn(e)}),Lcn=()=>"Could not load skills:",Icn=()=>"无法加载技能:",$cn=()=>"بارگیری مهارت‌ها ممکن نشد:",Bcn=()=>"تعذّر تحميل المهارات:",Pcn=()=>"No se pudieron cargar las skills:",Fcn=()=>"स्किल लोड नहीं हो सकीं:",Hcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Icn():t==="fa"?$cn():t==="ar"?Bcn():t==="es"?Pcn():t==="hi"?Fcn():Lcn()}),qcn=()=>"Could not load templates:",Ucn=()=>"无法加载模板:",Gcn=()=>"بارگیری قالب‌ها ممکن نشد:",Vcn=()=>"تعذّر تحميل القوالب:",Kcn=()=>"No se pudieron cargar las plantillas:",Wcn=()=>"टेम्पलेट लोड नहीं हो सके:",Qcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ucn():t==="fa"?Gcn():t==="ar"?Vcn():t==="es"?Kcn():t==="hi"?Wcn():qcn()}),Xcn=()=>"Customize",Ycn=()=>"自定义",Zcn=()=>"سفارشی‌سازی",Jcn=()=>"تخصيص",eln=()=>"Personalizar",tln=()=>"कस्टमाइज़ करें",nln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ycn():t==="fa"?Zcn():t==="ar"?Jcn():t==="es"?eln():t==="hi"?tln():Xcn()}),rln=()=>"Delete skill",sln=()=>"删除技能",iln=()=>"حذف مهارت",aln=()=>"حذف المهارة",oln=()=>"Eliminar skill",cln=()=>"स्किल हटाएं",lln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sln():t==="fa"?iln():t==="ar"?aln():t==="es"?oln():t==="hi"?cln():rln()}),uln=()=>"Delete template",_ln=()=>"删除模板",fln=()=>"حذف قالب",dln=()=>"حذف القالب",hln=()=>"Eliminar plantilla",pln=()=>"टेम्पलेट हटाएं",mln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ln():t==="fa"?fln():t==="ar"?dln():t==="es"?hln():t==="hi"?pln():uln()}),gln=()=>"LaTeX templates",vln=()=>"LaTeX 模板",bln=()=>"قالب‌های LaTeX",yln=()=>"قوالب LaTeX",xln=()=>"Plantillas de LaTeX",wln=()=>"LaTeX टेम्पलेट",kln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vln():t==="fa"?bln():t==="ar"?yln():t==="es"?xln():t==="hi"?wln():gln()}),Sln=()=>"Loading skills…",Cln=()=>"正在加载技能…",Eln=()=>"در حال بارگیری مهارت‌ها…",Nln=()=>"جارٍ تحميل المهارات…",zln=()=>"Cargando skills…",jln=()=>"स्किल लोड हो रही हैं…",Aln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cln():t==="fa"?Eln():t==="ar"?Nln():t==="es"?zln():t==="hi"?jln():Sln()}),Tln=()=>"Loading templates…",Rln=()=>"正在加载模板…",Mln=()=>"در حال بارگیری قالب‌ها…",Oln=()=>"جارٍ تحميل القوالب…",Dln=()=>"Cargando plantillas…",Lln=()=>"टेम्पलेट लोड हो रहे हैं…",Iln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rln():t==="fa"?Mln():t==="ar"?Oln():t==="es"?Dln():t==="hi"?Lln():Tln()}),$ln=()=>"No skills yet.",Bln=()=>"尚无技能。",Pln=()=>"هنوز مهارتی وجود ندارد.",Fln=()=>"لا توجد مهارات بعد.",Hln=()=>"Aún no hay skills.",qln=()=>"अभी तक कोई स्किल नहीं।",Uln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bln():t==="fa"?Pln():t==="ar"?Fln():t==="es"?Hln():t==="hi"?qln():$ln()}),Gln=()=>"No templates yet.",Vln=()=>"尚无模板。",Kln=()=>"هنوز قالبی وجود ندارد.",Wln=()=>"لا توجد قوالب بعد.",Qln=()=>"Aún no hay plantillas.",Xln=()=>"अभी तक कोई टेम्पलेट नहीं।",Yln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vln():t==="fa"?Kln():t==="ar"?Wln():t==="es"?Qln():t==="hi"?Xln():Gln()}),Zln=()=>"Skills",Jln=()=>"技能",eun=()=>"مهارت‌ها",tun=()=>"المهارات",nun=()=>"Skills",run=()=>"स्किल",sun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jln():t==="fa"?eun():t==="ar"?tun():t==="es"?nun():t==="hi"?run():Zln()}),iun=()=>"Uploading…",aun=()=>"正在上传…",oun=()=>"در حال بارگذاری…",cun=()=>"جارٍ الرفع…",lun=()=>"Subiendo…",uun=()=>"अपलोड हो रहा है…",_un=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aun():t==="fa"?oun():t==="ar"?cun():t==="es"?lun():t==="hi"?uun():iun()}),fun=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",dun=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",hun=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",pun=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",mun=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",gun=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",vun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dun():t==="fa"?hun():t==="ar"?pun():t==="es"?mun():t==="hi"?gun():fun()}),bun=()=>"Upload a SKILL.md file or a .zip of a skill folder.",yun=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",xun=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",wun=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",kun=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",Sun=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",Cun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yun():t==="fa"?xun():t==="ar"?wun():t==="es"?kun():t==="hi"?Sun():bun()}),Eun=()=>"Upload a .tex file or a .zip of a template folder.",Nun=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",zun=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",jun=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",Aun=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",Tun=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",Run=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nun():t==="fa"?zun():t==="ar"?jun():t==="es"?Aun():t==="hi"?Tun():Eun()}),Mun=()=>"Close SSH config",Oun=()=>"关闭 SSH 配置",Dun=()=>"بستن پیکربندی SSH",Lun=()=>"إغلاق إعداد SSH",Iun=()=>"Cerrar la configuración SSH",$un=()=>"SSH कॉन्फ़िग बंद करें",Bun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oun():t==="fa"?Dun():t==="ar"?Lun():t==="es"?Iun():t==="hi"?$un():Mun()}),Pun=()=>"Discard your unsaved SSH config changes?",Fun=()=>"要放弃未保存的 SSH 配置更改吗?",Hun=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",qun=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",Uun=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Gun=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",Vun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fun():t==="fa"?Hun():t==="ar"?qun():t==="es"?Uun():t==="hi"?Gun():Pun()}),Kun=()=>"Loading SSH config…",Wun=()=>"正在加载 SSH 配置…",Qun=()=>"در حال بارگیری پیکربندی SSH…",Xun=()=>"جارٍ تحميل إعداد SSH…",Yun=()=>"Cargando la configuración SSH…",Zun=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Jun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wun():t==="fa"?Qun():t==="ar"?Xun():t==="es"?Yun():t==="hi"?Zun():Kun()}),e_n=()=>"SSH config saved",t_n=()=>"SSH 配置已保存",n_n=()=>"پیکربندی SSH ذخیره شد",r_n=()=>"تم حفظ إعداد SSH",s_n=()=>"Configuración SSH guardada",i_n=()=>"SSH कॉन्फ़िग सेव हो गया",a_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t_n():t==="fa"?n_n():t==="ar"?r_n():t==="es"?s_n():t==="hi"?i_n():e_n()}),o_n=()=>"SSH config",c_n=()=>"SSH 配置",l_n=()=>"پیکربندی SSH",u_n=()=>"إعداد SSH",__n=()=>"Configuración SSH",f_n=()=>"SSH कॉन्फ़िग",d_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c_n():t==="fa"?l_n():t==="ar"?u_n():t==="es"?__n():t==="hi"?f_n():o_n()}),h_n=()=>"Configure SSH hosts…",p_n=()=>"配置 SSH 主机…",m_n=()=>"پیکربندی میزبان‌های SSH…",g_n=()=>"إعداد مضيفات SSH…",v_n=()=>"Configurar hosts SSH…",b_n=()=>"SSH होस्ट कॉन्फ़िगर करें…",pI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p_n():t==="fa"?m_n():t==="ar"?g_n():t==="es"?v_n():t==="hi"?b_n():h_n()}),y_n=()=>"Container name or ID",x_n=()=>"容器名称或 ID",w_n=()=>"نام یا شناسهٔ کانتینر",k_n=()=>"اسم الحاوية أو معرّفها",S_n=()=>"Nombre o ID del contenedor",C_n=()=>"कंटेनर का नाम या ID",E_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x_n():t==="fa"?w_n():t==="ar"?k_n():t==="es"?S_n():t==="hi"?C_n():y_n()}),N_n=()=>"Default SSH host",z_n=()=>"默认 SSH 主机",j_n=()=>"میزبان پیش‌فرض SSH",A_n=()=>"مضيف SSH الافتراضي",T_n=()=>"Servidor SSH predeterminado",R_n=()=>"डिफ़ॉल्ट SSH होस्ट",M_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z_n():t==="fa"?j_n():t==="ar"?A_n():t==="es"?T_n():t==="hi"?R_n():N_n()}),O_n=()=>"Direct host",D_n=()=>"直接在主机上",L_n=()=>"مستقیماً روی میزبان",I_n=()=>"المضيف مباشرة",$_n=()=>"Servidor directamente",B_n=()=>"सीधे होस्ट पर",P_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D_n():t==="fa"?L_n():t==="ar"?I_n():t==="es"?$_n():t==="hi"?B_n():O_n()}),F_n=()=>"Existing container",H_n=()=>"现有容器",q_n=()=>"کانتینر موجود",U_n=()=>"حاوية موجودة",G_n=()=>"Contenedor existente",V_n=()=>"मौजूदा कंटेनर",K_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H_n():t==="fa"?q_n():t==="ar"?U_n():t==="es"?G_n():t==="hi"?V_n():F_n()}),W_n=()=>"Run in",Q_n=()=>"运行位置",X_n=()=>"اجرا در",Y_n=()=>"التشغيل في",Z_n=()=>"Ejecutar en",J_n=()=>"यहाँ चलाएँ",efn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q_n():t==="fa"?X_n():t==="ar"?Y_n():t==="es"?Z_n():t==="hi"?J_n():W_n()}),tfn=()=>"Cancelled",nfn=()=>"已取消",rfn=()=>"لغوشده",sfn=()=>"ملغى",ifn=()=>"Cancelado",afn=()=>"रद्द किया गया",ofn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nfn():t==="fa"?rfn():t==="ar"?sfn():t==="es"?ifn():t==="hi"?afn():tfn()}),cfn=()=>"Cancelling",lfn=()=>"正在取消",ufn=()=>"در حال لغو",_fn=()=>"جارٍ الإلغاء",ffn=()=>"Cancelando",dfn=()=>"रद्द हो रहा है",hfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lfn():t==="fa"?ufn():t==="ar"?_fn():t==="es"?ffn():t==="hi"?dfn():cfn()}),pfn=()=>"Done",mfn=()=>"已完成",gfn=()=>"انجام‌شده",vfn=()=>"تم",bfn=()=>"Completado",yfn=()=>"पूरा हुआ",mI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mfn():t==="fa"?gfn():t==="ar"?vfn():t==="es"?bfn():t==="hi"?yfn():pfn()}),xfn=()=>"Editing",wfn=()=>"正在编辑",kfn=()=>"در حال ویرایش",Sfn=()=>"قيد التعديل",Cfn=()=>"Editando",Efn=()=>"संपादित हो रहा है",Nfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wfn():t==="fa"?kfn():t==="ar"?Sfn():t==="es"?Cfn():t==="hi"?Efn():xfn()}),zfn=()=>"Failed",jfn=()=>"失败",Afn=()=>"ناموفق",Tfn=()=>"فشل",Rfn=()=>"Error",Mfn=()=>"विफल",Ofn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jfn():t==="fa"?Afn():t==="ar"?Tfn():t==="es"?Rfn():t==="hi"?Mfn():zfn()}),Dfn=()=>"Idle",Lfn=()=>"空闲",Ifn=()=>"بی‌کار",$fn=()=>"خامل",Bfn=()=>"Inactivo",Pfn=()=>"निष्क्रिय",Ffn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lfn():t==="fa"?Ifn():t==="ar"?$fn():t==="es"?Bfn():t==="hi"?Pfn():Dfn()}),Hfn=()=>"Running",qfn=()=>"运行中",Ufn=()=>"در حال اجرا",Gfn=()=>"قيد التشغيل",Vfn=()=>"En ejecución",Kfn=()=>"चल रहा है",Wfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qfn():t==="fa"?Ufn():t==="ar"?Gfn():t==="es"?Vfn():t==="hi"?Kfn():Hfn()}),Qfn=()=>"Starting",Xfn=()=>"正在启动",Yfn=()=>"در حال آغاز",Zfn=()=>"جارٍ البدء",Jfn=()=>"Iniciando",edn=()=>"शुरू हो रहा है",tdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xfn():t==="fa"?Yfn():t==="ar"?Zfn():t==="es"?Jfn():t==="hi"?edn():Qfn()}),ndn=()=>"Copying…",rdn=()=>"正在复制…",sdn=()=>"در حال کپی…",idn=()=>"جارٍ النسخ…",adn=()=>"Copiando…",odn=()=>"कॉपी हो रहा है…",cdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rdn():t==="fa"?sdn():t==="ar"?idn():t==="es"?adn():t==="hi"?odn():ndn()}),ldn=()=>"Finalizing…",udn=()=>"正在完成…",_dn=()=>"در حال نهایی‌سازی…",fdn=()=>"جارٍ الإنهاء…",ddn=()=>"Finalizando…",hdn=()=>"अंतिम रूप दिया जा रहा है…",pdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?udn():t==="fa"?_dn():t==="ar"?fdn():t==="es"?ddn():t==="hi"?hdn():ldn()}),mdn=e=>`${e==null?void 0:e.size} free at target`,gdn=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,vdn=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,bdn=e=>`${e==null?void 0:e.size} متاح في الوجهة`,ydn=e=>`${e==null?void 0:e.size} libres en el destino`,xdn=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,wdn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gdn(e):t==="fa"?vdn(e):t==="ar"?bdn(e):t==="es"?ydn(e):t==="hi"?xdn(e):mdn(e)}),kdn=e=>`Move all orx data to: +इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,vge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dge(e):t==="fa"?hge(e):t==="ar"?pge(e):t==="es"?mge(e):t==="hi"?gge(e):fge(e)}),bge=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,yge=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,xge=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,wge=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,kge=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,Sge=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,Cge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yge(e):t==="fa"?xge(e):t==="ar"?wge(e):t==="es"?kge(e):t==="hi"?Sge(e):bge(e)}),Ege=()=>"Could not exit Plan mode. Try again.",Nge=()=>"无法退出计划模式。请重试。",zge=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",jge=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",Age=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",Tge=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",Rge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nge():t==="fa"?zge():t==="ar"?jge():t==="es"?Age():t==="hi"?Tge():Ege()}),Mge=()=>"Expand tool activity",Oge=()=>"展开工具活动",Dge=()=>"باز کردن فعالیت ابزارها",Lge=()=>"توسيع نشاط الأداة",Ige=()=>"Expandir actividad de herramientas",$ge=()=>"टूल गतिविधि फैलाएं",Bge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oge():t==="fa"?Dge():t==="ar"?Lge():t==="es"?Ige():t==="hi"?$ge():Mge()}),Pge=()=>"experiments",Fge=()=>"实验",Hge=()=>"آزمایش‌ها",qge=()=>"التجارب",Uge=()=>"experimentos",Gge=()=>"प्रयोग",Vge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fge():t==="fa"?Hge():t==="ar"?qge():t==="es"?Uge():t==="hi"?Gge():Pge()}),Kge=()=>"You",Wge=()=>"你",Qge=()=>"شما",Xge=()=>"أنت",Yge=()=>"Tú",Zge=()=>"आप",Jge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wge():t==="fa"?Qge():t==="ar"?Xge():t==="es"?Yge():t==="hi"?Zge():Kge()}),e1e=()=>"Goal cleared",t1e=()=>"已清除目标",n1e=()=>"هدف پاک شد",r1e=()=>"تم مسح الهدف",s1e=()=>"Objetivo borrado",i1e=()=>"लक्ष्य हटाया गया",a1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t1e():t==="fa"?n1e():t==="ar"?r1e():t==="es"?s1e():t==="hi"?i1e():e1e()}),o1e=e=>`Current goal: ${e==null?void 0:e.goal}`,c1e=e=>`当前目标:${e==null?void 0:e.goal}`,l1e=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,u1e=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,_1e=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,f1e=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,d1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c1e(e):t==="fa"?l1e(e):t==="ar"?u1e(e):t==="es"?_1e(e):t==="hi"?f1e(e):o1e(e)}),h1e=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,p1e=e=>`设置目标失败:${e==null?void 0:e.error}`,m1e=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,g1e=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,v1e=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,b1e=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,NN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?p1e(e):t==="fa"?m1e(e):t==="ar"?g1e(e):t==="es"?v1e(e):t==="hi"?b1e(e):h1e(e)}),y1e=()=>"No goal set — add one after /goal",x1e=()=>"尚未设置目标 — 在 /goal 后面写一个",w1e=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",k1e=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",S1e=()=>"Sin objetivo — añade uno después de /goal",C1e=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",E1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x1e():t==="fa"?w1e():t==="ar"?k1e():t==="es"?S1e():t==="hi"?C1e():y1e()}),N1e=()=>"Goal set",z1e=()=>"已设置目标",j1e=()=>"هدف تنظیم شد",A1e=()=>"تم تعيين الهدف",T1e=()=>"Objetivo definido",R1e=()=>"लक्ष्य सेट किया गया",M1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z1e():t==="fa"?j1e():t==="ar"?A1e():t==="es"?T1e():t==="hi"?R1e():N1e()}),O1e=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,D1e=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,L1e=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,I1e=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,$1e=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,B1e=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,P1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D1e(e):t==="fa"?L1e(e):t==="ar"?I1e(e):t==="es"?$1e(e):t==="hi"?B1e(e):O1e(e)}),F1e=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,H1e=e=>`导入该聊天失败:${e==null?void 0:e.error}`,q1e=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,U1e=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,G1e=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,V1e=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,K1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H1e(e):t==="fa"?q1e(e):t==="ar"?U1e(e):t==="es"?G1e(e):t==="hi"?V1e(e):F1e(e)}),W1e=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Q1e=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,X1e=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Y1e=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Z1e=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,J1e=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,eve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q1e(e):t==="fa"?X1e(e):t==="ar"?Y1e(e):t==="es"?Z1e(e):t==="hi"?J1e(e):W1e(e)}),tve=e=>`Message not sent: ${e==null?void 0:e.error}`,nve=e=>`消息未发送:${e==null?void 0:e.error}`,rve=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,sve=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,ive=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,ave=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,ove=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nve(e):t==="fa"?rve(e):t==="ar"?sve(e):t==="es"?ive(e):t==="hi"?ave(e):tve(e)}),cve=()=>"Model unavailable",lve=()=>"模型不可用",uve=()=>"مدل در دسترس نیست",_ve=()=>"النموذج غير متاح",fve=()=>"Modelo no disponible",dve=()=>"मॉडल उपलब्ध नहीं",hve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lve():t==="fa"?uve():t==="ar"?_ve():t==="es"?fve():t==="hi"?dve():cve()}),pve=()=>"No activity",mve=()=>"无活动",gve=()=>"بدون فعالیت",vve=()=>"لا يوجد نشاط",bve=()=>"Sin actividad",yve=()=>"कोई गतिविधि नहीं",xve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mve():t==="fa"?gve():t==="ar"?vve():t==="es"?bve():t==="hi"?yve():pve()}),wve=()=>"No archived sessions",kve=()=>"没有已归档的会话",Sve=()=>"نشست بایگانی‌شده‌ای وجود ندارد",Cve=()=>"لا توجد جلسات مؤرشفة",Eve=()=>"No hay sesiones archivadas",Nve=()=>"कोई आर्काइव किया गया सेशन नहीं",zve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kve():t==="fa"?Sve():t==="ar"?Cve():t==="es"?Eve():t==="hi"?Nve():wve()}),jve=()=>"No sessions yet",Ave=()=>"还没有会话",Tve=()=>"هنوز نشستی وجود ندارد",Rve=()=>"لا توجد جلسات بعد",Mve=()=>"Aún no hay sesiones",Ove=()=>"अभी तक कोई सेशन नहीं",Dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ave():t==="fa"?Tve():t==="ar"?Rve():t==="es"?Mve():t==="hi"?Ove():jve()}),Lve=()=>"There is nothing to compact yet",Ive=()=>"还没有可压缩的内容",$ve=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",Bve=()=>"لا يوجد شيء لضغطه بعد",Pve=()=>"Aún no hay nada que comprimir",Fve=()=>"छोटा करने के लिए अभी कुछ नहीं है",Hve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ive():t==="fa"?$ve():t==="ar"?Bve():t==="es"?Pve():t==="hi"?Fve():Lve()}),qve=()=>"No response to copy yet",Uve=()=>"还没有可复制的回复",Gve=()=>"هنوز پاسخی برای کپی وجود ندارد",Vve=()=>"لا يوجد رد لنسخه بعد",Kve=()=>"Aún no hay ninguna respuesta que copiar",Wve=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",Qve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uve():t==="fa"?Gve():t==="ar"?Vve():t==="es"?Kve():t==="hi"?Wve():qve()}),Xve=()=>"Nothing to export yet",Yve=()=>"还没有可导出的内容",Zve=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",Jve=()=>"لا يوجد شيء لتصديره بعد",ebe=()=>"Aún no hay nada que exportar",tbe=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",nbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yve():t==="fa"?Zve():t==="ar"?Jve():t==="es"?ebe():t==="hi"?tbe():Xve()}),rbe=()=>"1 annotation",sbe=()=>"1 条批注",ibe=()=>"۱ یادداشت",abe=()=>"تعليق واحد",obe=()=>"1 anotación",cbe=()=>"1 एनोटेशन",lbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sbe():t==="fa"?ibe():t==="ar"?abe():t==="es"?obe():t==="hi"?cbe():rbe()}),ube=()=>"Open sub-agent transcript",_be=()=>"打开子智能体记录",fbe=()=>"باز کردن متن گفت‌وگوی عامل فرعی",dbe=()=>"فتح سجل محادثة الوكيل الفرعي",hbe=()=>"Abrir la transcripción del subagente",pbe=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",mbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_be():t==="fa"?fbe():t==="ar"?dbe():t==="es"?hbe():t==="hi"?pbe():ube()}),gbe=()=>"About this demo",vbe=()=>"关于此演示",bbe=()=>"دربارهٔ این نسخهٔ نمایشی",ybe=()=>"حول هذا العرض التوضيحي",xbe=()=>"Acerca de esta demo",wbe=()=>"इस डेमो के बारे में",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vbe():t==="fa"?bbe():t==="ar"?ybe():t==="es"?xbe():t==="hi"?wbe():gbe()}),kbe=()=>"Accept and auto mode",Sbe=()=>"接受并使用自动模式",Cbe=()=>"پذیرش و حالت خودکار",Ebe=()=>"قبول وتفعيل الوضع التلقائي",Nbe=()=>"Aceptar en modo automático",zbe=()=>"स्वीकार करें और ऑटो मोड",jbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sbe():t==="fa"?Cbe():t==="ar"?Ebe():t==="es"?Nbe():t==="hi"?zbe():kbe()}),Abe=()=>"Accept and bypass all",Tbe=()=>"接受并跳过所有审批",Rbe=()=>"پذیرش و عبور از همهٔ تأییدها",Mbe=()=>"القبول وتجاوز الكل",Obe=()=>"Aceptar y omitir permisos",Dbe=()=>"स्वीकार करें और सब बायपास करें",Lbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tbe():t==="fa"?Rbe():t==="ar"?Mbe():t==="es"?Obe():t==="hi"?Dbe():Abe()}),Ibe=()=>"Active",$be=()=>"活跃",Bbe=()=>"فعال",Pbe=()=>"نشط",Fbe=()=>"Activas",Hbe=()=>"सक्रिय",qbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$be():t==="fa"?Bbe():t==="ar"?Pbe():t==="es"?Fbe():t==="hi"?Hbe():Ibe()}),Ube=()=>"All",Gbe=()=>"全部",Vbe=()=>"همه",Kbe=()=>"الكل",Wbe=()=>"Todas",Qbe=()=>"सभी",Xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbe():t==="fa"?Vbe():t==="ar"?Kbe():t==="es"?Wbe():t==="hi"?Qbe():Ube()}),Ybe=()=>"Allow",Zbe=()=>"允许",Jbe=()=>"اجازه دادن",eye=()=>"السماح",tye=()=>"Permitir",nye=()=>"अनुमति दें",rye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zbe():t==="fa"?Jbe():t==="ar"?eye():t==="es"?tye():t==="hi"?nye():Ybe()}),sye=()=>"Approval required",iye=()=>"需要批准",aye=()=>"نیازمند تأیید",oye=()=>"الموافقة مطلوبة",cye=()=>"Aprobación necesaria",lye=()=>"स्वीकृति ज़रूरी है",uye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iye():t==="fa"?aye():t==="ar"?oye():t==="es"?cye():t==="hi"?lye():sye()}),_ye=()=>"Archived",fye=()=>"已归档",dye=()=>"بایگانی‌شده",hye=()=>"مؤرشف",pye=()=>"Archivadas",mye=()=>"आर्काइव किया गया",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fye():t==="fa"?dye():t==="ar"?hye():t==="es"?pye():t==="hi"?mye():_ye()}),gye=()=>"Ask about this",vye=()=>"询问此内容",bye=()=>"دربارهٔ این بپرسید",yye=()=>"اسأل عن هذا",xye=()=>"Preguntar sobre esto",wye=()=>"इसके बारे में पूछें",kye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vye():t==="fa"?bye():t==="ar"?yye():t==="es"?xye():t==="hi"?wye():gye()}),Sye=()=>"Attach a PDF or image",Cye=()=>"附加 PDF 或图片",Eye=()=>"پیوست PDF یا تصویر",Nye=()=>"إرفاق ملف PDF أو صورة",zye=()=>"Adjuntar un PDF o una imagen",jye=()=>"PDF या इमेज अटैच करें",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cye():t==="fa"?Eye():t==="ar"?Nye():t==="es"?zye():t==="hi"?jye():Sye()}),Aye=()=>"Bash",Tye=()=>"Bash",Rye=()=>"Bash",Mye=()=>"Bash",Oye=()=>"Bash",Dye=()=>"Bash",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tye():t==="fa"?Rye():t==="ar"?Mye():t==="es"?Oye():t==="hi"?Dye():Aye()}),Lye=()=>"Browsed the web",Iye=()=>"已浏览网页",$ye=()=>"وب مرور شد",Bye=()=>"تصفّح الويب",Pye=()=>"Navegó por la web",Fye=()=>"वेब ब्राउज़ किया",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iye():t==="fa"?$ye():t==="ar"?Bye():t==="es"?Pye():t==="hi"?Fye():Lye()}),Hye=()=>"Built the project",qye=()=>"已构建项目",Uye=()=>"پروژه ساخته شد",Gye=()=>"بنى المشروع",Vye=()=>"Compiló el proyecto",Kye=()=>"प्रोजेक्ट बिल्ड किया",Wye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qye():t==="fa"?Uye():t==="ar"?Gye():t==="es"?Vye():t==="hi"?Kye():Hye()}),Qye=()=>"Cancel",Xye=()=>"取消",Yye=()=>"لغو",Zye=()=>"إلغاء",Jye=()=>"Cancelar",exe=()=>"रद्द करें",txe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xye():t==="fa"?Yye():t==="ar"?Zye():t==="es"?Jye():t==="hi"?exe():Qye()}),nxe=()=>"Cancelled an experiment run",rxe=()=>"已取消实验运行",sxe=()=>"اجرای آزمایش لغو شد",ixe=()=>"ألغى تشغيل تجربة",axe=()=>"Canceló una ejecución de experimento",oxe=()=>"एक प्रयोग रन रद्द किया",cxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rxe():t==="fa"?sxe():t==="ar"?ixe():t==="es"?axe():t==="hi"?oxe():nxe()}),lxe=()=>"Checked code style",uxe=()=>"已检查代码风格",_xe=()=>"سبک کد بررسی شد",fxe=()=>"فحص نمط الشيفرة",dxe=()=>"Revisó el estilo del código",hxe=()=>"कोड स्टाइल जाँची",pxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uxe():t==="fa"?_xe():t==="ar"?fxe():t==="es"?dxe():t==="hi"?hxe():lxe()}),mxe=()=>"Checked compute options",gxe=()=>"已检查算力选项",vxe=()=>"گزینه‌های رایانشی بررسی شد",bxe=()=>"فحص خيارات الحوسبة",yxe=()=>"Consultó las opciones de cómputo",xxe=()=>"कंप्यूट विकल्प जाँचे",wxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gxe():t==="fa"?vxe():t==="ar"?bxe():t==="es"?yxe():t==="hi"?xxe():mxe()}),kxe=()=>"Checked experiment status",Sxe=()=>"已检查实验状态",Cxe=()=>"وضعیت آزمایش بررسی شد",Exe=()=>"فحص حالة التجربة",Nxe=()=>"Consultó el estado del experimento",zxe=()=>"प्रयोग की स्थिति जाँची",RN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxe():t==="fa"?Cxe():t==="ar"?Exe():t==="es"?Nxe():t==="hi"?zxe():kxe()}),jxe=()=>"Checked Git status",Axe=()=>"已检查 Git 状态",Txe=()=>"وضعیت Git بررسی شد",Rxe=()=>"فحص حالة Git",Mxe=()=>"Consultó el estado de Git",Oxe=()=>"Git स्थिति जाँची",Dxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Axe():t==="fa"?Txe():t==="ar"?Rxe():t==="es"?Mxe():t==="hi"?Oxe():jxe()}),Lxe=()=>"Checked local times",Ixe=()=>"已查询当地时间",$xe=()=>"زمان‌های محلی بررسی شد",Bxe=()=>"فحص التوقيتات المحلية",Pxe=()=>"Consultó horas locales",Fxe=()=>"स्थानीय समय जाँचे",Hxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ixe():t==="fa"?$xe():t==="ar"?Bxe():t==="es"?Pxe():t==="hi"?Fxe():Lxe()}),qxe=()=>"Checked market data",Uxe=()=>"已查询市场数据",Gxe=()=>"داده‌های بازار بررسی شد",Vxe=()=>"فحص بيانات السوق",Kxe=()=>"Consultó datos de mercado",Wxe=()=>"बाज़ार डेटा जाँचा",Qxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uxe():t==="fa"?Gxe():t==="ar"?Vxe():t==="es"?Kxe():t==="hi"?Wxe():qxe()}),Xxe=()=>"Checked sports data",Yxe=()=>"已查询体育数据",Zxe=()=>"داده‌های ورزشی بررسی شد",Jxe=()=>"فحص البيانات الرياضية",e2e=()=>"Consultó datos deportivos",t2e=()=>"खेल डेटा जाँचा",n2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxe():t==="fa"?Zxe():t==="ar"?Jxe():t==="es"?e2e():t==="hi"?t2e():Xxe()}),r2e=()=>"Checked the weather",s2e=()=>"已查询天气",i2e=()=>"آب‌وهوا بررسی شد",a2e=()=>"فحص حالة الطقس",o2e=()=>"Consultó el tiempo",c2e=()=>"मौसम जाँचा",l2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s2e():t==="fa"?i2e():t==="ar"?a2e():t==="es"?o2e():t==="hi"?c2e():r2e()}),u2e=()=>"Checked types",_2e=()=>"已检查类型",f2e=()=>"نوع‌ها بررسی شد",d2e=()=>"فحص الأنواع",h2e=()=>"Comprobó los tipos",p2e=()=>"टाइप जाँचे",m2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_2e():t==="fa"?f2e():t==="ar"?d2e():t==="es"?h2e():t==="hi"?p2e():u2e()}),g2e=()=>"Clear annotations",v2e=()=>"清除批注",b2e=()=>"پاک کردن یادداشت‌ها",y2e=()=>"مسح التعليقات",x2e=()=>"Borrar anotaciones",w2e=()=>"एनोटेशन साफ़ करें",MN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v2e():t==="fa"?b2e():t==="ar"?y2e():t==="es"?x2e():t==="hi"?w2e():g2e()}),k2e=e=>`Clear the goal: ${e==null?void 0:e.goal}`,S2e=e=>`清除目标:${e==null?void 0:e.goal}`,C2e=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,E2e=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,N2e=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,z2e=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,ON=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?S2e(e):t==="fa"?C2e(e):t==="ar"?E2e(e):t==="es"?N2e(e):t==="hi"?z2e(e):k2e(e)}),j2e=()=>"Customize",A2e=()=>"自定义",T2e=()=>"سفارشی‌سازی",R2e=()=>"تخصيص",M2e=()=>"Personalizar",O2e=()=>"कस्टमाइज़ करें",D2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2e():t==="fa"?T2e():t==="ar"?R2e():t==="es"?M2e():t==="hi"?O2e():j2e()}),L2e=()=>"Data sources",I2e=()=>"数据源",$2e=()=>"منابع داده",B2e=()=>"مصادر البيانات",P2e=()=>"Fuentes de datos",F2e=()=>"डेटा स्रोत",yw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I2e():t==="fa"?$2e():t==="ar"?B2e():t==="es"?P2e():t==="hi"?F2e():L2e()}),H2e=()=>"Delegated a task to a new agent",q2e=()=>"已将任务委派给新智能体",U2e=()=>"وظیفه به عامل جدید واگذار شد",G2e=()=>"فوّض مهمة إلى وكيل جديد",V2e=()=>"Delegó una tarea a un nuevo agente",K2e=()=>"एक नए एजेंट को टास्क सौंपा",W2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2e():t==="fa"?U2e():t==="ar"?G2e():t==="es"?V2e():t==="hi"?K2e():H2e()}),Q2e=()=>"Delete",X2e=()=>"删除",Y2e=()=>"حذف",Z2e=()=>"حذف",J2e=()=>"Eliminar",ewe=()=>"हटाएं",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2e():t==="fa"?Y2e():t==="ar"?Z2e():t==="es"?J2e():t==="hi"?ewe():Q2e()}),twe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",nwe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",rwe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",swe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",iwe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",awe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",owe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nwe():t==="fa"?rwe():t==="ar"?swe():t==="es"?iwe():t==="hi"?awe():twe()}),cwe=()=>"to monitor it.",lwe=()=>"以查看进度。",uwe=()=>"بزنید.",_we=()=>"لمتابعتها.",fwe=()=>"para seguirlo.",dwe=()=>"इस पर नज़र रखने के लिए।",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lwe():t==="fa"?uwe():t==="ar"?_we():t==="es"?fwe():t==="hi"?dwe():cwe()}),hwe=()=>"The experiment is now running. Tap",pwe=()=>"实验正在运行。点按",mwe=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",gwe=()=>"التجربة قيد التشغيل الآن. اضغط على",vwe=()=>"El experimento ya se está ejecutando. Pulsa",bwe=()=>"प्रयोग अब चल रहा है। टैप करें",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwe():t==="fa"?mwe():t==="ar"?gwe():t==="es"?vwe():t==="hi"?bwe():hwe()}),ywe=()=>"Deny",xwe=()=>"拒绝",wwe=()=>"رد کردن",kwe=()=>"رفض",Swe=()=>"Denegar",Cwe=()=>"अस्वीकार करें",Ewe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xwe():t==="fa"?wwe():t==="ar"?kwe():t==="es"?Swe():t==="hi"?Cwe():ywe()}),Nwe=()=>"Dismiss",zwe=()=>"关闭",jwe=()=>"بستن",Awe=()=>"إغلاق",Twe=()=>"Cerrar",Rwe=()=>"खारिज करें",k1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwe():t==="fa"?jwe():t==="ar"?Awe():t==="es"?Twe():t==="hi"?Rwe():Nwe()}),Mwe=()=>"Edit and re-send",Owe=()=>"编辑并重新发送",Dwe=()=>"ویرایش و ارسال دوباره",Lwe=()=>"تعديل وإعادة الإرسال",Iwe=()=>"Editar y reenviar",$we=()=>"संपादित करें और फिर भेजें",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Owe():t==="fa"?Dwe():t==="ar"?Lwe():t==="es"?Iwe():t==="hi"?$we():Mwe()}),Bwe=()=>"Edit message",Pwe=()=>"编辑消息",Fwe=()=>"ویرایش پیام",Hwe=()=>"تعديل الرسالة",qwe=()=>"Editar mensaje",Uwe=()=>"संदेश संपादित करें",Gwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pwe():t==="fa"?Fwe():t==="ar"?Hwe():t==="es"?qwe():t==="hi"?Uwe():Bwe()}),Vwe=()=>"Edited a file",Kwe=()=>"已编辑文件",Wwe=()=>"فایل ویرایش شد",Qwe=()=>"عدّل ملفًا",Xwe=()=>"Editó un archivo",Ywe=()=>"एक फ़ाइल संपादित की",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kwe():t==="fa"?Wwe():t==="ar"?Qwe():t==="es"?Xwe():t==="hi"?Ywe():Vwe()}),Zwe=()=>"Exit Bash mode",Jwe=()=>"退出 Bash 模式",e4e=()=>"خروج از حالت Bash",t4e=()=>"الخروج من وضع Bash",n4e=()=>"Salir del modo Bash",r4e=()=>"Bash मोड से बाहर निकलें",BN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jwe():t==="fa"?e4e():t==="ar"?t4e():t==="es"?n4e():t==="hi"?r4e():Zwe()}),s4e=()=>"Exit Plan mode",i4e=()=>"退出计划模式",a4e=()=>"خروج از حالت طرح",o4e=()=>"الخروج من وضع التخطيط",c4e=()=>"Salir del modo Plan",l4e=()=>"प्लान मोड से बाहर निकलें",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i4e():t==="fa"?a4e():t==="ar"?o4e():t==="es"?c4e():t==="hi"?l4e():s4e()}),u4e=()=>"Failed:",_4e=()=>"失败:",f4e=()=>"ناموفق:",d4e=()=>"فشل:",h4e=()=>"Error:",p4e=()=>"विफल:",SS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_4e():t==="fa"?f4e():t==="ar"?d4e():t==="es"?h4e():t==="hi"?p4e():u4e()}),m4e=()=>"Filter sessions",g4e=()=>"筛选会话",v4e=()=>"فیلتر نشست‌ها",b4e=()=>"تصفية الجلسات",y4e=()=>"Filtrar sesiones",x4e=()=>"सेशन फ़िल्टर करें",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g4e():t==="fa"?v4e():t==="ar"?b4e():t==="es"?y4e():t==="hi"?x4e():m4e()}),w4e=()=>"Goal",k4e=()=>"目标",S4e=()=>"هدف",C4e=()=>"الهدف",E4e=()=>"Objetivo",N4e=()=>"लक्ष्य",z4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k4e():t==="fa"?S4e():t==="ar"?C4e():t==="es"?E4e():t==="hi"?N4e():w4e()}),j4e=()=>"is unavailable.",A4e=()=>"不可用。",T4e=()=>"در دسترس نیست.",R4e=()=>"غير متاح.",M4e=()=>"no está disponible.",O4e=()=>"उपलब्ध नहीं है।",D4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A4e():t==="fa"?T4e():t==="ar"?R4e():t==="es"?M4e():t==="hi"?O4e():j4e()}),L4e=()=>"Later queued messages will wait until this is retried or removed.",I4e=()=>"后续排队的消息会等待此消息重试或移除。",$4e=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",B4e=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",P4e=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",F4e=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",H4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I4e():t==="fa"?$4e():t==="ar"?B4e():t==="es"?P4e():t==="hi"?F4e():L4e()}),q4e=()=>"Listed files",U4e=()=>"已列出文件",G4e=()=>"فایل‌ها فهرست شد",V4e=()=>"سرد الملفات",K4e=()=>"Listó archivos",W4e=()=>"फ़ाइलों की सूची बनाई",HN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U4e():t==="fa"?G4e():t==="ar"?V4e():t==="es"?K4e():t==="hi"?W4e():q4e()}),Q4e=()=>"Listed project runs",X4e=()=>"已列出项目运行",Y4e=()=>"اجراهای پروژه فهرست شد",Z4e=()=>"سرد عمليات تشغيل المشروع",J4e=()=>"Listó las ejecuciones del proyecto",e3e=()=>"प्रोजेक्ट रन की सूची बनाई",t3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X4e():t==="fa"?Y4e():t==="ar"?Z4e():t==="es"?J4e():t==="hi"?e3e():Q4e()}),n3e=()=>"Listed projects",r3e=()=>"已列出项目",s3e=()=>"پروژه‌ها فهرست شد",i3e=()=>"سرد المشاريع",a3e=()=>"Listó proyectos",o3e=()=>"प्रोजेक्ट की सूची बनाई",c3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r3e():t==="fa"?s3e():t==="ar"?i3e():t==="es"?a3e():t==="hi"?o3e():n3e()}),l3e=()=>"Loading conversation…",u3e=()=>"正在加载对话…",_3e=()=>"در حال بارگیری گفتگو…",f3e=()=>"جارٍ تحميل المحادثة…",d3e=()=>"Cargando conversación…",h3e=()=>"बातचीत लोड हो रही है…",qN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u3e():t==="fa"?_3e():t==="ar"?f3e():t==="es"?d3e():t==="hi"?h3e():l3e()}),p3e=()=>"New Chat",m3e=()=>"新对话",g3e=()=>"گفتگوی جدید",v3e=()=>"محادثة جديدة",b3e=()=>"Nuevo chat",y3e=()=>"नई चैट",D3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m3e():t==="fa"?g3e():t==="ar"?v3e():t==="es"?b3e():t==="hi"?y3e():p3e()}),x3e=()=>"Next version",w3e=()=>"下一版本",k3e=()=>"نسخهٔ بعدی",S3e=()=>"النسخة التالية",C3e=()=>"Siguiente versión",E3e=()=>"अगला वर्शन",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w3e():t==="fa"?k3e():t==="ar"?S3e():t==="es"?C3e():t==="hi"?E3e():x3e()}),N3e=()=>"Open the session this agent spawned",z3e=()=>"打开此智能体创建的会话",j3e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",A3e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",T3e=()=>"Abrir la sesión que creó este agente",R3e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",M3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z3e():t==="fa"?j3e():t==="ar"?A3e():t==="es"?T3e():t==="hi"?R3e():N3e()}),O3e=()=>"Opened web pages",D3e=()=>"已打开网页",L3e=()=>"صفحه‌های وب باز شد",I3e=()=>"فتح صفحات ويب",$3e=()=>"Abrió páginas web",B3e=()=>"वेब पेज खोले",P3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D3e():t==="fa"?L3e():t==="ar"?I3e():t==="es"?$3e():t==="hi"?B3e():O3e()}),F3e=()=>"Plan",H3e=()=>"计划",q3e=()=>"طرح",U3e=()=>"خطة",G3e=()=>"Plan",V3e=()=>"प्लान",K3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H3e():t==="fa"?q3e():t==="ar"?U3e():t==="es"?G3e():t==="hi"?V3e():F3e()}),W3e=()=>"Plan approved",Q3e=()=>"计划已批准",X3e=()=>"طرح تأیید شد",Y3e=()=>"تمت الموافقة على الخطة",Z3e=()=>"Plan aprobado",J3e=()=>"प्लान स्वीकृत",e5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q3e():t==="fa"?X3e():t==="ar"?Y3e():t==="es"?Z3e():t==="hi"?J3e():W3e()}),t5e=()=>"Plan rejected",n5e=()=>"计划已拒绝",r5e=()=>"طرح رد شد",s5e=()=>"رُفضت الخطة",i5e=()=>"Plan rechazado",a5e=()=>"प्लान अस्वीकृत",o5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n5e():t==="fa"?r5e():t==="ar"?s5e():t==="es"?i5e():t==="hi"?a5e():t5e()}),c5e=()=>"Plan resolved",l5e=()=>"计划已处理",u5e=()=>"طرح تعیین تکلیف شد",_5e=()=>"تمت معالجة الخطة",f5e=()=>"Plan resuelto",d5e=()=>"प्लान सुलझाया गया",h5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l5e():t==="fa"?u5e():t==="ar"?_5e():t==="es"?f5e():t==="hi"?d5e():c5e()}),p5e=()=>"Plan revision requested",m5e=()=>"已请求修改计划",g5e=()=>"درخواست بازنگری طرح ثبت شد",v5e=()=>"طُلب تعديل الخطة",b5e=()=>"Cambios en el plan solicitados",y5e=()=>"प्लान में बदलाव का अनुरोध",x5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m5e():t==="fa"?g5e():t==="ar"?v5e():t==="es"?b5e():t==="hi"?y5e():p5e()}),w5e=()=>"Previous version",k5e=()=>"上一版本",S5e=()=>"نسخهٔ قبلی",C5e=()=>"النسخة السابقة",E5e=()=>"Versión anterior",N5e=()=>"पिछला वर्शन",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k5e():t==="fa"?S5e():t==="ar"?C5e():t==="es"?E5e():t==="hi"?N5e():w5e()}),z5e=()=>"Ran a command",j5e=()=>"已运行命令",A5e=()=>"فرمان اجرا شد",T5e=()=>"نفّذ أمرًا",R5e=()=>"Ejecutó un comando",M5e=()=>"एक कमांड चलाई",O5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j5e():t==="fa"?A5e():t==="ar"?T5e():t==="es"?R5e():t==="hi"?M5e():z5e()}),D5e=()=>"Ran tests",L5e=()=>"已运行测试",I5e=()=>"آزمون‌ها اجرا شد",$5e=()=>"شغّل الاختبارات",B5e=()=>"Ejecutó tests",P5e=()=>"टेस्ट चलाए",F5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L5e():t==="fa"?I5e():t==="ar"?$5e():t==="es"?B5e():t==="hi"?P5e():D5e()}),H5e=()=>"Read a file",q5e=()=>"已读取文件",U5e=()=>"فایل خوانده شد",G5e=()=>"قرأ ملفًا",V5e=()=>"Leyó un archivo",K5e=()=>"एक फ़ाइल पढ़ी",W5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q5e():t==="fa"?U5e():t==="ar"?G5e():t==="es"?V5e():t==="hi"?K5e():H5e()}),Q5e=()=>"Read Git history",X5e=()=>"已读取 Git 历史",Y5e=()=>"تاریخچهٔ Git خوانده شد",Z5e=()=>"قرأ سجل Git",J5e=()=>"Leyó el historial de Git",eke=()=>"Git इतिहास पढ़ा",tke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X5e():t==="fa"?Y5e():t==="ar"?Z5e():t==="es"?J5e():t==="hi"?eke():Q5e()}),nke=()=>"Read project details",rke=()=>"已读取项目详情",ske=()=>"جزئیات پروژه خوانده شد",ike=()=>"قرأ تفاصيل المشروع",ake=()=>"Leyó los detalles del proyecto",oke=()=>"प्रोजेक्ट विवरण पढ़ा",cke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rke():t==="fa"?ske():t==="ar"?ike():t==="es"?ake():t==="hi"?oke():nke()}),lke=()=>"Reject",uke=()=>"拒绝",_ke=()=>"رد کردن",fke=()=>"رفض",dke=()=>"Rechazar",hke=()=>"अस्वीकार करें",pke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uke():t==="fa"?_ke():t==="ar"?fke():t==="es"?dke():t==="hi"?hke():lke()}),mke=()=>"Remove",gke=()=>"移除",vke=()=>"حذف",bke=()=>"إزالة",yke=()=>"Quitar",xke=()=>"हटाएं",wke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gke():t==="fa"?vke():t==="ar"?bke():t==="es"?yke():t==="hi"?xke():mke()}),kke=()=>"Remove annotation",Ske=()=>"移除批注",Cke=()=>"حذف یادداشت",Eke=()=>"إزالة التعليق",Nke=()=>"Quitar anotación",zke=()=>"एनोटेशन हटाएं",jke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ske():t==="fa"?Cke():t==="ar"?Eke():t==="es"?Nke():t==="hi"?zke():kke()}),Ake=()=>"Remove file",Tke=()=>"移除文件",Rke=()=>"حذف فایل",Mke=()=>"إزالة الملف",Oke=()=>"Quitar archivo",Dke=()=>"फ़ाइल हटाएं",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tke():t==="fa"?Rke():t==="ar"?Mke():t==="es"?Oke():t==="hi"?Dke():Ake()}),Lke=()=>"Remove image",Ike=()=>"移除图片",$ke=()=>"حذف تصویر",Bke=()=>"إزالة الصورة",Pke=()=>"Quitar imagen",Fke=()=>"इमेज हटाएं",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ike():t==="fa"?$ke():t==="ar"?Bke():t==="es"?Pke():t==="hi"?Fke():Lke()}),Hke=()=>"Remove queued message",qke=()=>"移除排队消息",Uke=()=>"حذف پیام صف",Gke=()=>"إزالة الرسالة من قائمة الانتظار",Vke=()=>"Quitar mensaje en cola",Kke=()=>"कतार में लगा संदेश हटाएं",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qke():t==="fa"?Uke():t==="ar"?Gke():t==="es"?Vke():t==="hi"?Kke():Hke()}),Wke=()=>"Rename",Qke=()=>"重命名",Xke=()=>"تغییر نام",Yke=()=>"إعادة تسمية",Zke=()=>"Renombrar",Jke=()=>"नाम बदलें",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qke():t==="fa"?Xke():t==="ar"?Yke():t==="es"?Zke():t==="hi"?Jke():Wke()}),eSe=()=>"Reviewed code changes",tSe=()=>"已审查代码更改",nSe=()=>"تغییرات کد بازبینی شد",rSe=()=>"راجع تغييرات الشيفرة",sSe=()=>"Revisó cambios en el código",iSe=()=>"कोड में बदलावों की समीक्षा की",aSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tSe():t==="fa"?nSe():t==="ar"?rSe():t==="es"?sSe():t==="hi"?iSe():eSe()}),oSe=()=>"Run",cSe=()=>"运行",lSe=()=>"اجرا",uSe=()=>"تشغيل",_Se=()=>"Ejecutar",fSe=()=>"रन",QN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cSe():t==="fa"?lSe():t==="ar"?uSe():t==="es"?_Se():t==="hi"?fSe():oSe()}),dSe=()=>"Selected chat text",hSe=()=>"已选聊天文本",pSe=()=>"متن انتخاب‌شدهٔ گفتگو",mSe=()=>"النص المحدد من المحادثة",gSe=()=>"Texto seleccionado del chat",vSe=()=>"चयनित चैट टेक्स्ट",bSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hSe():t==="fa"?pSe():t==="ar"?mSe():t==="es"?gSe():t==="hi"?vSe():dSe()}),ySe=()=>"Selected text:",xSe=()=>"已选文本:",wSe=()=>"متن انتخاب‌شده:",kSe=()=>"النص المحدد:",SSe=()=>"Texto seleccionado:",CSe=()=>"चयनित टेक्स्ट:",ESe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xSe():t==="fa"?wSe():t==="ar"?kSe():t==="es"?SSe():t==="hi"?CSe():ySe()}),NSe=()=>"Send",zSe=()=>"发送",jSe=()=>"ارسال",ASe=()=>"إرسال رسالة",TSe=()=>"Enviar",RSe=()=>"भेजें",L3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zSe():t==="fa"?jSe():t==="ar"?ASe():t==="es"?TSe():t==="hi"?RSe():NSe()}),MSe=()=>"Session options",OSe=()=>"会话选项",DSe=()=>"گزینه‌های نشست",LSe=()=>"خيارات الجلسة",ISe=()=>"Opciones de la sesión",$Se=()=>"सेशन विकल्प",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OSe():t==="fa"?DSe():t==="ar"?LSe():t==="es"?ISe():t==="hi"?$Se():MSe()}),BSe=()=>"Session title",PSe=()=>"会话标题",FSe=()=>"عنوان نشست",HSe=()=>"عنوان الجلسة",qSe=()=>"Título de la sesión",USe=()=>"सेशन शीर्षक",GSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PSe():t==="fa"?FSe():t==="ar"?HSe():t==="es"?qSe():t==="hi"?USe():BSe()}),VSe=()=>"Show sidebar",KSe=()=>"显示侧边栏",WSe=()=>"نمایش نوار کناری",QSe=()=>"إظهار الشريط الجانبي",XSe=()=>"Mostrar barra lateral",YSe=()=>"साइडबार दिखाएं",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KSe():t==="fa"?WSe():t==="ar"?QSe():t==="es"?XSe():t==="hi"?YSe():VSe()}),ZSe=()=>"Started an experiment run",JSe=()=>"已启动实验运行",e6e=()=>"اجرای آزمایش آغاز شد",t6e=()=>"بدأ تشغيل تجربة",n6e=()=>"Inició una ejecución de experimento",r6e=()=>"एक प्रयोग रन शुरू किया",s6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JSe():t==="fa"?e6e():t==="ar"?t6e():t==="es"?n6e():t==="hi"?r6e():ZSe()}),i6e=()=>"I have a rough idea I want to explore. Ask me questions until we have a concrete, testable research question and a plan for the first experiment.",a6e=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",o6e=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",c6e=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",l6e=()=>"Tengo una idea inicial que quiero explorar. Hazme preguntas hasta que tengamos una pregunta de investigación concreta y comprobable y un plan para el primer experimento.",u6e=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",_6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a6e():t==="fa"?o6e():t==="ar"?c6e():t==="es"?l6e():t==="hi"?u6e():i6e()}),f6e=()=>"Shape a research question",d6e=()=>"明确研究问题",h6e=()=>"شکل دادن به پرسش پژوهشی",p6e=()=>"صياغة سؤال بحثي",m6e=()=>"Definir una pregunta de investigación",g6e=()=>"एक शोध प्रश्न तैयार करें",v6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d6e():t==="fa"?h6e():t==="ar"?p6e():t==="es"?m6e():t==="hi"?g6e():f6e()}),b6e=()=>"Ask me for a topic, then search the literature on it, summarize the strongest baselines and open problems, and suggest where a small experiment could contribute.",y6e=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",x6e=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",w6e=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",k6e=()=>"Pregúntame por un tema, busca publicaciones sobre él, resume los métodos de referencia más sólidos y los problemas abiertos, y sugiere dónde podría aportar un pequeño experimento.",S6e=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",C6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y6e():t==="fa"?x6e():t==="ar"?w6e():t==="es"?k6e():t==="hi"?S6e():b6e()}),E6e=()=>"Survey related work",N6e=()=>"调研相关工作",z6e=()=>"مرور کارهای مرتبط",j6e=()=>"استعراض الأعمال ذات الصلة",A6e=()=>"Revisar trabajos relacionados",T6e=()=>"संबंधित कार्य का सर्वेक्षण करें",R6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N6e():t==="fa"?z6e():t==="ar"?j6e():t==="es"?A6e():t==="hi"?T6e():E6e()}),M6e=()=>"Set up a minimal training script with a config, dependencies, and a run command that trains a small model end to end in a few minutes on one GPU.",O6e=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",D6e=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",L6e=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",I6e=()=>"Prepara un script de entrenamiento mínimo con configuración, dependencias y un comando de ejecución que entrene un modelo pequeño de principio a fin en unos minutos con una GPU.",$6e=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",B6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O6e():t==="fa"?D6e():t==="ar"?L6e():t==="es"?I6e():t==="hi"?$6e():M6e()}),P6e=()=>"Scaffold a baseline",F6e=()=>"搭建基线",H6e=()=>"ساخت خط مبنا",q6e=()=>"بناء خط أساس",U6e=()=>"Crear un modelo de referencia",G6e=()=>"एक बेसलाइन तैयार करें",V6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F6e():t==="fa"?H6e():t==="ar"?q6e():t==="es"?U6e():t==="hi"?G6e():P6e()}),K6e=()=>"Pick one cheap, well-defined hypothesis from our plan, implement it as a variant of the baseline, and launch a first run to compare the two.",W6e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",Q6e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",X6e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",Y6e=()=>"Elige una hipótesis de nuestro plan que sea económica de probar y esté bien definida, impleméntala como una variante del modelo de referencia e inicia una primera ejecución para comparar ambas versiones.",Z6e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",J6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W6e():t==="fa"?Q6e():t==="ar"?X6e():t==="es"?Y6e():t==="hi"?Z6e():K6e()}),eCe=()=>"Run a first experiment",tCe=()=>"运行第一个实验",nCe=()=>"اجرای اولین آزمایش",rCe=()=>"تشغيل التجربة الأولى",sCe=()=>"Ejecutar un primer experimento",iCe=()=>"पहला प्रयोग चलाएं",aCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tCe():t==="fa"?nCe():t==="ar"?rCe():t==="es"?sCe():t==="hi"?iCe():eCe()}),oCe=()=>"Reading the project to suggest where to start…",cCe=()=>"正在阅读项目以建议从哪里开始…",lCe=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",uCe=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",_Ce=()=>"Leyendo el proyecto para sugerir por dónde empezar…",fCe=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",dCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cCe():t==="fa"?lCe():t==="ar"?uCe():t==="es"?_Ce():t==="hi"?fCe():oCe()}),hCe=()=>"Starter prompts",pCe=()=>"入门提示",mCe=()=>"پیشنهادهای شروع",gCe=()=>"اقتراحات للبدء",vCe=()=>"Prompts para empezar",bCe=()=>"शुरुआती प्रॉम्प्ट",yCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pCe():t==="fa"?mCe():t==="ar"?gCe():t==="es"?vCe():t==="hi"?bCe():hCe()}),xCe=()=>"Stop",wCe=()=>"停止",kCe=()=>"توقف",SCe=()=>"إيقاف",CCe=()=>"Detener",ECe=()=>"रोकें",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wCe():t==="fa"?kCe():t==="ar"?SCe():t==="es"?CCe():t==="hi"?ECe():xCe()}),NCe=()=>"Submit",zCe=()=>"提交",jCe=()=>"ارسال",ACe=()=>"إرسال",TCe=()=>"Enviar",RCe=()=>"सबमिट करें",MCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zCe():t==="fa"?jCe():t==="ar"?ACe():t==="es"?TCe():t==="hi"?RCe():NCe()}),OCe=()=>"Tool failed",DCe=()=>"工具失败",LCe=()=>"ابزار ناموفق بود",ICe=()=>"فشلت الأداة",$Ce=()=>"Error en la herramienta",BCe=()=>"टूल विफल",PCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DCe():t==="fa"?LCe():t==="ar"?ICe():t==="es"?$Ce():t==="hi"?BCe():OCe()}),FCe=()=>"Used tools",HCe=()=>"已使用工具",qCe=()=>"ابزارها استفاده شد",UCe=()=>"استخدم الأدوات",GCe=()=>"Usó herramientas",VCe=()=>"टूल इस्तेमाल किए",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HCe():t==="fa"?qCe():t==="ar"?UCe():t==="es"?GCe():t==="hi"?VCe():FCe()}),KCe=()=>"View full plan",WCe=()=>"查看完整计划",QCe=()=>"مشاهدهٔ طرح کامل",XCe=()=>"عرض الخطة كاملة",YCe=()=>"Ver plan completo",ZCe=()=>"पूरा प्लान देखें",JCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WCe():t==="fa"?QCe():t==="ar"?XCe():t==="es"?YCe():t==="hi"?ZCe():KCe()}),e7e=()=>"Waited for an experiment run",t7e=()=>"已等待实验运行",n7e=()=>"برای اجرای آزمایش صبر شد",r7e=()=>"انتظر تشغيل تجربة",s7e=()=>"Esperó a una ejecución de experimento",i7e=()=>"एक प्रयोग रन का इंतज़ार किया",a7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t7e():t==="fa"?n7e():t==="ar"?r7e():t==="es"?s7e():t==="hi"?i7e():e7e()}),o7e=()=>"Waiting for your input…",c7e=()=>"正在等待你的输入…",l7e=()=>"منتظر ورودی شما…",u7e=()=>"في انتظار إدخالك…",_7e=()=>"Esperando tu respuesta…",f7e=()=>"आपके इनपुट का इंतज़ार है…",d7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c7e():t==="fa"?l7e():t==="ar"?u7e():t==="es"?_7e():t==="hi"?f7e():o7e()}),h7e=()=>"What should we research?",p7e=()=>"我们应该研究什么?",m7e=()=>"چه چیزی را پژوهش کنیم؟",g7e=()=>"ما الذي نبحثه؟",v7e=()=>"¿Qué investigamos?",b7e=()=>"हमें क्या शोध करना चाहिए?",y7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p7e():t==="fa"?m7e():t==="ar"?g7e():t==="es"?v7e():t==="hi"?b7e():h7e()}),x7e=()=>"You, mid-task",w7e=()=>"你(任务进行中)",k7e=()=>"شما، هنگام انجام وظیفه",S7e=()=>"أنت، أثناء المهمة",C7e=()=>"Tú, durante la tarea",E7e=()=>"आप, टास्क के बीच में",N7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w7e():t==="fa"?k7e():t==="ar"?S7e():t==="es"?C7e():t==="hi"?E7e():x7e()}),z7e=()=>"Pasted image",j7e=()=>"粘贴的图片",A7e=()=>"تصویر جای‌گذاری‌شده",T7e=()=>"صورة ملصقة",R7e=()=>"Imagen pegada",M7e=()=>"पेस्ट की गई इमेज",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j7e():t==="fa"?A7e():t==="ar"?T7e():t==="es"?R7e():t==="hi"?M7e():z7e()}),O7e=()=>"Plan",D7e=()=>"计划",L7e=()=>"طرح",I7e=()=>"خطة",$7e=()=>"Plan",B7e=()=>"प्लान",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D7e():t==="fa"?L7e():t==="ar"?I7e():t==="es"?$7e():t==="hi"?B7e():O7e()}),P7e=()=>"Plan mode — ready to proceed?",F7e=()=>"计划模式 — 准备好继续了吗?",H7e=()=>"حالت طرح — آماده‌اید ادامه دهید؟",q7e=()=>"وضع التخطيط — جاهز للمتابعة؟",U7e=()=>"Modo Plan — ¿listo para continuar?",G7e=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",V7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F7e():t==="fa"?H7e():t==="ar"?q7e():t==="es"?U7e():t==="hi"?G7e():P7e()}),K7e=()=>"Proposed plan",W7e=()=>"提议的计划",Q7e=()=>"طرح پیشنهادی",X7e=()=>"خطة مقترحة",Y7e=()=>"Plan propuesto",Z7e=()=>"प्रस्तावित प्लान",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W7e():t==="fa"?Q7e():t==="ar"?X7e():t==="es"?Y7e():t==="hi"?Z7e():K7e()}),J7e=()=>"Question",e8e=()=>"问题",t8e=()=>"پرسش",n8e=()=>"سؤال",r8e=()=>"Pregunta",s8e=()=>"प्रश्न",i8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e8e():t==="fa"?t8e():t==="ar"?n8e():t==="es"?r8e():t==="hi"?s8e():J7e()}),a8e=()=>"Queued",o8e=()=>"已排队",c8e=()=>"در صف",l8e=()=>"في قائمة الانتظار",u8e=()=>"En cola",_8e=()=>"कतार में",f8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o8e():t==="fa"?c8e():t==="ar"?l8e():t==="es"?u8e():t==="hi"?_8e():a8e()}),d8e=()=>"Recents",h8e=()=>"最近",p8e=()=>"اخیر",m8e=()=>"الأخيرة",g8e=()=>"Recientes",v8e=()=>"हाल की",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h8e():t==="fa"?p8e():t==="ar"?m8e():t==="es"?g8e():t==="hi"?v8e():d8e()}),b8e=()=>"Re-check its setup.",y8e=()=>"请重新检查其设置。",x8e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",w8e=()=>"أعد فحص إعداده.",k8e=()=>"Vuelve a comprobar su configuración.",S8e=()=>"इसका सेटअप फिर से जाँचें।",C8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y8e():t==="fa"?x8e():t==="ar"?w8e():t==="es"?k8e():t==="hi"?S8e():b8e()}),E8e=()=>"Could not recover this turn. Try again.",N8e=()=>"无法恢复本轮。请重试。",z8e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",j8e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",A8e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",T8e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",R8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N8e():t==="fa"?z8e():t==="ar"?j8e():t==="es"?A8e():t==="hi"?T8e():E8e()}),M8e=()=>"Could not remove the queued message. Try again.",O8e=()=>"无法移除排队消息。请重试。",D8e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",L8e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",I8e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",$8e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",B8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O8e():t==="fa"?D8e():t==="ar"?L8e():t==="es"?I8e():t==="hi"?$8e():M8e()}),P8e=e=>`Could not re-send: ${e==null?void 0:e.error}`,F8e=e=>`无法重新发送:${e==null?void 0:e.error}`,H8e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,q8e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,U8e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,G8e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,V8e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?F8e(e):t==="fa"?H8e(e):t==="ar"?q8e(e):t==="es"?U8e(e):t==="hi"?G8e(e):P8e(e)}),K8e=()=>"Resolved",W8e=()=>"已处理",Q8e=()=>"رسیدگی شد",X8e=()=>"مُعالَج",Y8e=()=>"Resuelto",Z8e=()=>"सुलझाया गया",J8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W8e():t==="fa"?Q8e():t==="ar"?X8e():t==="es"?Y8e():t==="hi"?Z8e():K8e()}),e9e=()=>"Could not retry the queued message. Try again.",t9e=()=>"无法重试排队消息。请重试。",n9e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",r9e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",s9e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",i9e=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",a9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t9e():t==="fa"?n9e():t==="ar"?r9e():t==="es"?s9e():t==="hi"?i9e():e9e()}),o9e=()=>"run logs",c9e=()=>"运行日志",l9e=()=>"گزارش‌های اجرا",u9e=()=>"سجلات التشغيل",_9e=()=>"logs de ejecución",f9e=()=>"रन लॉग",d9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c9e():t==="fa"?l9e():t==="ar"?u9e():t==="es"?_9e():t==="hi"?f9e():o9e()}),h9e=()=>"Scroll to bottom",p9e=()=>"滚动到底部",m9e=()=>"رفتن به پایین گفتگو",g9e=()=>"التمرير إلى الأسفل",v9e=()=>"Ir al final",b9e=()=>"नीचे तक स्क्रॉल करें",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p9e():t==="fa"?m9e():t==="ar"?g9e():t==="es"?v9e():t==="hi"?b9e():h9e()}),y9e=()=>"The selected harness is unavailable",x9e=()=>"所选智能体工具不可用",w9e=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",k9e=()=>"أداة البرمجة المحددة غير متاحة",S9e=()=>"El agente seleccionado no está disponible",C9e=()=>"चुना गया हार्नेस उपलब्ध नहीं है",S1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x9e():t==="fa"?w9e():t==="ar"?k9e():t==="es"?S9e():t==="hi"?C9e():y9e()}),E9e=()=>"Session limit reached",N9e=()=>"已达到会话使用限额",z9e=()=>"به سقف مصرف نشست رسیده‌اید",j9e=()=>"تم بلوغ حد الاستخدام",A9e=()=>"Límite de la sesión alcanzado",T9e=()=>"सेशन सीमा पूरी हो गई",R9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N9e():t==="fa"?z9e():t==="ar"?j9e():t==="es"?A9e():t==="hi"?T9e():E9e()}),M9e=()=>"The chat session was not created",O9e=()=>"未能创建聊天会话",D9e=()=>"نشست گفت‌وگو ایجاد نشد",L9e=()=>"لم تُنشأ جلسة المحادثة",I9e=()=>"No se creó la sesión de chat",$9e=()=>"चैट सेशन नहीं बनाया गया",B9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O9e():t==="fa"?D9e():t==="ar"?L9e():t==="es"?I9e():t==="hi"?$9e():M9e()}),P9e=()=>"Show full conversation",F9e=()=>"显示完整对话",H9e=()=>"نمایش کامل گفتگو",q9e=()=>"عرض المحادثة كاملة",U9e=()=>"Mostrar la conversación completa",G9e=()=>"पूरी बातचीत दिखाएं",V9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F9e():t==="fa"?H9e():t==="ar"?q9e():t==="es"?U9e():t==="hi"?G9e():P9e()}),K9e=()=>" · Spawned by another agent",W9e=()=>" · 由另一个智能体创建",Q9e=()=>" · ساخته‌شده به‌دست عامل دیگر",X9e=()=>" · أنشأه وكيل آخر",Y9e=()=>" · Creada por otro agente",Z9e=()=>" · किसी और एजेंट द्वारा शुरू किया गया",J9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W9e():t==="fa"?Q9e():t==="ar"?X9e():t==="es"?Y9e():t==="hi"?Z9e():K9e()}),eEe=()=>"Starting…",tEe=()=>"正在启动…",nEe=()=>"در حال شروع…",rEe=()=>"جارٍ البدء…",sEe=()=>"Iniciando…",iEe=()=>"शुरू हो रहा है…",aEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tEe():t==="fa"?nEe():t==="ar"?rEe():t==="es"?sEe():t==="hi"?iEe():eEe()}),oEe=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,cEe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,lEe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,uEe=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,_Ee=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,fEe=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,dEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cEe(e):t==="fa"?lEe(e):t==="ar"?uEe(e):t==="es"?_Ee(e):t==="hi"?fEe(e):oEe(e)}),hEe=()=>"Could not stop the turn. Try again.",pEe=()=>"无法停止本轮。请重试。",mEe=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",gEe=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",vEe=()=>"No se pudo detener el turno. Inténtalo de nuevo.",bEe=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",yEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pEe():t==="fa"?mEe():t==="ar"?gEe():t==="es"?vEe():t==="hi"?bEe():hEe()}),xEe=e=>`Could not switch fork: ${e==null?void 0:e.error}`,wEe=e=>`无法切换分支:${e==null?void 0:e.error}`,kEe=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,SEe=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,CEe=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,EEe=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,NEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wEe(e):t==="fa"?kEe(e):t==="ar"?SEe(e):t==="es"?CEe(e):t==="hi"?EEe(e):xEe(e)}),zEe=()=>"The agent",jEe=()=>"智能体",AEe=()=>"عامل",TEe=()=>"الوكيل",REe=()=>"El agente",MEe=()=>"एजेंट",OEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jEe():t==="fa"?AEe():t==="ar"?TEe():t==="es"?REe():t==="hi"?MEe():zEe()}),DEe=()=>"Thinking",LEe=()=>"正在思考",IEe=()=>"در حال فکر کردن",$Ee=()=>"جارٍ التفكير",BEe=()=>"Pensando",PEe=()=>"सोच रहा है",FEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LEe():t==="fa"?IEe():t==="ar"?$Ee():t==="es"?BEe():t==="hi"?PEe():DEe()}),HEe=()=>"Could not toggle Plan mode. Try again.",qEe=()=>"无法切换计划模式。请重试。",UEe=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",GEe=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",VEe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",KEe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qEe():t==="fa"?UEe():t==="ar"?GEe():t==="es"?VEe():t==="hi"?KEe():HEe()}),WEe=()=>"This turn did not finish.",QEe=()=>"本轮未完成。",XEe=()=>"این نوبت کامل نشد.",YEe=()=>"لم تكتمل هذه الجولة.",ZEe=()=>"Este turno no terminó.",JEe=()=>"यह टर्न पूरा नहीं हुआ।",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QEe():t==="fa"?XEe():t==="ar"?YEe():t==="es"?ZEe():t==="hi"?JEe():WEe()}),eNe=()=>"Type a custom answer…",tNe=()=>"输入自定义回答…",nNe=()=>"پاسخ دلخواه را بنویسید…",rNe=()=>"اكتب إجابة مخصصة…",sNe=()=>"Escribe una respuesta personalizada…",iNe=()=>"अपना जवाब टाइप करें…",aNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tNe():t==="fa"?nNe():t==="ar"?rNe():t==="es"?sNe():t==="hi"?iNe():eNe()}),oNe=()=>"Unarchive",cNe=()=>"取消归档",lNe=()=>"خارج کردن از بایگانی",uNe=()=>"إلغاء الأرشفة",_Ne=()=>"Desarchivar",fNe=()=>"आर्काइव से निकालें",dNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cNe():t==="fa"?lNe():t==="ar"?uNe():t==="es"?_Ne():t==="hi"?fNe():oNe()}),hNe=()=>"Untitled",pNe=()=>"未命名",mNe=()=>"بدون عنوان",gNe=()=>"بدون عنوان",vNe=()=>"Sin título",bNe=()=>"बिना शीर्षक",xv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pNe():t==="fa"?mNe():t==="ar"?gNe():t==="es"?vNe():t==="hi"?bNe():hNe()}),yNe=()=>"Could not update autonomy. Try again.",xNe=()=>"无法更新自主程度。请重试。",wNe=()=>"به‌روزرسانی خودمختاری انجام نشد. دوباره تلاش کنید.",kNe=()=>"تعذّر تحديث الاستقلالية. حاول مجددًا.",SNe=()=>"No se pudo actualizar la autonomía. Inténtalo de nuevo.",CNe=()=>"स्वायत्तता अपडेट नहीं हो सकी। फिर से कोशिश करें।",ENe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xNe():t==="fa"?wNe():t==="ar"?kNe():t==="es"?SNe():t==="hi"?CNe():yNe()}),NNe=()=>"Could not update permissions. Try again.",zNe=()=>"无法更新权限。请重试。",jNe=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",ANe=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",TNe=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",RNe=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",MNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zNe():t==="fa"?jNe():t==="ar"?ANe():t==="es"?TNe():t==="hi"?RNe():NNe()}),ONe=()=>"Work details",DNe=()=>"工作详情",LNe=()=>"جزئیات کار",INe=()=>"تفاصيل العمل",$Ne=()=>"Detalles del trabajo",BNe=()=>"काम का विवरण",PNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DNe():t==="fa"?LNe():t==="ar"?INe():t==="es"?$Ne():t==="hi"?BNe():ONe()}),FNe=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,HNe=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,qNe=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,UNe=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,GNe=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,VNe=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,KNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HNe(e):t==="fa"?qNe(e):t==="ar"?UNe(e):t==="es"?GNe(e):t==="hi"?VNe(e):FNe(e)}),WNe=e=>`Worked for ${e==null?void 0:e.duration}`,QNe=e=>`已工作 ${e==null?void 0:e.duration}`,XNe=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,YNe=e=>`عمل لمدة ${e==null?void 0:e.duration}`,ZNe=e=>`Trabajó durante ${e==null?void 0:e.duration}`,JNe=e=>`${e==null?void 0:e.duration} तक काम किया`,eze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QNe(e):t==="fa"?XNe(e):t==="ar"?YNe(e):t==="es"?ZNe(e):t==="hi"?JNe(e):WNe(e)}),tze=()=>"Working…",nze=()=>"正在工作…",rze=()=>"در حال کار…",sze=()=>"جارٍ العمل…",ize=()=>"Trabajando…",aze=()=>"काम हो रहा है…",CS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nze():t==="fa"?rze():t==="ar"?sze():t==="es"?ize():t==="hi"?aze():tze()}),oze=()=>"Close tab",cze=()=>"关闭标签页",lze=()=>"بستن زبانه",uze=()=>"إغلاق التبويب",_ze=()=>"Cerrar pestaña",fze=()=>"टैब बंद करें",dze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cze():t==="fa"?lze():t==="ar"?uze():t==="es"?_ze():t==="hi"?fze():oze()}),hze=()=>"Changes",pze=()=>"更改",mze=()=>"تغییرات",gze=()=>"التغييرات",vze=()=>"Cambios",bze=()=>"बदलाव",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pze():t==="fa"?mze():t==="ar"?gze():t==="es"?vze():t==="hi"?bze():hze()}),yze=()=>"Code browser view",xze=()=>"代码浏览器视图",wze=()=>"نمای مرورگر کد",kze=()=>"عرض متصفح الشيفرة",Sze=()=>"Vista del explorador de código",Cze=()=>"कोड ब्राउज़र व्यू",Eze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xze():t==="fa"?wze():t==="ar"?kze():t==="es"?Sze():t==="hi"?Cze():yze()}),Nze=()=>"Files",zze=()=>"文件",jze=()=>"فایل‌ها",Aze=()=>"الملفات",Tze=()=>"Archivos",Rze=()=>"फ़ाइलें",Mze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zze():t==="fa"?jze():t==="ar"?Aze():t==="es"?Tze():t==="hi"?Rze():Nze()}),Oze=()=>"Refresh",Dze=()=>"刷新",Lze=()=>"تازه‌سازی",Ize=()=>"تحديث",$ze=()=>"Actualizar",Bze=()=>"रीफ़्रेश करें",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dze():t==="fa"?Lze():t==="ar"?Ize():t==="es"?$ze():t==="hi"?Bze():Oze()}),Pze=()=>"listing truncated",Fze=()=>"列表已截断",Hze=()=>"فهرست کوتاه شده است",qze=()=>"القائمة مقتطعة",Uze=()=>"listado truncado",Gze=()=>"सूची छोटी की गई",Vze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fze():t==="fa"?Hze():t==="ar"?qze():t==="es"?Uze():t==="hi"?Gze():Pze()}),Kze=()=>"No files.",Wze=()=>"没有文件。",Qze=()=>"فایلی وجود ندارد.",Xze=()=>"لا توجد ملفات.",Yze=()=>"No hay archivos.",Zze=()=>"कोई फ़ाइल नहीं।",Jze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wze():t==="fa"?Qze():t==="ar"?Xze():t==="es"?Yze():t==="hi"?Zze():Kze()}),eje=()=>"Refresh failed:",tje=()=>"刷新失败:",nje=()=>"تازه‌سازی ناموفق بود:",rje=()=>"فشل التحديث:",sje=()=>"Error al actualizar:",ije=()=>"रीफ़्रेश विफल:",aje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tje():t==="fa"?nje():t==="ar"?rje():t==="es"?sje():t==="hi"?ije():eje()}),oje=()=>"Cancelling…",cje=()=>"正在取消…",lje=()=>"در حال لغو…",uje=()=>"جارٍ الإلغاء…",_je=()=>"Cancelando…",fje=()=>"रद्द हो रहा है…",dje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cje():t==="fa"?lje():t==="ar"?uje():t==="es"?_je():t==="hi"?fje():oje()}),hje=()=>"Checking…",pje=()=>"正在检查…",mje=()=>"در حال بررسی…",gje=()=>"جارٍ التحقق…",vje=()=>"Comprobando…",bje=()=>"जाँचा जा रहा है…",Da=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pje():t==="fa"?mje():t==="ar"?gje():t==="es"?vje():t==="hi"?bje():hje()}),yje=()=>"Copied",xje=()=>"已复制",wje=()=>"کپی شد",kje=()=>"تم النسخ",Sje=()=>"Copiado",Cje=()=>"कॉपी हो गया",Cf=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xje():t==="fa"?wje():t==="ar"?kje():t==="es"?Sje():t==="hi"?Cje():yje()}),Eje=e=>`Failed to load: ${e==null?void 0:e.error}`,Nje=e=>`加载失败:${e==null?void 0:e.error}`,zje=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,jje=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,Aje=e=>`Error al cargar: ${e==null?void 0:e.error}`,Tje=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,ES=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nje(e):t==="fa"?zje(e):t==="ar"?jje(e):t==="es"?Aje(e):t==="hi"?Tje(e):Eje(e)}),Rje=()=>"Loading…",Mje=()=>"正在加载…",Oje=()=>"در حال بارگیری…",Dje=()=>"جارٍ التحميل…",Lje=()=>"Cargando…",Ije=()=>"लोड हो रहा है…",NS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mje():t==="fa"?Oje():t==="ar"?Dje():t==="es"?Lje():t==="hi"?Ije():Rje()}),$je=e=>`+ ${e==null?void 0:e.count} more`,Bje=e=>`另有 ${e==null?void 0:e.count} 项`,Pje=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Fje=e=>`المزيد (+${e==null?void 0:e.count})`,Hje=e=>`+ ${e==null?void 0:e.count} más`,qje=e=>`+ ${e==null?void 0:e.count} और`,Uje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bje(e):t==="fa"?Pje(e):t==="ar"?Fje(e):t==="es"?Hje(e):t==="hi"?qje(e):$je(e)}),Gje=()=>"Rendered view",Vje=()=>"渲染视图",Kje=()=>"نمای رندرشده",Wje=()=>"العرض المُنسَّق",Qje=()=>"Vista renderizada",Xje=()=>"रेंडर किया गया व्यू",eb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vje():t==="fa"?Kje():t==="ar"?Wje():t==="es"?Qje():t==="hi"?Xje():Gje()}),Yje=()=>"Save",Zje=()=>"保存",Jje=()=>"ذخیره",eAe=()=>"حفظ",tAe=()=>"Guardar",nAe=()=>"सेव करें",Qo=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zje():t==="fa"?Jje():t==="ar"?eAe():t==="es"?tAe():t==="hi"?nAe():Yje()}),rAe=()=>"Saving…",sAe=()=>"正在保存…",iAe=()=>"در حال ذخیره…",aAe=()=>"جارٍ الحفظ…",oAe=()=>"Guardando…",cAe=()=>"सेव हो रहा है…",Ba=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sAe():t==="fa"?iAe():t==="ar"?aAe():t==="es"?oAe():t==="hi"?cAe():rAe()}),lAe=()=>"Show less",uAe=()=>"收起",_Ae=()=>"نمایش کمتر",fAe=()=>"عرض أقل",dAe=()=>"Mostrar menos",hAe=()=>"कम दिखाएं",zS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uAe():t==="fa"?_Ae():t==="ar"?fAe():t==="es"?dAe():t==="hi"?hAe():lAe()}),pAe=()=>"Show more",mAe=()=>"展开",gAe=()=>"نمایش بیشتر",vAe=()=>"عرض المزيد",bAe=()=>"Mostrar más",yAe=()=>"और दिखाएं",I3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mAe():t==="fa"?gAe():t==="ar"?vAe():t==="es"?bAe():t==="hi"?yAe():pAe()}),xAe=()=>"Stop",wAe=()=>"停止",kAe=()=>"توقف",SAe=()=>"إيقاف",CAe=()=>"Detener",EAe=()=>"रोकें",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wAe():t==="fa"?kAe():t==="ar"?SAe():t==="es"?CAe():t==="hi"?EAe():xAe()}),NAe=()=>"Stopping…",zAe=()=>"正在停止…",jAe=()=>"در حال توقف…",AAe=()=>"جارٍ الإيقاف…",TAe=()=>"Deteniendo…",RAe=()=>"रोका जा रहा है…",MAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zAe():t==="fa"?jAe():t==="ar"?AAe():t==="es"?TAe():t==="hi"?RAe():NAe()}),OAe=()=>"View source",DAe=()=>"查看源代码",LAe=()=>"نمایش متن منبع",IAe=()=>"عرض المصدر",$Ae=()=>"Ver código fuente",BAe=()=>"स्रोत देखें",Zd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DAe():t==="fa"?LAe():t==="ar"?IAe():t==="es"?$Ae():t==="hi"?BAe():OAe()}),PAe=()=>"Shorten this chat's context",FAe=()=>"压缩此聊天的上下文",HAe=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",qAe=()=>"اختصار سياق هذه المحادثة",UAe=()=>"Comprime el contexto de este chat",GAe=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",VAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FAe():t==="fa"?HAe():t==="ar"?qAe():t==="es"?UAe():t==="hi"?GAe():PAe()}),KAe=()=>"Runs as a remote Hugging Face Job",WAe=()=>"作为远程 Hugging Face Job 运行",QAe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",XAe=()=>"يعمل كمهمة Hugging Face بعيدة",YAe=()=>"Se ejecuta como un Job remoto de Hugging Face",ZAe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",JAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WAe():t==="fa"?QAe():t==="ar"?XAe():t==="es"?YAe():t==="hi"?ZAe():KAe()}),eTe=()=>"Runs as a Job on your Kubernetes cluster",tTe=()=>"作为 Kubernetes 集群上的 Job 运行",nTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",rTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",sTe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",iTe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",aTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tTe():t==="fa"?nTe():t==="ar"?rTe():t==="es"?sTe():t==="hi"?iTe():eTe()}),oTe=()=>"Runs directly on this computer",cTe=()=>"直接在此计算机上运行",lTe=()=>"مستقیماً روی این رایانه اجرا می‌شود",uTe=()=>"يعمل مباشرة على هذا الحاسوب",_Te=()=>"Se ejecuta directamente en este equipo",fTe=()=>"सीधे इस कंप्यूटर पर चलता है",dTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cTe():t==="fa"?lTe():t==="ar"?uTe():t==="es"?_Te():t==="hi"?fTe():oTe()}),hTe=()=>"Runs in a remote Modal sandbox",pTe=()=>"在远程 Modal 沙箱中运行",mTe=()=>"در sandbox دوردست Modal اجرا می‌شود",gTe=()=>"يعمل في بيئة Modal معزولة عن بُعد",vTe=()=>"Se ejecuta en un sandbox remoto de Modal",bTe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",yTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pTe():t==="fa"?mTe():t==="ar"?gTe():t==="es"?vTe():t==="hi"?bTe():hTe()}),xTe=()=>"Runs on an ephemeral OpenResearch box",wTe=()=>"在临时 OpenResearch 主机上运行",kTe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",STe=()=>"يعمل على صندوق OpenResearch مؤقت",CTe=()=>"Se ejecuta en una máquina efímera de OpenResearch",ETe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",NTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wTe():t==="fa"?kTe():t==="ar"?STe():t==="es"?CTe():t==="hi"?ETe():xTe()}),zTe=()=>"Runs on the connected Ray cluster",jTe=()=>"在已连接的 Ray 集群上运行",ATe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",TTe=()=>"يعمل على عنقود Ray المتصل",RTe=()=>"Se ejecuta en el clúster de Ray conectado",MTe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",OTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jTe():t==="fa"?ATe():t==="ar"?TTe():t==="es"?RTe():t==="hi"?MTe():zTe()}),DTe=()=>"Runs as a scheduled job on your Slurm cluster",LTe=()=>"作为 Slurm 集群上的调度作业运行",ITe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",$Te=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",BTe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",PTe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",FTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LTe():t==="fa"?ITe():t==="ar"?$Te():t==="es"?BTe():t==="hi"?PTe():DTe()}),HTe=()=>"Runs on a host from your SSH config",qTe=()=>"在 SSH 配置中的主机上运行",UTe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",GTe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",VTe=()=>"Se ejecuta en un host de tu configuración SSH",KTe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",WTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qTe():t==="fa"?UTe():t==="ar"?GTe():t==="es"?VTe():t==="hi"?KTe():HTe()}),QTe=()=>"Runs through Tinker’s remote compute",XTe=()=>"通过 Tinker 远程算力运行",YTe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",ZTe=()=>"يعمل عبر حوسبة Tinker البعيدة",JTe=()=>"Se ejecuta en el cómputo remoto de Tinker",eRe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",tRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XTe():t==="fa"?YTe():t==="ar"?ZTe():t==="es"?JTe():t==="hi"?eRe():QTe()}),nRe=()=>"HF Jobs",rRe=()=>"HF Jobs",sRe=()=>"HF Jobs",iRe=()=>"HF Jobs",aRe=()=>"HF Jobs",oRe=()=>"HF Jobs",cRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rRe():t==="fa"?sRe():t==="ar"?iRe():t==="es"?aRe():t==="hi"?oRe():nRe()}),lRe=()=>"Kubernetes",uRe=()=>"Kubernetes",_Re=()=>"Kubernetes",fRe=()=>"Kubernetes",dRe=()=>"Kubernetes",hRe=()=>"Kubernetes",pRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uRe():t==="fa"?_Re():t==="ar"?fRe():t==="es"?dRe():t==="hi"?hRe():lRe()}),mRe=()=>"This machine",gRe=()=>"此计算机",vRe=()=>"این رایانه",bRe=()=>"هذا الجهاز",yRe=()=>"Este equipo",xRe=()=>"यह मशीन",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gRe():t==="fa"?vRe():t==="ar"?bRe():t==="es"?yRe():t==="hi"?xRe():mRe()}),wRe=()=>"Modal",kRe=()=>"Modal",SRe=()=>"Modal",CRe=()=>"Modal",ERe=()=>"Modal",NRe=()=>"Modal",zRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRe():t==="fa"?SRe():t==="ar"?CRe():t==="es"?ERe():t==="hi"?NRe():wRe()}),jRe=()=>"OpenResearch",ARe=()=>"OpenResearch",TRe=()=>"OpenResearch",RRe=()=>"OpenResearch",MRe=()=>"OpenResearch",ORe=()=>"OpenResearch",DRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ARe():t==="fa"?TRe():t==="ar"?RRe():t==="es"?MRe():t==="hi"?ORe():jRe()}),LRe=()=>"Ray",IRe=()=>"Ray",$Re=()=>"Ray",BRe=()=>"Ray",PRe=()=>"Ray",FRe=()=>"Ray",HRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRe():t==="fa"?$Re():t==="ar"?BRe():t==="es"?PRe():t==="hi"?FRe():LRe()}),qRe=()=>"Slurm",URe=()=>"Slurm",GRe=()=>"Slurm",VRe=()=>"Slurm",KRe=()=>"Slurm",WRe=()=>"Slurm",QRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?URe():t==="fa"?GRe():t==="ar"?VRe():t==="es"?KRe():t==="hi"?WRe():qRe()}),XRe=()=>"SSH",YRe=()=>"SSH",ZRe=()=>"SSH",JRe=()=>"SSH",eMe=()=>"SSH",tMe=()=>"SSH",nMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YRe():t==="fa"?ZRe():t==="ar"?JRe():t==="es"?eMe():t==="hi"?tMe():XRe()}),rMe=()=>"Tinker",sMe=()=>"Tinker",iMe=()=>"Tinker",aMe=()=>"Tinker",oMe=()=>"Tinker",cMe=()=>"Tinker",lMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sMe():t==="fa"?iMe():t==="ar"?aMe():t==="es"?oMe():t==="hi"?cMe():rMe()}),uMe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",_Me=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",fMe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",dMe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",hMe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",pMe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",mMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Me():t==="fa"?fMe():t==="ar"?dMe():t==="es"?hMe():t==="hi"?pMe():uMe()}),gMe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",vMe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",bMe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",yMe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",xMe=()=>"Un sandbox de Modal se ejecuta de forma remota en tu cuenta con el hardware seleccionado y escala a cero al terminar la ejecución.",wMe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",kMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vMe():t==="fa"?bMe():t==="ar"?yMe():t==="es"?xMe():t==="hi"?wMe():gMe()}),SMe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",CMe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",EMe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",NMe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",zMe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",jMe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",AMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CMe():t==="fa"?EMe():t==="ar"?NMe():t==="es"?zMe():t==="hi"?jMe():SMe()}),TMe=()=>"This computer must stay awake and online while Tinker runs.",RMe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",MMe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",OMe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",DMe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",LMe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",IMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RMe():t==="fa"?MMe():t==="ar"?OMe():t==="es"?DMe():t==="hi"?LMe():TMe()}),$Me=()=>"Context window",BMe=()=>"上下文窗口",PMe=()=>"پنجرهٔ زمینه",FMe=()=>"نافذة السياق",HMe=()=>"Ventana de contexto",qMe=()=>"कॉन्टेक्स्ट विंडो",UMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BMe():t==="fa"?PMe():t==="ar"?FMe():t==="es"?HMe():t==="hi"?qMe():$Me()}),GMe=()=>"Context window used",VMe=()=>"已使用的上下文窗口",KMe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",WMe=()=>"المستخدَم من نافذة السياق",QMe=()=>"Ventana de contexto usada",XMe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",YMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VMe():t==="fa"?KMe():t==="ar"?WMe():t==="es"?QMe():t==="hi"?XMe():GMe()}),ZMe=e=>`${e==null?void 0:e.value} tokens`,JMe=e=>`${e==null?void 0:e.value} 个 token`,eOe=e=>`${e==null?void 0:e.value} توکن`,tOe=e=>`${e==null?void 0:e.value} رمز`,nOe=e=>`${e==null?void 0:e.value} tokens`,rOe=e=>`${e==null?void 0:e.value} टोकन`,sOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JMe(e):t==="fa"?eOe(e):t==="ar"?tOe(e):t==="es"?nOe(e):t==="hi"?rOe(e):ZMe(e)}),iOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,aOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,oOe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,cOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,lOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,uOe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,_Oe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aOe(e):t==="fa"?oOe(e):t==="ar"?cOe(e):t==="es"?lOe(e):t==="hi"?uOe(e):iOe(e)}),fOe=()=>"Copy the last response",dOe=()=>"复制最新回复",hOe=()=>"کپی آخرین پاسخ",pOe=()=>"نسخ آخر رد",mOe=()=>"Copia la última respuesta",gOe=()=>"आखिरी जवाब कॉपी करें",vOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dOe():t==="fa"?hOe():t==="ar"?pOe():t==="es"?mOe():t==="hi"?gOe():fOe()}),bOe=()=>"Dismiss",yOe=()=>"关闭",xOe=()=>"بستن",wOe=()=>"تجاهل",kOe=()=>"Descartar",SOe=()=>"खारिज करें",COe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yOe():t==="fa"?xOe():t==="ar"?wOe():t==="es"?kOe():t==="hi"?SOe():bOe()}),EOe=()=>"Download the app",NOe=()=>"下载应用",zOe=()=>"دانلود برنامه",jOe=()=>"تنزيل التطبيق",AOe=()=>"Descargar la aplicación",TOe=()=>"ऐप डाउनलोड करें",ROe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NOe():t==="fa"?zOe():t==="ar"?jOe():t==="es"?AOe():t==="hi"?TOe():EOe()}),MOe=()=>"OpenResearch is now a desktop app. Your projects open there as they are, with no terminal to keep running.",OOe=()=>"OpenResearch 现已推出桌面应用。你的项目会在应用中原样打开,无需保持终端运行。",DOe=()=>"OpenResearch اکنون یک برنامهٔ دسکتاپ است. پروژه‌های شما همان‌طور که هستند در آن باز می‌شوند، بدون نیاز به ترمینال باز.",LOe=()=>"أصبح OpenResearch تطبيقًا لسطح المكتب. تُفتح مشاريعك فيه كما هي، دون الحاجة إلى إبقاء الطرفية قيد التشغيل.",IOe=()=>"OpenResearch ya es una aplicación de escritorio. Tus proyectos se abren tal como están, sin una terminal que mantener abierta.",$Oe=()=>"OpenResearch अब एक डेस्कटॉप ऐप है। आपके प्रोजेक्ट वहां जैसे हैं वैसे ही खुलते हैं, टर्मिनल चालू रखने की ज़रूरत नहीं।",BOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OOe():t==="fa"?DOe():t==="ar"?LOe():t==="es"?IOe():t==="hi"?$Oe():MOe()}),POe=()=>"No runs yet — ask the agent to launch one.",FOe=()=>"尚无运行——让智能体启动一个。",HOe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",qOe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",UOe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",GOe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",VOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FOe():t==="fa"?HOe():t==="ar"?qOe():t==="es"?UOe():t==="hi"?GOe():POe()}),KOe=()=>"Run",WOe=()=>"运行",QOe=()=>"اجرا",XOe=()=>"تشغيل",YOe=()=>"Ejecución",ZOe=()=>"रन",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WOe():t==="fa"?QOe():t==="ar"?XOe():t==="es"?YOe():t==="hi"?ZOe():KOe()}),JOe=()=>"Switch run",eDe=()=>"切换运行",tDe=()=>"تغییر اجرا",nDe=()=>"تبديل التشغيل",rDe=()=>"Cambiar de ejecución",sDe=()=>"रन बदलें",iDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eDe():t==="fa"?tDe():t==="ar"?nDe():t==="es"?rDe():t==="hi"?sDe():JOe()}),aDe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,oDe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,cDe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,lDe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,uDe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,_De=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,fDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oDe(e):t==="fa"?cDe(e):t==="ar"?lDe(e):t==="es"?uDe(e):t==="hi"?_De(e):aDe(e)}),dDe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,hDe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,pDe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,mDe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,gDe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,vDe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,bDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hDe(e):t==="fa"?pDe(e):t==="ar"?mDe(e):t==="es"?gDe(e):t==="hi"?vDe(e):dDe(e)}),yDe=e=>`${e==null?void 0:e.value}m`,xDe=e=>`${e==null?void 0:e.value} 分钟`,wDe=e=>`${e==null?void 0:e.value} دقیقه`,kDe=e=>`${e==null?void 0:e.value}د`,SDe=e=>`${e==null?void 0:e.value} min`,CDe=e=>`${e==null?void 0:e.value}मि`,EDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xDe(e):t==="fa"?wDe(e):t==="ar"?kDe(e):t==="es"?SDe(e):t==="hi"?CDe(e):yDe(e)}),NDe=e=>`${e==null?void 0:e.value}s`,zDe=e=>`${e==null?void 0:e.value} 秒`,jDe=e=>`${e==null?void 0:e.value} ثانیه`,ADe=e=>`${e==null?void 0:e.value}ث`,TDe=e=>`${e==null?void 0:e.value} s`,RDe=e=>`${e==null?void 0:e.value}से`,MDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zDe(e):t==="fa"?jDe(e):t==="ar"?ADe(e):t==="es"?TDe(e):t==="hi"?RDe(e):NDe(e)}),ODe=()=>"Code",DDe=()=>"代码",LDe=()=>"کد",IDe=()=>"الشيفرة",$De=()=>"Código",BDe=()=>"कोड",PDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DDe():t==="fa"?LDe():t==="ar"?IDe():t==="es"?$De():t==="hi"?BDe():ODe()}),FDe=()=>"created",HDe=()=>"创建于",qDe=()=>"ایجادشده",UDe=()=>"أُنشئ",GDe=()=>"creado",VDe=()=>"बनाया गया",KDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HDe():t==="fa"?qDe():t==="ar"?UDe():t==="es"?GDe():t==="hi"?VDe():FDe()}),WDe=()=>"from",QDe=()=>"来自",XDe=()=>"از",YDe=()=>"من",ZDe=()=>"desde",JDe=()=>"से",eLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QDe():t==="fa"?XDe():t==="ar"?YDe():t==="es"?ZDe():t==="hi"?JDe():WDe()}),tLe=()=>"Logs",nLe=()=>"日志",rLe=()=>"گزارش‌ها",sLe=()=>"السجلات",iLe=()=>"Logs",aLe=()=>"लॉग",oLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nLe():t==="fa"?rLe():t==="ar"?sLe():t==="es"?iLe():t==="hi"?aLe():tLe()}),cLe=()=>"Latest run",lLe=()=>"最新运行",uLe=()=>"آخرین اجرا",_Le=()=>"أحدث تشغيل",fLe=()=>"Última ejecución",dLe=()=>"नवीनतम रन",hLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lLe():t==="fa"?uLe():t==="ar"?_Le():t==="es"?fLe():t==="hi"?dLe():cLe()}),pLe=()=>"Code",mLe=()=>"代码",gLe=()=>"کد",vLe=()=>"الشيفرة",bLe=()=>"Código",yLe=()=>"कोड",xLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mLe():t==="fa"?gLe():t==="ar"?vLe():t==="es"?bLe():t==="hi"?yLe():pLe()}),wLe=()=>"Commit",kLe=()=>"提交",SLe=()=>"کامیت",CLe=()=>"إيداع",ELe=()=>"Commit",NLe=()=>"कमिट",zLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kLe():t==="fa"?SLe():t==="ar"?CLe():t==="es"?ELe():t==="hi"?NLe():wLe()}),jLe=()=>"created",ALe=()=>"创建于",TLe=()=>"ایجادشده",RLe=()=>"أُنشئ",MLe=()=>"creado",OLe=()=>"बनाया गया",DLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ALe():t==="fa"?TLe():t==="ar"?RLe():t==="es"?MLe():t==="hi"?OLe():jLe()}),LLe=()=>"Description",ILe=()=>"说明",$Le=()=>"توضیحات",BLe=()=>"الوصف",PLe=()=>"Descripción",FLe=()=>"विवरण",HLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ILe():t==="fa"?$Le():t==="ar"?BLe():t==="es"?PLe():t==="hi"?FLe():LLe()}),qLe=()=>"Duration",ULe=()=>"时长",GLe=()=>"مدت",VLe=()=>"المدة",KLe=()=>"Duración",WLe=()=>"अवधि",QLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULe():t==="fa"?GLe():t==="ar"?VLe():t==="es"?KLe():t==="hi"?WLe():qLe()}),XLe=()=>"exit",YLe=()=>"退出码",ZLe=()=>"خروج",JLe=()=>"رمز الخروج",eIe=()=>"salida",tIe=()=>"एग्ज़िट",nIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YLe():t==="fa"?ZLe():t==="ar"?JLe():t==="es"?eIe():t==="hi"?tIe():XLe()}),rIe=()=>"from",sIe=()=>"来自",iIe=()=>"از",aIe=()=>"من",oIe=()=>"desde",cIe=()=>"से",lIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sIe():t==="fa"?iIe():t==="ar"?aIe():t==="es"?oIe():t==="hi"?cIe():rIe()}),uIe=()=>"Logs",_Ie=()=>"日志",fIe=()=>"گزارش‌ها",dIe=()=>"السجلات",hIe=()=>"Logs",pIe=()=>"लॉग",mIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ie():t==="fa"?fIe():t==="ar"?dIe():t==="es"?hIe():t==="hi"?pIe():uIe()}),gIe=()=>"Run",vIe=()=>"运行",bIe=()=>"اجرا",yIe=()=>"تشغيل",xIe=()=>"Ejecución",wIe=()=>"रन",kIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vIe():t==="fa"?bIe():t==="ar"?yIe():t==="es"?xIe():t==="hi"?wIe():gIe()}),SIe=()=>"Run history",CIe=()=>"运行历史",EIe=()=>"تاریخچهٔ اجرا",NIe=()=>"سجل التشغيل",zIe=()=>"Historial de ejecuciones",jIe=()=>"रन इतिहास",AIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CIe():t==="fa"?EIe():t==="ar"?NIe():t==="es"?zIe():t==="hi"?jIe():SIe()}),TIe=()=>"Started",RIe=()=>"开始时间",MIe=()=>"آغاز",OIe=()=>"بدأ",DIe=()=>"Inicio",LIe=()=>"शुरू हुआ",IIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RIe():t==="fa"?MIe():t==="ar"?OIe():t==="es"?DIe():t==="hi"?LIe():TIe()}),$Ie=()=>"Runs",BIe=()=>"运行",PIe=()=>"اجراها",FIe=()=>"عمليات التشغيل",HIe=()=>"Ejecuciones",qIe=()=>"रन",UIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BIe():t==="fa"?PIe():t==="ar"?FIe():t==="es"?HIe():t==="hi"?qIe():$Ie()}),GIe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",VIe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",KIe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",WIe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",QIe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",XIe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",YIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VIe():t==="fa"?KIe():t==="ar"?WIe():t==="es"?QIe():t==="hi"?XIe():GIe()}),ZIe=()=>"No runs yet",JIe=()=>"还没有运行",e$e=()=>"هنوز اجرایی وجود ندارد",t$e=()=>"لا عمليات تشغيل بعد",n$e=()=>"Aún no hay ejecuciones",r$e=()=>"अभी तक कोई रन नहीं",s$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JIe():t==="fa"?e$e():t==="ar"?t$e():t==="es"?n$e():t==="hi"?r$e():ZIe()}),i$e=()=>"No experiments yet.",a$e=()=>"还没有实验。",o$e=()=>"هنوز آزمایشی وجود ندارد.",c$e=()=>"لا توجد تجارب بعد.",l$e=()=>"Aún no hay experimentos.",u$e=()=>"अभी तक कोई प्रयोग नहीं।",_$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a$e():t==="fa"?o$e():t==="ar"?c$e():t==="es"?l$e():t==="hi"?u$e():i$e()}),f$e=()=>"Not run yet",d$e=()=>"尚未运行",h$e=()=>"هنوز اجرا نشده",p$e=()=>"لم تُشغَّل بعد",m$e=()=>"Aún sin ejecutar",g$e=()=>"अभी तक नहीं चलाया गया",v$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d$e():t==="fa"?h$e():t==="ar"?p$e():t==="es"?m$e():t==="hi"?g$e():f$e()}),b$e=()=>"1 run",y$e=()=>"1 次运行",x$e=()=>"۱ اجرا",w$e=()=>"تشغيل واحد",k$e=()=>"1 ejecución",S$e=()=>"1 रन",C$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y$e():t==="fa"?x$e():t==="ar"?w$e():t==="es"?k$e():t==="hi"?S$e():b$e()}),E$e=()=>"Open logs",N$e=()=>"打开日志",z$e=()=>"باز کردن گزارش‌ها",j$e=()=>"فتح السجلات",A$e=()=>"Abrir logs",T$e=()=>"लॉग खोलें",R$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N$e():t==="fa"?z$e():t==="ar"?j$e():t==="es"?A$e():t==="hi"?T$e():E$e()}),M$e=e=>`${e==null?void 0:e.count} runs`,O$e=e=>`${e==null?void 0:e.count} 次运行`,D$e=e=>`${e==null?void 0:e.count} اجرا`,L$e=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,I$e=e=>`${e==null?void 0:e.count} ejecuciones`,$$e=e=>`${e==null?void 0:e.count} रन`,B$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O$e(e):t==="fa"?D$e(e):t==="ar"?L$e(e):t==="es"?I$e(e):t==="hi"?$$e(e):M$e(e)}),P$e=()=>"Stop requested",F$e=()=>"已请求停止",H$e=()=>"درخواست توقف ثبت شد",q$e=()=>"طُلب الإيقاف",U$e=()=>"Detención solicitada",G$e=()=>"रोकने का अनुरोध किया गया",V$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F$e():t==="fa"?H$e():t==="ar"?q$e():t==="es"?U$e():t==="hi"?G$e():P$e()}),K$e=()=>"Stop run",W$e=()=>"停止运行",Q$e=()=>"توقف اجرا",X$e=()=>"إيقاف التشغيل",Y$e=()=>"Detener ejecución",Z$e=()=>"रन रोकें",J$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W$e():t==="fa"?Q$e():t==="ar"?X$e():t==="es"?Y$e():t==="hi"?Z$e():K$e()}),eBe=()=>"Code",tBe=()=>"代码",nBe=()=>"کد",rBe=()=>"الشيفرة",sBe=()=>"Código",iBe=()=>"कोड",aBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tBe():t==="fa"?nBe():t==="ar"?rBe():t==="es"?sBe():t==="hi"?iBe():eBe()}),oBe=()=>"Experiments",cBe=()=>"实验",lBe=()=>"آزمایش‌ها",uBe=()=>"التجارب",_Be=()=>"Experimentos",fBe=()=>"प्रयोग",dBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cBe():t==="fa"?lBe():t==="ar"?uBe():t==="es"?_Be():t==="hi"?fBe():oBe()}),hBe=()=>"Logs",pBe=()=>"日志",mBe=()=>"گزارش‌ها",gBe=()=>"السجلات",vBe=()=>"Logs",bBe=()=>"लॉग",$3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pBe():t==="fa"?mBe():t==="ar"?gBe():t==="es"?vBe():t==="hi"?bBe():hBe()}),yBe=()=>"Stop failed:",xBe=()=>"停止失败:",wBe=()=>"توقف ناموفق بود:",kBe=()=>"فشل الإيقاف:",SBe=()=>"Error al detener:",CBe=()=>"रोकना विफल:",EBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xBe():t==="fa"?wBe():t==="ar"?kBe():t==="es"?SBe():t==="hi"?CBe():yBe()}),NBe=()=>"Download this chat as Markdown",zBe=()=>"将此聊天下载为 Markdown",jBe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",ABe=()=>"تنزيل هذه المحادثة بتنسيق Markdown",TBe=()=>"Descarga este chat en Markdown",RBe=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",MBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBe():t==="fa"?jBe():t==="ar"?ABe():t==="es"?TBe():t==="hi"?RBe():NBe()}),OBe=()=>"Clipboard access is unavailable.",DBe=()=>"无法访问剪贴板。",LBe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",IBe=()=>"الوصول إلى الحافظة غير متاح.",$Be=()=>"El acceso al portapapeles no está disponible.",BBe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBe():t==="fa"?LBe():t==="ar"?IBe():t==="es"?$Be():t==="hi"?BBe():OBe()}),PBe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,FBe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,HBe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,qBe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,UBe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,GBe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,VBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FBe(e):t==="fa"?HBe(e):t==="ar"?qBe(e):t==="es"?UBe(e):t==="hi"?GBe(e):PBe(e)}),KBe=()=>"Duplicate",WBe=()=>"创建副本",QBe=()=>"ایجاد نسخهٔ تکراری",XBe=()=>"تكرار",YBe=()=>"Duplicar",ZBe=()=>"डुप्लिकेट करें",JBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WBe():t==="fa"?QBe():t==="ar"?XBe():t==="es"?YBe():t==="hi"?ZBe():KBe()}),ePe=e=>`File actions for ${e==null?void 0:e.path}`,tPe=e=>`${e==null?void 0:e.path} 的文件操作`,nPe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,rPe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,sPe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,iPe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,aPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tPe(e):t==="fa"?nPe(e):t==="ar"?rPe(e):t==="es"?sPe(e):t==="hi"?iPe(e):ePe(e)}),oPe=()=>"Open",cPe=()=>"打开",lPe=()=>"باز کردن",uPe=()=>"فتح",_Pe=()=>"Abrir",fPe=()=>"खोलें",dPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cPe():t==="fa"?lPe():t==="ar"?uPe():t==="es"?_Pe():t==="hi"?fPe():oPe()}),hPe=e=>`Rename ${e==null?void 0:e.path}`,pPe=e=>`重命名 ${e==null?void 0:e.path}`,mPe=e=>`تغییر نام ${e==null?void 0:e.path}`,gPe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,vPe=e=>`Renombrar ${e==null?void 0:e.path}`,bPe=e=>`${e==null?void 0:e.path} का नाम बदलें`,yPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pPe(e):t==="fa"?mPe(e):t==="ar"?gPe(e):t==="es"?vPe(e):t==="hi"?bPe(e):hPe(e)}),xPe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,wPe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,kPe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,SPe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,CPe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,EPe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,NPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wPe(e):t==="fa"?kPe(e):t==="ar"?SPe(e):t==="es"?CPe(e):t==="hi"?EPe(e):xPe(e)}),zPe=()=>"Binary file — no inline preview.",jPe=()=>"二进制文件——无法内嵌预览。",APe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",TPe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",RPe=()=>"Archivo binario — sin vista previa.",MPe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",OPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jPe():t==="fa"?APe():t==="ar"?TPe():t==="es"?RPe():t==="hi"?MPe():zPe()}),DPe=()=>"This file changed on disk. Your edits have not been overwritten.",LPe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",IPe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",$Pe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",BPe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",PPe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LPe():t==="fa"?IPe():t==="ar"?$Pe():t==="es"?BPe():t==="hi"?PPe():DPe()}),FPe=()=>"Compile failed",HPe=()=>"编译失败",qPe=()=>"کامپایل ناموفق بود",UPe=()=>"فشل التجميع",GPe=()=>"Error al compilar",VPe=()=>"कंपाइल विफल",KPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HPe():t==="fa"?qPe():t==="ar"?UPe():t==="es"?GPe():t==="hi"?VPe():FPe()}),WPe=()=>"Compile PDF",QPe=()=>"编译 PDF",XPe=()=>"کامپایل PDF",YPe=()=>"تجميع PDF",ZPe=()=>"Compilar PDF",JPe=()=>"PDF कंपाइल करें",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QPe():t==="fa"?XPe():t==="ar"?YPe():t==="es"?ZPe():t==="hi"?JPe():WPe()}),eFe=()=>"Compiled, but the engine reported errors — check the output below.",tFe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",nFe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",rFe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",sFe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",iFe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",aFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tFe():t==="fa"?nFe():t==="ar"?rFe():t==="es"?sFe():t==="hi"?iFe():eFe()}),oFe=()=>"Copy command",cFe=()=>"复制命令",lFe=()=>"کپی فرمان",uFe=()=>"نسخ الأمر",_Fe=()=>"Copiar comando",fFe=()=>"कमांड कॉपी करें",dFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cFe():t==="fa"?lFe():t==="ar"?uFe():t==="es"?_Fe():t==="hi"?fFe():oFe()}),hFe=()=>"Copy file contents",pFe=()=>"复制文件内容",mFe=()=>"کپی محتوای فایل",gFe=()=>"نسخ محتوى الملف",vFe=()=>"Copiar contenido del archivo",bFe=()=>"फ़ाइल की सामग्री कॉपी करें",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pFe():t==="fa"?mFe():t==="ar"?gFe():t==="es"?vFe():t==="hi"?bFe():hFe()}),yFe=()=>"Could not copy file contents",xFe=()=>"无法复制文件内容",wFe=()=>"کپی محتوای فایل ممکن نشد",kFe=()=>"تعذّر نسخ محتوى الملف",SFe=()=>"No se pudo copiar el contenido del archivo",CFe=()=>"फ़ाइल की सामग्री कॉपी नहीं हो सकी",EFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xFe():t==="fa"?wFe():t==="ar"?kFe():t==="es"?SFe():t==="hi"?CFe():yFe()}),NFe=()=>"Copy install command",zFe=()=>"复制安装命令",jFe=()=>"کپی فرمان نصب",AFe=()=>"نسخ أمر التثبيت",TFe=()=>"Copiar comando de instalación",RFe=()=>"इंस्टॉल कमांड कॉपी करें",MFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zFe():t==="fa"?jFe():t==="ar"?AFe():t==="es"?TFe():t==="hi"?RFe():NFe()}),OFe=()=>"This file was deleted on disk. Your edits have not been discarded.",DFe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",LFe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",IFe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",$Fe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",BFe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DFe():t==="fa"?LFe():t==="ar"?IFe():t==="es"?$Fe():t==="hi"?BFe():OFe()}),PFe=()=>"Discard my edits and reload",FFe=()=>"放弃我的编辑并重新加载",HFe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",qFe=()=>"تجاهل تعديلاتي وإعادة التحميل",UFe=()=>"Descartar mis cambios y recargar",GFe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",VFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FFe():t==="fa"?HFe():t==="ar"?qFe():t==="es"?UFe():t==="hi"?GFe():PFe()}),KFe=()=>"Discard unsaved changes and close this file?",WFe=()=>"要丢弃未保存的更改并关闭此文件吗?",QFe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",XFe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",YFe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",ZFe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WFe():t==="fa"?QFe():t==="ar"?XFe():t==="es"?YFe():t==="hi"?ZFe():KFe()}),JFe=()=>"Dismiss",eHe=()=>"关闭",tHe=()=>"بستن",nHe=()=>"تجاهل",rHe=()=>"Cerrar",sHe=()=>"खारिज करें",iHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eHe():t==="fa"?tHe():t==="ar"?nHe():t==="es"?rHe():t==="hi"?sHe():JFe()}),aHe=()=>"Dismiss compile message",oHe=()=>"关闭编译消息",cHe=()=>"بستن پیام کامپایل",lHe=()=>"تجاهل رسالة التجميع",uHe=()=>"Cerrar mensaje de compilación",_He=()=>"कंपाइल संदेश खारिज करें",fHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe():t==="fa"?cHe():t==="ar"?lHe():t==="es"?uHe():t==="hi"?_He():aHe()}),dHe=()=>"Dismiss Overleaf message",hHe=()=>"关闭 Overleaf 消息",pHe=()=>"بستن پیام Overleaf",mHe=()=>"تجاهل رسالة Overleaf",gHe=()=>"Cerrar mensaje de Overleaf",vHe=()=>"Overleaf संदेश खारिज करें",bHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hHe():t==="fa"?pHe():t==="ar"?mHe():t==="es"?gHe():t==="hi"?vHe():dHe()}),yHe=()=>"Download",xHe=()=>"下载",wHe=()=>"بارگیری",kHe=()=>"تنزيل",SHe=()=>"Descargar",CHe=()=>"डाउनलोड करें",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xHe():t==="fa"?wHe():t==="ar"?kHe():t==="es"?SHe():t==="hi"?CHe():yHe()}),EHe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,NHe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,zHe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,jHe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,AHe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,THe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,RHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NHe(e):t==="fa"?zHe(e):t==="ar"?jHe(e):t==="es"?AHe(e):t==="hi"?THe(e):EHe(e)}),MHe=()=>"Failed to load file:",OHe=()=>"加载文件失败:",DHe=()=>"بارگیری فایل ناموفق بود:",LHe=()=>"تعذّر تحميل الملف:",IHe=()=>"Error al cargar el archivo:",$He=()=>"फ़ाइल लोड नहीं हो सकी:",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OHe():t==="fa"?DHe():t==="ar"?LHe():t==="es"?IHe():t==="hi"?$He():MHe()}),BHe=()=>"File truncated — showing the first 512 KB.",PHe=()=>"文件已截断——仅显示前 512 KB。",FHe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",HHe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",qHe=()=>"Archivo truncado — se muestran los primeros 512 KB.",UHe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",GHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PHe():t==="fa"?FHe():t==="ar"?HHe():t==="es"?qHe():t==="hi"?UHe():BHe()}),VHe=()=>"The page below stops partway — the full file could not be loaded.",KHe=()=>"下方页面在中途结束——无法加载完整文件。",WHe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",QHe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",XHe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",YHe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",ZHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KHe():t==="fa"?WHe():t==="ar"?QHe():t==="es"?XHe():t==="hi"?YHe():VHe()}),JHe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,eqe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,tqe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,nqe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,rqe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,sqe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,iqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe(e):t==="fa"?tqe(e):t==="ar"?nqe(e):t==="es"?rqe(e):t==="hi"?sqe(e):JHe(e)}),aqe=()=>"Loading…",oqe=()=>"正在加载…",cqe=()=>"در حال بارگیری…",lqe=()=>"جارٍ التحميل…",uqe=()=>"Cargando…",_qe=()=>"लोड हो रहा है…",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oqe():t==="fa"?cqe():t==="ar"?lqe():t==="es"?uqe():t==="hi"?_qe():aqe()}),fqe=()=>"File not found.",dqe=()=>"找不到文件。",hqe=()=>"فایل پیدا نشد.",pqe=()=>"لم يُعثر على الملف.",mqe=()=>"No se encontró el archivo.",gqe=()=>"फ़ाइल नहीं मिली।",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dqe():t==="fa"?hqe():t==="ar"?pqe():t==="es"?mqe():t==="hi"?gqe():fqe()}),vqe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,bqe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,yqe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,xqe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,wqe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,kqe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,Sqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bqe(e):t==="fa"?yqe(e):t==="ar"?xqe(e):t==="es"?wqe(e):t==="hi"?kqe(e):vqe(e)}),Cqe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,Eqe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Nqe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,zqe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,jqe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,Aqe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,Tqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Eqe(e):t==="fa"?Nqe(e):t==="ar"?zqe(e):t==="es"?jqe(e):t==="hi"?Aqe(e):Cqe(e)}),Rqe=()=>"File not found on disk.",Mqe=()=>"磁盘上找不到此文件。",Oqe=()=>"فایل روی دیسک پیدا نشد.",Dqe=()=>"لم يُعثر على الملف على القرص.",Lqe=()=>"No se encontró el archivo en disco.",Iqe=()=>"फ़ाइल डिस्क पर नहीं मिली।",$qe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mqe():t==="fa"?Oqe():t==="ar"?Dqe():t==="es"?Lqe():t==="hi"?Iqe():Rqe()}),Bqe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Pqe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,Fqe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Hqe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,qqe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,Uqe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,Gqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqe(e):t==="fa"?Fqe(e):t==="ar"?Hqe(e):t==="es"?qqe(e):t==="hi"?Uqe(e):Bqe(e)}),Vqe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Kqe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Wqe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,Qqe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,Xqe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,Yqe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,Zqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqe(e):t==="fa"?Wqe(e):t==="ar"?Qqe(e):t==="es"?Xqe(e):t==="hi"?Yqe(e):Vqe(e)}),Jqe=()=>"Open in default editor",eUe=()=>"在默认编辑器中打开",tUe=()=>"باز کردن در ویرایشگر پیش‌فرض",nUe=()=>"فتح في المحرر الافتراضي",rUe=()=>"Abrir en el editor predeterminado",sUe=()=>"डिफ़ॉल्ट एडिटर में खोलें",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe():t==="fa"?tUe():t==="ar"?nUe():t==="es"?rUe():t==="hi"?sUe():Jqe()}),iUe=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,aUe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,oUe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,cUe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,lUe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,uUe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,_Ue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aUe(e):t==="fa"?oUe(e):t==="ar"?cUe(e):t==="es"?lUe(e):t==="hi"?uUe(e):iUe(e)}),fUe=()=>"Only for projects on this computer",dUe=()=>"仅适用于此电脑上的项目",hUe=()=>"فقط برای پروژه‌های این رایانه",pUe=()=>"فقط للمشاريع على هذا الكمبيوتر",mUe=()=>"Solo para proyectos en este equipo",gUe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",vUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUe():t==="fa"?hUe():t==="ar"?pUe():t==="es"?mUe():t==="hi"?gUe():fUe()}),bUe=()=>"Only for files in the project folder",yUe=()=>"仅适用于项目文件夹中的文件",xUe=()=>"فقط برای فایل‌های پوشهٔ پروژه",wUe=()=>"فقط لملفات مجلد المشروع",kUe=()=>"Solo para archivos de la carpeta del proyecto",SUe=()=>"केवल प्रोजेक्ट फ़ोल्डर की फ़ाइलों के लिए",CUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yUe():t==="fa"?xUe():t==="ar"?wUe():t==="es"?kUe():t==="hi"?SUe():bUe()}),EUe=()=>"Overleaf's copy of this file was pulled while you had unsaved edits, so what you see is no longer what is on disk. Saving now sends this draft to Overleaf instead.",NUe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",zUe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",jUe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",AUe=()=>"Se descargó la copia de Overleaf de este archivo mientras tenías cambios sin guardar, así que lo que ves ya no coincide con lo que hay en disco. Si guardas ahora, este borrador se enviará a Overleaf.",TUe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",RUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NUe():t==="fa"?zUe():t==="ar"?jUe():t==="es"?AUe():t==="hi"?TUe():EUe()}),MUe=()=>"Overwrite disk file",OUe=()=>"覆盖磁盘文件",DUe=()=>"بازنویسی فایل روی دیسک",LUe=()=>"استبدال الملف على القرص",IUe=()=>"Sobrescribir el archivo en disco",$Ue=()=>"डिस्क फ़ाइल अधिलेखित करें",BUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OUe():t==="fa"?DUe():t==="ar"?LUe():t==="es"?IUe():t==="hi"?$Ue():MUe()}),PUe=()=>"Compiled PDF is out of date",FUe=()=>"已编译的 PDF 不是最新版本",HUe=()=>"PDF کامپایل‌شده به‌روز نیست",qUe=()=>"ملف PDF المُجمَّع غير محدَّث",UUe=()=>"El PDF compilado está desactualizado",GUe=()=>"कंपाइल की गई PDF पुरानी है",VUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FUe():t==="fa"?HUe():t==="ar"?qUe():t==="es"?UUe():t==="hi"?GUe():PUe()}),KUe=()=>"project clone",WUe=()=>"项目克隆",QUe=()=>"کلون پروژه",XUe=()=>"نسخة المشروع المستنسخة",YUe=()=>"el clon del proyecto",ZUe=()=>"प्रोजेक्ट क्लोन",C1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WUe():t==="fa"?QUe():t==="ar"?XUe():t==="es"?YUe():t==="hi"?ZUe():KUe()}),JUe=()=>"Recompile PDF",eGe=()=>"重新编译 PDF",tGe=()=>"کامپایل دوبارهٔ PDF",nGe=()=>"إعادة تجميع PDF",rGe=()=>"Volver a compilar el PDF",sGe=()=>"PDF फिर से कंपाइल करें",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eGe():t==="fa"?tGe():t==="ar"?nGe():t==="es"?rGe():t==="hi"?sGe():JUe()}),iGe=()=>"Reload from disk",aGe=()=>"从磁盘重新加载",oGe=()=>"بارگذاری مجدد از دیسک",cGe=()=>"إعادة التحميل من القرص",lGe=()=>"Recargar desde el disco",uGe=()=>"डिस्क से फिर से लोड करें",_Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe():t==="fa"?oGe():t==="ar"?cGe():t==="es"?lGe():t==="hi"?uGe():iGe()}),fGe=()=>"Reveal in file manager",dGe=()=>"在文件管理器中显示",hGe=()=>"نمایش در مدیر فایل",pGe=()=>"إظهار في مدير الملفات",mGe=()=>"Mostrar en el administrador de archivos",gGe=()=>"फ़ाइल मैनेजर में दिखाएँ",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dGe():t==="fa"?hGe():t==="ar"?pGe():t==="es"?mGe():t==="hi"?gGe():fGe()}),vGe=()=>"Save failed",bGe=()=>"保存失败",yGe=()=>"ذخیره ناموفق بود",xGe=()=>"فشل الحفظ",wGe=()=>"Error al guardar",kGe=()=>"सेव विफल",SGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bGe():t==="fa"?yGe():t==="ar"?xGe():t==="es"?wGe():t==="hi"?kGe():vGe()}),CGe=()=>"Saving…",EGe=()=>"正在保存…",NGe=()=>"در حال ذخیره…",zGe=()=>"جارٍ الحفظ…",jGe=()=>"Guardando…",AGe=()=>"सेव हो रहा है…",TGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EGe():t==="fa"?NGe():t==="ar"?zGe():t==="es"?jGe():t==="hi"?AGe():CGe()}),RGe=()=>"Selected — press ⌘C",MGe=()=>"已选中 — 按 ⌘C 复制",OGe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",DGe=()=>"محدد — اضغط ⌘C",LGe=()=>"Seleccionado — pulsa ⌘C",IGe=()=>"चयनित — ⌘C दबाएं",$Ge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MGe():t==="fa"?OGe():t==="ar"?DGe():t==="es"?LGe():t==="hi"?IGe():RGe()}),BGe=()=>"session’s worktree",PGe=()=>"会话工作树",FGe=()=>"درخت کاری نشست",HGe=()=>"شجرة عمل الجلسة",qGe=()=>"el árbol de trabajo de la sesión",UGe=()=>"सेशन की वर्कट्री",E1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PGe():t==="fa"?FGe():t==="ar"?HGe():t==="es"?qGe():t==="hi"?UGe():BGe()}),GGe=()=>"Show compiled PDF",VGe=()=>"显示已编译的 PDF",KGe=()=>"نمایش PDF کامپایل‌شده",WGe=()=>"عرض ملف PDF المُجمَّع",QGe=()=>"Mostrar el PDF compilado",XGe=()=>"कंपाइल की गई PDF दिखाएं",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VGe():t==="fa"?KGe():t==="ar"?WGe():t==="es"?QGe():t==="hi"?XGe():GGe()}),YGe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",ZGe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",JGe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",eVe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",tVe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",nVe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",rVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZGe():t==="fa"?JGe():t==="ar"?eVe():t==="es"?tVe():t==="hi"?nVe():YGe()}),sVe=()=>"This session's worktree isn't available — showing the project clone's copy.",iVe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",aVe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",oVe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",cVe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",lVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",uVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iVe():t==="fa"?aVe():t==="ar"?oVe():t==="es"?cVe():t==="hi"?lVe():sVe()}),_Ve=()=>"Unsaved",fVe=()=>"未保存",dVe=()=>"ذخیره نشده",hVe=()=>"غير محفوظ",pVe=()=>"Sin guardar",mVe=()=>"सेव नहीं हुआ",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fVe():t==="fa"?dVe():t==="ar"?hVe():t==="es"?pVe():t==="hi"?mVe():_Ve()}),gVe=()=>"Unsaved — ⌘S to save",vVe=()=>"未保存 — 按 ⌘S 保存",bVe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",yVe=()=>"غير محفوظ — ⌘S للحفظ",xVe=()=>"Sin guardar — ⌘S para guardar",wVe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",kVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVe():t==="fa"?bVe():t==="ar"?yVe():t==="es"?xVe():t==="hi"?wVe():gVe()}),SVe=()=>"Update orx on the remote machine to edit this file safely.",CVe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",EVe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",NVe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",zVe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",jVe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",AVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CVe():t==="fa"?EVe():t==="ar"?NVe():t==="es"?zVe():t==="hi"?jVe():SVe()}),TVe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",RVe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",MVe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",OVe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",DVe=()=>"El árbol de trabajo de esta sesión no está disponible y el archivo no está en el clon del proyecto ni en sus artefactos.",LVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",IVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RVe():t==="fa"?MVe():t==="ar"?OVe():t==="es"?DVe():t==="hi"?LVe():TVe()}),$Ve=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",BVe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",PVe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",FVe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",HVe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",qVe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",UVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BVe():t==="fa"?PVe():t==="ar"?FVe():t==="es"?HVe():t==="hi"?qVe():$Ve()}),GVe=()=>"Back to preview",VVe=()=>"返回预览",KVe=()=>"بازگشت به پیش‌نمایش",WVe=()=>"العودة إلى المعاينة",QVe=()=>"Volver a la vista previa",XVe=()=>"प्रीव्यू पर वापस जाएं",YVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VVe():t==="fa"?KVe():t==="ar"?WVe():t==="es"?QVe():t==="hi"?XVe():GVe()}),ZVe=e=>`${e==null?void 0:e.count} changed files`,JVe=e=>`${e==null?void 0:e.count} 个已更改文件`,eKe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,tKe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,nKe=e=>`${e==null?void 0:e.count} archivos modificados`,rKe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,yL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JVe(e):t==="fa"?eKe(e):t==="ar"?tKe(e):t==="es"?nKe(e):t==="hi"?rKe(e):ZVe(e)}),sKe=()=>"Changed files",iKe=()=>"已更改文件",aKe=()=>"فایل‌های تغییرکرده",oKe=()=>"الملفات المتغيّرة",cKe=()=>"Archivos modificados",lKe=()=>"बदली गई फ़ाइलें",uKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iKe():t==="fa"?aKe():t==="ar"?oKe():t==="es"?cKe():t==="hi"?lKe():sKe()}),_Ke=()=>"Diff preview truncated",fKe=()=>"差异预览已截断",dKe=()=>"پیش‌نمایش تفاوت کوتاه شده است",hKe=()=>"معاينة الفروق مقتطعة",pKe=()=>"Vista previa del diff truncada",mKe=()=>"डिफ़ प्रीव्यू छोटा किया गया",gKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fKe():t==="fa"?dKe():t==="ar"?hKe():t==="es"?pKe():t==="hi"?mKe():_Ke()}),vKe=e=>`${e==null?void 0:e.count} files shown (partial)`,bKe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,yKe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,xKe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,wKe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,kKe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,SKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bKe(e):t==="fa"?yKe(e):t==="ar"?xKe(e):t==="es"?wKe(e):t==="hi"?kKe(e):vKe(e)}),CKe=()=>"No changes.",EKe=()=>"没有更改。",NKe=()=>"تغییری وجود ندارد.",zKe=()=>"لا توجد تغييرات.",jKe=()=>"No hay cambios.",AKe=()=>"कोई बदलाव नहीं।",TKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EKe():t==="fa"?NKe():t==="ar"?zKe():t==="es"?jKe():t==="hi"?AKe():CKe()}),RKe=()=>"No complete file preview was available before the cutoff.",MKe=()=>"在截断位置之前没有完整的文件预览。",OKe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",DKe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",LKe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",IKe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",$Ke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MKe():t==="fa"?OKe():t==="ar"?DKe():t==="es"?LKe():t==="hi"?IKe():RKe()}),BKe=()=>"No textual diff for this file.",PKe=()=>"此文件没有文本差异。",FKe=()=>"برای این فایل تفاوت متنی وجود ندارد.",HKe=()=>"لا يوجد فرق نصّي لهذا الملف.",qKe=()=>"No hay diff de texto para este archivo.",UKe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",GKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PKe():t==="fa"?FKe():t==="ar"?HKe():t==="es"?qKe():t==="hi"?UKe():BKe()}),VKe=()=>"1 changed file",KKe=()=>"1 个已更改文件",WKe=()=>"۱ فایل تغییرکرده",QKe=()=>"ملف واحد معدَّل",XKe=()=>"1 archivo modificado",YKe=()=>"1 बदली गई फ़ाइल",xL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KKe():t==="fa"?WKe():t==="ar"?QKe():t==="es"?XKe():t==="hi"?YKe():VKe()}),ZKe=()=>"1 file shown (partial)",JKe=()=>"显示 1 个文件(部分)",eWe=()=>"۱ فایل نمایش داده شده (ناقص)",tWe=()=>"عُرض ملف واحد (جزئيًا)",nWe=()=>"1 archivo mostrado (parcial)",rWe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",sWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JKe():t==="fa"?eWe():t==="ar"?tWe():t==="es"?nWe():t==="hi"?rWe():ZKe()}),iWe=()=>"Unable to parse this diff.",aWe=()=>"无法解析此差异。",oWe=()=>"خواندن این تفاوت ممکن نبود.",cWe=()=>"تعذّر تحليل هذا الفرق.",lWe=()=>"No se pudo interpretar este diff.",uWe=()=>"यह डिफ़ पार्स नहीं हो सका।",_We=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aWe():t==="fa"?oWe():t==="ar"?cWe():t==="es"?lWe():t==="hi"?uWe():iWe()}),fWe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,dWe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,hWe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,pWe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,mWe=e=>`Se muestran los primeros ${e==null?void 0:e.limit} (${e==null?void 0:e.read} leídos). Consulta el diff completo en local con git.`,gWe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,vWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dWe(e):t==="fa"?hWe(e):t==="ar"?pWe(e):t==="es"?mWe(e):t==="hi"?gWe(e):fWe(e)}),bWe=()=>"View full diff",yWe=()=>"查看完整差异",xWe=()=>"نمایش تفاوت کامل",wWe=()=>"عرض الفرق الكامل",kWe=()=>"Ver diff completo",SWe=()=>"पूरा डिफ़ देखें",CWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yWe():t==="fa"?xWe():t==="ar"?wWe():t==="es"?kWe():t==="hi"?SWe():bWe()}),EWe=()=>"Create a token ↗",NWe=()=>"创建令牌 ↗",zWe=()=>"ساخت توکن ↗",jWe=()=>"إنشاء رمز ↗",AWe=()=>"Crear un token ↗",TWe=()=>"एक टोकन बनाएं ↗",RWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NWe():t==="fa"?zWe():t==="ar"?jWe():t==="es"?AWe():t==="hi"?TWe():EWe()}),MWe=()=>"Keep the agent working toward a goal",OWe=()=>"让智能体持续朝目标推进",DWe=()=>"عامل را در مسیر یک هدف نگه دارید",LWe=()=>"اجعل الوكيل يعمل نحو هدف",IWe=()=>"Mantén al agente trabajando hacia un objetivo",$We=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",BWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OWe():t==="fa"?DWe():t==="ar"?LWe():t==="es"?IWe():t==="hi"?$We():MWe()}),PWe=()=>"Approve and run",FWe=()=>"批准并运行",HWe=()=>"تأیید و اجرا",qWe=()=>"الموافقة والتشغيل",UWe=()=>"Aprobar y ejecutar",GWe=()=>"स्वीकार करें और चलाएं",VWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FWe():t==="fa"?HWe():t==="ar"?qWe():t==="es"?UWe():t==="hi"?GWe():PWe()}),KWe=()=>"Cancel setup",WWe=()=>"取消设置",QWe=()=>"لغو راه‌اندازی",XWe=()=>"إلغاء الإعداد",YWe=()=>"Cancelar configuración",ZWe=()=>"सेटअप रद्द करें",JWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WWe():t==="fa"?QWe():t==="ar"?XWe():t==="es"?YWe():t==="hi"?ZWe():KWe()}),eQe=()=>"Checking connection…",tQe=()=>"正在检查连接…",nQe=()=>"در حال بررسی اتصال…",rQe=()=>"جارٍ التحقق من الإعداد…",sQe=()=>"Comprobando conexión…",iQe=()=>"कनेक्शन जाँचा जा रहा है…",aQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tQe():t==="fa"?nQe():t==="ar"?rQe():t==="es"?sQe():t==="hi"?iQe():eQe()}),oQe=e=>`${e==null?void 0:e.agent} is connected.`,cQe=e=>`${e==null?void 0:e.agent} 已连接。`,lQe=e=>`${e==null?void 0:e.agent} متصل است.`,uQe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,_Qe=e=>`${e==null?void 0:e.agent} está conectado.`,fQe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,dQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cQe(e):t==="fa"?lQe(e):t==="ar"?uQe(e):t==="es"?_Qe(e):t==="hi"?fQe(e):oQe(e)}),hQe=()=>"Setup needs attention.",pQe=()=>"设置需要处理。",mQe=()=>"راه‌اندازی نیاز به بررسی دارد.",gQe=()=>"تعذّر إكمال الإعداد.",vQe=()=>"La configuración requiere atención.",bQe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pQe():t==="fa"?mQe():t==="ar"?gQe():t==="es"?vQe():t==="hi"?bQe():hQe()}),yQe=()=>"Install",xQe=()=>"安装",wQe=()=>"نصب",kQe=()=>"تثبيت",SQe=()=>"Instalar",CQe=()=>"इंस्टॉल करें",EQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xQe():t==="fa"?wQe():t==="ar"?kQe():t==="es"?SQe():t==="hi"?CQe():yQe()}),NQe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,zQe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,jQe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,AQe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,TQe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,RQe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,MQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zQe(e):t==="fa"?jQe(e):t==="ar"?AQe(e):t==="es"?TQe(e):t==="hi"?RQe(e):NQe(e)}),OQe=()=>"Could not load setup commands.",DQe=()=>"无法加载设置命令。",LQe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",IQe=()=>"تعذّر تحميل أوامر الإعداد.",$Qe=()=>"No se pudieron cargar los comandos de configuración.",BQe=()=>"सेटअप कमांड लोड नहीं हो सके।",PQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DQe():t==="fa"?LQe():t==="ar"?IQe():t==="es"?$Qe():t==="hi"?BQe():OQe()}),FQe=()=>"Sign in",HQe=()=>"登录",qQe=()=>"ورود",UQe=()=>"تسجيل الدخول",GQe=()=>"Iniciar sesión",VQe=()=>"साइन इन करें",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HQe():t==="fa"?qQe():t==="ar"?UQe():t==="es"?GQe():t==="hi"?VQe():FQe()}),KQe=()=>"The agent is not ready yet. Re-check or retry sign-in.",WQe=()=>"代理尚未就绪。请重新检查或重试登录。",QQe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",XQe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",YQe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",ZQe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WQe():t==="fa"?QQe():t==="ar"?XQe():t==="es"?YQe():t==="hi"?ZQe():KQe()}),JQe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",eXe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",tXe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",nXe=()=>"يفتح طرفية هنا",rXe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",sXe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",iXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eXe():t==="fa"?tXe():t==="ar"?nXe():t==="es"?rXe():t==="hi"?sXe():JQe()}),aXe=()=>"This install command requires Node.js and npm.",oXe=()=>"此安装命令需要 Node.js 和 npm。",cXe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",lXe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",uXe=()=>"Este comando de instalación requiere Node.js y npm.",_Xe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",fXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oXe():t==="fa"?cXe():t==="ar"?lXe():t==="es"?uXe():t==="hi"?_Xe():aXe()}),dXe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,hXe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,pXe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,mXe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,gXe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,vXe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,bXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hXe(e):t==="fa"?pXe(e):t==="ar"?mXe(e):t==="es"?gXe(e):t==="hi"?vXe(e):dXe(e)}),yXe=e=>`Set up ${e==null?void 0:e.agent}`,xXe=e=>`设置 ${e==null?void 0:e.agent}`,wXe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,kXe=e=>`إعداد ${e==null?void 0:e.agent}`,SXe=e=>`Configurar ${e==null?void 0:e.agent}`,CXe=e=>`${e==null?void 0:e.agent} सेट अप करें`,mz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xXe(e):t==="fa"?wXe(e):t==="ar"?kXe(e):t==="es"?SXe(e):t==="hi"?CXe(e):yXe(e)}),EXe=()=>"Update",NXe=()=>"更新",zXe=()=>"به‌روزرسانی",jXe=()=>"تحديث",AXe=()=>"Actualizar",TXe=()=>"अपडेट करें",RXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NXe():t==="fa"?zXe():t==="ar"?jXe():t==="es"?AXe():t==="hi"?TXe():EXe()}),MXe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,OXe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,DXe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,LXe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,IXe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,$Xe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,BXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OXe(e):t==="fa"?DXe(e):t==="ar"?LXe(e):t==="es"?IXe(e):t==="hi"?$Xe(e):MXe(e)}),PXe=()=>"Hide sidebar",FXe=()=>"隐藏侧边栏",HXe=()=>"پنهان کردن نوار کناری",qXe=()=>"إخفاء الشريط الجانبي",UXe=()=>"Ocultar barra lateral",GXe=()=>"साइडबार छिपाएं",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FXe():t==="fa"?HXe():t==="ar"?qXe():t==="es"?UXe():t==="hi"?GXe():PXe()}),VXe=()=>"Project",KXe=()=>"项目",WXe=()=>"پروژه",QXe=()=>"المشروع",XXe=()=>"Proyecto",YXe=()=>"प्रोजेक्ट",ZXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KXe():t==="fa"?WXe():t==="ar"?QXe():t==="es"?XXe():t==="hi"?YXe():VXe()}),JXe=e=>`${e==null?void 0:e.count} cancelled`,eYe=e=>`${e==null?void 0:e.count} 次取消`,tYe=e=>`${e==null?void 0:e.count} لغوشده`,nYe=e=>`الملغاة: ${e==null?void 0:e.count}`,rYe=e=>`${e==null?void 0:e.count} canceladas`,sYe=e=>`${e==null?void 0:e.count} रद्द`,iYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eYe(e):t==="fa"?tYe(e):t==="ar"?nYe(e):t==="es"?rYe(e):t==="hi"?sYe(e):JXe(e)}),aYe=e=>`${e==null?void 0:e.count} done`,oYe=e=>`${e==null?void 0:e.count} 次完成`,cYe=e=>`${e==null?void 0:e.count} تمام‌شده`,lYe=e=>`المكتملة: ${e==null?void 0:e.count}`,uYe=e=>`${e==null?void 0:e.count} completadas`,_Ye=e=>`${e==null?void 0:e.count} पूरे`,fYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oYe(e):t==="fa"?cYe(e):t==="ar"?lYe(e):t==="es"?uYe(e):t==="hi"?_Ye(e):aYe(e)}),dYe=e=>`${e==null?void 0:e.count} failed`,hYe=e=>`${e==null?void 0:e.count} 次失败`,pYe=e=>`${e==null?void 0:e.count} ناموفق`,mYe=e=>`الفاشلة: ${e==null?void 0:e.count}`,gYe=e=>`${e==null?void 0:e.count} con error`,vYe=e=>`${e==null?void 0:e.count} विफल`,bYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hYe(e):t==="fa"?pYe(e):t==="ar"?mYe(e):t==="es"?gYe(e):t==="hi"?vYe(e):dYe(e)}),yYe=e=>`${e==null?void 0:e.count} files`,xYe=e=>`${e==null?void 0:e.count} 个文件`,wYe=e=>`${e==null?void 0:e.count} فایل`,kYe=e=>`الملفات: ${e==null?void 0:e.count}`,SYe=e=>`${e==null?void 0:e.count} archivos`,CYe=e=>`${e==null?void 0:e.count} फ़ाइलें`,EYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xYe(e):t==="fa"?wYe(e):t==="ar"?kYe(e):t==="es"?SYe(e):t==="hi"?CYe(e):yYe(e)}),NYe=e=>`${e==null?void 0:e.count}+ files`,zYe=e=>`至少 ${e==null?void 0:e.count} 个文件`,jYe=e=>`بیش از ${e==null?void 0:e.count} فایل`,AYe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,TYe=e=>`${e==null?void 0:e.count}+ archivos`,RYe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,MYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zYe(e):t==="fa"?jYe(e):t==="ar"?AYe(e):t==="es"?TYe(e):t==="hi"?RYe(e):NYe(e)}),OYe=e=>`${e==null?void 0:e.count} live`,DYe=e=>`${e==null?void 0:e.count} 次进行中`,LYe=e=>`${e==null?void 0:e.count} فعال`,IYe=e=>`النشطة: ${e==null?void 0:e.count}`,$Ye=e=>`${e==null?void 0:e.count} en curso`,BYe=e=>`${e==null?void 0:e.count} लाइव`,PYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DYe(e):t==="fa"?LYe(e):t==="ar"?IYe(e):t==="es"?$Ye(e):t==="hi"?BYe(e):OYe(e)}),FYe=()=>"1 file",HYe=()=>"1 个文件",qYe=()=>"۱ فایل",UYe=()=>"ملف واحد",GYe=()=>"1 archivo",VYe=()=>"1 फ़ाइल",KYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HYe():t==="fa"?qYe():t==="ar"?UYe():t==="es"?GYe():t==="hi"?VYe():FYe()}),WYe=()=>"1 run",QYe=()=>"1 次运行",XYe=()=>"۱ اجرا",YYe=()=>"تشغيل واحد",ZYe=()=>"1 ejecución",JYe=()=>"1 रन",eZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QYe():t==="fa"?XYe():t==="ar"?YYe():t==="es"?ZYe():t==="hi"?JYe():WYe()}),tZe=e=>`${e==null?void 0:e.count} runs`,nZe=e=>`${e==null?void 0:e.count} 次运行`,rZe=e=>`${e==null?void 0:e.count} اجرا`,sZe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,iZe=e=>`${e==null?void 0:e.count} ejecuciones`,aZe=e=>`${e==null?void 0:e.count} रन`,oZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nZe(e):t==="fa"?rZe(e):t==="ar"?sZe(e):t==="es"?iZe(e):t==="hi"?aZe(e):tZe(e)}),cZe=()=>"Zoom in",lZe=()=>"放大",uZe=()=>"بزرگ‌نمایی",_Ze=()=>"تكبير",fZe=()=>"Acercar",dZe=()=>"ज़ूम इन",vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lZe():t==="fa"?uZe():t==="ar"?_Ze():t==="es"?fZe():t==="hi"?dZe():cZe()}),hZe=()=>"Zoom out",pZe=()=>"缩小",mZe=()=>"کوچک‌نمایی",gZe=()=>"تصغير",vZe=()=>"Alejar",bZe=()=>"ज़ूम आउट",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pZe():t==="fa"?mZe():t==="ar"?gZe():t==="es"?vZe():t==="hi"?bZe():hZe()}),yZe=()=>"Reset zoom to fit",xZe=()=>"重置为适合窗口",wZe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",kZe=()=>"إعادة ضبط التكبير للملاءمة",SZe=()=>"Restablecer zoom para ajustar",CZe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xZe():t==="fa"?wZe():t==="ar"?kZe():t==="es"?SZe():t==="hi"?CZe():yZe()}),EZe=()=>"No instances yet.",NZe=()=>"还没有实例。",zZe=()=>"هنوز نمونه‌ای وجود ندارد.",jZe=()=>"لا توجد مثيلات بعد.",AZe=()=>"Aún no hay instancias.",TZe=()=>"अभी तक कोई इंस्टेंस नहीं।",RZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NZe():t==="fa"?zZe():t==="ar"?jZe():t==="es"?AZe():t==="hi"?TZe():EZe()}),MZe=()=>"Nothing running right now.",OZe=()=>"当前没有运行中的实例。",DZe=()=>"اکنون چیزی در حال اجرا نیست.",LZe=()=>"لا شيء قيد التشغيل الآن.",IZe=()=>"No hay nada en ejecución ahora mismo.",$Ze=()=>"अभी कुछ नहीं चल रहा।",BZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZe():t==="fa"?DZe():t==="ar"?LZe():t==="es"?IZe():t==="hi"?$Ze():MZe()}),PZe=()=>"Select a project to see its history.",FZe=()=>"请选择一个项目以查看其历史记录。",HZe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",qZe=()=>"اختر مشروعًا لرؤية سجله.",UZe=()=>"Selecciona un proyecto para ver su historial.",GZe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",VZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FZe():t==="fa"?HZe():t==="ar"?qZe():t==="es"?UZe():t==="hi"?GZe():PZe()}),KZe=()=>"Select a project to see its runs.",WZe=()=>"请选择一个项目以查看其运行。",QZe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",XZe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",YZe=()=>"Selecciona un proyecto para ver sus ejecuciones.",ZZe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",JZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WZe():t==="fa"?QZe():t==="ar"?XZe():t==="es"?YZe():t==="hi"?ZZe():KZe()}),eJe=()=>"View history",tJe=()=>"查看历史记录",nJe=()=>"مشاهدهٔ تاریخچه",rJe=()=>"عرض السجل",sJe=()=>"Ver historial",iJe=()=>"इतिहास देखें",aJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tJe():t==="fa"?nJe():t==="ar"?rJe():t==="es"?sJe():t==="hi"?iJe():eJe()}),oJe=e=>`View history (${e==null?void 0:e.count})`,cJe=e=>`查看历史记录(${e==null?void 0:e.count})`,lJe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,uJe=e=>`عرض السجل (${e==null?void 0:e.count})`,_Je=e=>`Ver historial (${e==null?void 0:e.count})`,fJe=e=>`इतिहास देखें (${e==null?void 0:e.count})`,dJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cJe(e):t==="fa"?lJe(e):t==="ar"?uJe(e):t==="es"?_Je(e):t==="hi"?fJe(e):oJe(e)}),hJe=()=>"The engine exited without producing a PDF or a log.",pJe=()=>"引擎已退出,但没有生成 PDF 或日志。",mJe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",gJe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",vJe=()=>"El motor terminó sin generar un PDF ni un log.",bJe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",yJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pJe():t==="fa"?mJe():t==="ar"?gJe():t==="es"?vJe():t==="hi"?bJe():hJe()}),xJe=()=>"Loading…",wJe=()=>"正在加载…",kJe=()=>"در حال بارگیری…",SJe=()=>"جارٍ التحميل…",CJe=()=>"Cargando…",EJe=()=>"लोड हो रहा है…",NJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wJe():t==="fa"?kJe():t==="ar"?SJe():t==="es"?CJe():t==="hi"?EJe():xJe()}),zJe=()=>"Add local model",jJe=()=>"添加本地模型",AJe=()=>"افزودن مدل محلی",TJe=()=>"إضافة نموذج محلي",RJe=()=>"Añadir modelo local",MJe=()=>"लोकल मॉडल जोड़ें",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jJe():t==="fa"?AJe():t==="ar"?TJe():t==="es"?RJe():t==="hi"?MJe():zJe()}),OJe=()=>"Local server address",DJe=()=>"本地服务器地址",LJe=()=>"نشانی سرور محلی",IJe=()=>"عنوان الخادم المحلي",$Je=()=>"Dirección del servidor local",BJe=()=>"लोकल सर्वर पता",PJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DJe():t==="fa"?LJe():t==="ar"?IJe():t==="es"?$Je():t==="hi"?BJe():OJe()}),FJe=()=>"Find models",HJe=()=>"查找模型",qJe=()=>"یافتن مدل‌ها",UJe=()=>"العثور على النماذج",GJe=()=>"Buscar modelos",VJe=()=>"मॉडल खोजें",KJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HJe():t==="fa"?qJe():t==="ar"?UJe():t==="es"?GJe():t==="hi"?VJe():FJe()}),WJe=()=>"(OpenAI compatible)",QJe=()=>"(兼容 OpenAI)",XJe=()=>"(سازگار با OpenAI)",YJe=()=>"(متوافق مع OpenAI)",ZJe=()=>"(compatible con OpenAI)",JJe=()=>"(OpenAI संगत)",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QJe():t==="fa"?XJe():t==="ar"?YJe():t==="es"?ZJe():t==="hi"?JJe():WJe()}),eet=()=>"Saved, but OpenCode did not list this model. Check installed agents again. If your OpenCode config restricts enabled providers, allow this connection before using it.",tet=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",net=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",ret=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",set=()=>"Guardado, pero OpenCode no mostró este modelo. Vuelve a comprobar los agentes instalados. Si tu configuración de OpenCode limita los proveedores habilitados, permite esta conexión antes de usarla.",iet=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",aet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tet():t==="fa"?net():t==="ar"?ret():t==="es"?set():t==="hi"?iet():eet()}),oet=()=>"Connected",cet=()=>"已连接",uet=()=>"متصل شد",_et=()=>"متصل",fet=()=>"Conectado",det=()=>"कनेक्टेड",het=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cet():t==="fa"?uet():t==="ar"?_et():t==="es"?fet():t==="hi"?det():oet()}),pet=()=>"Context window",met=()=>"上下文窗口",get=()=>"پنجرهٔ زمینه",vet=()=>"نافذة السياق",bet=()=>"Ventana de contexto",yet=()=>"कॉन्टेक्स्ट विंडो",xet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?met():t==="fa"?get():t==="ar"?vet():t==="es"?bet():t==="hi"?yet():pet()}),wet=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",ket=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",Cet=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",Eet=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",Net=()=>"Usa la misma ventana de contexto que tengas cargada en tu app de modelos. 32K es un buen punto de partida para herramientas; los contextos más grandes usan más memoria.",zet=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",jet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ket():t==="fa"?Cet():t==="ar"?Eet():t==="es"?Net():t==="hi"?zet():wet()}),Aet=()=>"Custom Endpoint",Tet=()=>"自定义端点",Ret=()=>"نقطهٔ اتصال سفارشی",Met=()=>"نقطة نهاية مخصصة",Oet=()=>"Endpoint personalizado",Det=()=>"कस्टम एंडपॉइंट",jS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tet():t==="fa"?Ret():t==="ar"?Met():t==="es"?Oet():t==="hi"?Det():Aet()}),Let=e=>`Disconnect ${e==null?void 0:e.name}`,Iet=e=>`断开 ${e==null?void 0:e.name}`,$et=e=>`قطع اتصال ${e==null?void 0:e.name}`,Bet=e=>`قطع اتصال ${e==null?void 0:e.name}`,Pet=e=>`Desconectar ${e==null?void 0:e.name}`,Fet=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,Het=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iet(e):t==="fa"?$et(e):t==="ar"?Bet(e):t==="es"?Pet(e):t==="hi"?Fet(e):Let(e)}),qet=()=>"Get OpenCode",Uet=()=>"获取 OpenCode",Get=()=>"دریافت OpenCode",Vet=()=>"الحصول على OpenCode",Ket=()=>"Obtener OpenCode",Wet=()=>"OpenCode लें",Qet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uet():t==="fa"?Get():t==="ar"?Vet():t==="es"?Ket():t==="hi"?Wet():qet()}),Xet=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",Yet=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",Zet=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",Jet=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",ett=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",ttt=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",ntt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yet():t==="fa"?Zet():t==="ar"?Jet():t==="es"?ett():t==="hi"?ttt():Xet()}),rtt=()=>"API key (optional)",stt=()=>"API 密钥(可选)",itt=()=>"کلید API (اختیاری)",att=()=>"مفتاح API (اختياري)",ott=()=>"Clave de API (opcional)",ctt=()=>"API की (वैकल्पिक)",ltt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?stt():t==="fa"?itt():t==="ar"?att():t==="es"?ott():t==="hi"?ctt():rtt()}),utt=()=>"Save model",_tt=()=>"保存模型",ftt=()=>"ذخیرهٔ مدل",dtt=()=>"حفظ النموذج",htt=()=>"Guardar modelo",ptt=()=>"मॉडल सेव करें",mtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_tt():t==="fa"?ftt():t==="ar"?dtt():t==="es"?htt():t==="hi"?ptt():utt()}),gtt=()=>"Model server",vtt=()=>"模型服务器",btt=()=>"سرور مدل",ytt=()=>"خادم النموذج",xtt=()=>"Servidor del modelo",wtt=()=>"मॉडल सर्वर",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vtt():t==="fa"?btt():t==="ar"?ytt():t==="es"?xtt():t==="hi"?wtt():gtt()}),ktt=()=>"Local models",Stt=()=>"本地模型",Ctt=()=>"مدل‌های محلی",Ett=()=>"النماذج المحلية",Ntt=()=>"Modelos locales",ztt=()=>"लोकल मॉडल",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Stt():t==="fa"?Ctt():t==="ar"?Ett():t==="es"?Ntt():t==="hi"?ztt():ktt()}),jtt=()=>"API token (optional)",Att=()=>"API 令牌(可选)",Ttt=()=>"توکن API (اختیاری)",Rtt=()=>"رمز API (اختياري)",Mtt=()=>"Token de API (opcional)",Ott=()=>"API टोकन (वैकल्पिक)",Dtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Att():t==="fa"?Ttt():t==="ar"?Rtt():t==="es"?Mtt():t==="hi"?Ott():jtt()}),Ltt=()=>"Copy",Itt=()=>"复制",$tt=()=>"کپی",Btt=()=>"نسخ",Ptt=()=>"Copiar",Ftt=()=>"कॉपी करें",AS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Itt():t==="fa"?$tt():t==="ar"?Btt():t==="es"?Ptt():t==="hi"?Ftt():Ltt()}),Htt=()=>"Copy code",qtt=()=>"复制代码",Utt=()=>"کپی کد",Gtt=()=>"نسخ الشيفرة",Vtt=()=>"Copiar código",Ktt=()=>"कोड कॉपी करें",Wtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qtt():t==="fa"?Utt():t==="ar"?Gtt():t==="es"?Vtt():t==="hi"?Ktt():Htt()}),Qtt=()=>"Download",Xtt=()=>"下载",Ytt=()=>"بارگیری",Ztt=()=>"تنزيل",Jtt=()=>"Descargar",ent=()=>"डाउनलोड करें",B3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xtt():t==="fa"?Ytt():t==="ar"?Ztt():t==="es"?Jtt():t==="hi"?ent():Qtt()}),tnt=()=>"This browser can’t preview this media format.",nnt=()=>"此浏览器无法预览该媒体格式。",rnt=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",snt=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",int=()=>"Este navegador no puede mostrar este formato multimedia.",ant=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",ont=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nnt():t==="fa"?rnt():t==="ar"?snt():t==="es"?int():t==="hi"?ant():tnt()}),cnt=()=>"Choose the model for this chat",lnt=()=>"选择此聊天的模型",unt=()=>"انتخاب مدل این گفت‌وگو",_nt=()=>"اختيار نموذج هذه المحادثة",fnt=()=>"Elige el modelo de este chat",dnt=()=>"इस चैट के लिए मॉडल चुनें",hnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lnt():t==="fa"?unt():t==="ar"?_nt():t==="es"?fnt():t==="hi"?dnt():cnt()}),pnt=()=>"Add Local Model",mnt=()=>"添加本地模型",gnt=()=>"افزودن مدل محلی",vnt=()=>"إضافة نموذج محلي",bnt=()=>"Añadir modelo local",ynt=()=>"लोकल मॉडल जोड़ें",xnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mnt():t==="fa"?gnt():t==="ar"?vnt():t==="es"?bnt():t==="hi"?ynt():pnt()}),wnt=()=>"Autonomy",knt=()=>"自主程度",Snt=()=>"خودمختاری",Cnt=()=>"الاستقلالية",Ent=()=>"Autonomía",Nnt=()=>"स्वायत्तता",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?knt():t==="fa"?Snt():t==="ar"?Cnt():t==="es"?Ent():t==="hi"?Nnt():wnt()}),znt=()=>"Agentic",jnt=()=>"自主",Ant=()=>"خودکار",Tnt=()=>"وكيل مستقل",Rnt=()=>"Agéntico",Mnt=()=>"एजेंटिक",Ont=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jnt():t==="fa"?Ant():t==="ar"?Tnt():t==="es"?Rnt():t==="hi"?Mnt():znt()}),Dnt=()=>"Runs the research on its own and checks in when needed.",Lnt=()=>"独立推进研究,必要时再与你确认。",Int=()=>"پژوهش را خودش پیش می‌برد و در صورت نیاز با شما هماهنگ می‌کند.",$nt=()=>"يدير البحث بنفسه ويراجعك عند الحاجة.",Bnt=()=>"Dirige la investigación por su cuenta y consulta cuando hace falta.",Pnt=()=>"शोध खुद चलाता है और ज़रूरत पड़ने पर पूछता है।",Fnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lnt():t==="fa"?Int():t==="ar"?$nt():t==="es"?Bnt():t==="hi"?Pnt():Dnt()}),Hnt=()=>"Copilot",qnt=()=>"副驾驶",Unt=()=>"کمک‌خلبان",Gnt=()=>"مساعد",Vnt=()=>"Copiloto",Knt=()=>"कोपायलट",Wnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qnt():t==="fa"?Unt():t==="ar"?Gnt():t==="es"?Vnt():t==="hi"?Knt():Hnt()}),Qnt=()=>"Explains its reasoning and asks before acting.",Xnt=()=>"解释思路,行动前先征得你的同意。",Ynt=()=>"استدلالش را توضیح می‌دهد و پیش از اقدام اجازه می‌گیرد.",Znt=()=>"يشرح منطقه ويطلب موافقتك قبل التنفيذ.",Jnt=()=>"Explica su razonamiento y pide aprobación antes de actuar.",ert=()=>"अपना तर्क समझाता है और कार्य करने से पहले अनुमति लेता है।",trt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xnt():t==="fa"?Ynt():t==="ar"?Znt():t==="es"?Jnt():t==="hi"?ert():Qnt()}),nrt=()=>" · CLI configuration",rrt=()=>" · CLI 配置",srt=()=>" · پیکربندی CLI",irt=()=>" · إعداد واجهة سطر الأوامر",art=()=>" · Configuración de la CLI",ort=()=>" · CLI कॉन्फ़िगरेशन",crt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rrt():t==="fa"?srt():t==="ar"?irt():t==="es"?art():t==="hi"?ort():nrt()}),lrt=()=>"· Default",urt=()=>"· 默认",_rt=()=>"· پیش‌فرض",frt=()=>"· الافتراضي",drt=()=>"· Predeterminado",hrt=()=>"· डिफ़ॉल्ट",NL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?urt():t==="fa"?_rt():t==="ar"?frt():t==="es"?drt():t==="hi"?hrt():lrt()}),prt=()=>"Default model",mrt=()=>"默认模型",grt=()=>"مدل پیش‌فرض",vrt=()=>"النموذج الافتراضي",brt=()=>"Modelo predeterminado",yrt=()=>"डिफ़ॉल्ट मॉडल",P3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mrt():t==="fa"?grt():t==="ar"?vrt():t==="es"?brt():t==="hi"?yrt():prt()}),xrt=()=>"Detecting harnesses…",wrt=()=>"正在检测智能体工具…",krt=()=>"در حال شناسایی ابزارهای عامل…",Srt=()=>"جارٍ اكتشاف أدوات البرمجة…",Crt=()=>"Detectando agentes…",Ert=()=>"हार्नेस पहचाने जा रहे हैं…",Nrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wrt():t==="fa"?krt():t==="ar"?Srt():t==="es"?Crt():t==="hi"?Ert():xrt()}),zrt=()=>"Effort",jrt=()=>"推理强度",Art=()=>"میزان استدلال",Trt=()=>"الجهد",Rrt=()=>"Esfuerzo",Mrt=()=>"प्रयास स्तर",Ort=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jrt():t==="fa"?Art():t==="ar"?Trt():t==="es"?Rrt():t==="hi"?Mrt():zrt()}),Drt=()=>"Fast speed ·",Lrt=()=>"快速 ·",Irt=()=>"سرعت بالا ·",$rt=()=>"سرعة عالية ·",Brt=()=>"Modo rápido ·",Prt=()=>"तेज़ गति ·",Frt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lrt():t==="fa"?Irt():t==="ar"?$rt():t==="es"?Brt():t==="hi"?Prt():Drt()}),Hrt=()=>"Mode",qrt=()=>"模式",Urt=()=>"حالت",Grt=()=>"الوضع",Vrt=()=>"Modo",Krt=()=>"मोड",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qrt():t==="fa"?Urt():t==="ar"?Grt():t==="es"?Vrt():t==="hi"?Krt():Hrt()}),Wrt=()=>"Model",Qrt=()=>"模型",Xrt=()=>"مدل",Yrt=()=>"النموذج",Zrt=()=>"Modelo",Jrt=()=>"मॉडल",O0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qrt():t==="fa"?Xrt():t==="ar"?Yrt():t==="es"?Zrt():t==="hi"?Jrt():Wrt()}),est=e=>`${e==null?void 0:e.count} more — search to find`,tst=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,nst=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,rst=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,sst=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,ist=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,ast=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tst(e):t==="fa"?nst(e):t==="ar"?rst(e):t==="es"?sst(e):t==="hi"?ist(e):est(e)}),ost=()=>"Not available",cst=()=>"不可用",lst=()=>"در دسترس نیست",ust=()=>"غير متاح",_st=()=>"No disponible",fst=()=>"उपलब्ध नहीं",dst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cst():t==="fa"?lst():t==="ar"?ust():t==="es"?_st():t==="hi"?fst():ost()}),hst=()=>"Search models…",pst=()=>"搜索模型…",mst=()=>"جست‌وجوی مدل‌ها…",gst=()=>"البحث في النماذج…",vst=()=>"Buscar modelos…",bst=()=>"मॉडल खोजें…",yst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pst():t==="fa"?mst():t==="ar"?gst():t==="es"?vst():t==="hi"?bst():hst()}),xst=()=>"Search or enter model ID…",wst=()=>"搜索或输入模型 ID…",kst=()=>"جست‌وجو یا ورود شناسه مدل…",Sst=()=>"ابحث أو أدخل معرّف النموذج…",Cst=()=>"Buscar o introducir ID…",Est=()=>"खोजें या मॉडल ID डालें…",Nst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wst():t==="fa"?kst():t==="ar"?Sst():t==="es"?Cst():t==="hi"?Est():xst()}),zst=()=>"Sessions keep their harness. Start a new chat to switch.",jst=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Ast=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Tst=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Rst=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Mst=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Ost=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jst():t==="fa"?Ast():t==="ar"?Tst():t==="es"?Rst():t==="hi"?Mst():zst()}),Dst=()=>"Speed",Lst=()=>"速度",Ist=()=>"سرعت",$st=()=>"السرعة",Bst=()=>"Velocidad",Pst=()=>"गति",Cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lst():t==="fa"?Ist():t==="ar"?$st():t==="es"?Bst():t==="hi"?Pst():Dst()}),Fst=()=>"Unavailable",Hst=()=>"不可用",qst=()=>"در دسترس نیست",Ust=()=>"غير متاح",Gst=()=>"No disponible",Vst=()=>"उपलब्ध नहीं",ho=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hst():t==="fa"?qst():t==="ar"?Ust():t==="es"?Gst():t==="hi"?Vst():Fst()}),Kst=()=>"Unverified",Wst=()=>"未经验证",Qst=()=>"تأییدنشده",Xst=()=>"غير مُتحقَّق منه",Yst=()=>"Sin verificar",Zst=()=>"सत्यापित नहीं",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wst():t==="fa"?Qst():t==="ar"?Xst():t==="es"?Yst():t==="hi"?Zst():Kst()}),Jst=e=>`Use “${e==null?void 0:e.id}” as the model ID`,eit=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,tit=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,nit=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,rit=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,sit=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,iit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eit(e):t==="fa"?tit(e):t==="ar"?nit(e):t==="es"?rit(e):t==="hi"?sit(e):Jst(e)}),ait=()=>"Variant",oit=()=>"变体",cit=()=>"گونه",lit=()=>"الصنف",uit=()=>"Variante",_it=()=>"वेरिएंट",fit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oit():t==="fa"?cit():t==="ar"?lit():t==="es"?uit():t==="hi"?_it():ait()}),dit=()=>"Start a new chat",hit=()=>"开始新聊天",pit=()=>"شروع گفت‌وگوی جدید",mit=()=>"بدء محادثة جديدة",git=()=>"Inicia un chat nuevo",vit=()=>"नई चैट शुरू करें",bit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hit():t==="fa"?pit():t==="ar"?mit():t==="es"?git():t==="hi"?vit():dit()}),yit=()=>"Advanced",xit=()=>"高级",wit=()=>"پیشرفته",kit=()=>"متقدم",Sit=()=>"Avanzado",Cit=()=>"उन्नत",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xit():t==="fa"?wit():t==="ar"?kit():t==="es"?Sit():t==="hi"?Cit():yit()}),Eit=()=>"Advanced · Connect GitHub",Nit=()=>"高级 · 连接 GitHub",zit=()=>"پیشرفته · اتصال GitHub",jit=()=>"متقدم · ربط GitHub",Ait=()=>"Avanzado · Conectar GitHub",Tit=()=>"उन्नत · GitHub कनेक्ट करें",Rit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nit():t==="fa"?zit():t==="ar"?jit():t==="es"?Ait():t==="hi"?Tit():Eit()}),Mit=()=>"Advanced · GitHub sync on",Oit=()=>"高级 · GitHub 同步已开启",Dit=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Lit=()=>"متقدم · مزامنة GitHub مفعّلة",Iit=()=>"Avanzado · Sincronización con GitHub activada",$it=()=>"उन्नत · GitHub सिंक चालू",Bit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oit():t==="fa"?Dit():t==="ar"?Lit():t==="es"?Iit():t==="hi"?$it():Mit()}),Pit=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Fit=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Hit=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",qit=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",Uit=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",Git=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",Vit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fit():t==="fa"?Hit():t==="ar"?qit():t==="es"?Uit():t==="hi"?Git():Pit()}),Kit=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Wit=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Qit=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Xit=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,Yit=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,Zit=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,Jit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wit(e):t==="fa"?Qit(e):t==="ar"?Xit(e):t==="es"?Yit(e):t==="hi"?Zit(e):Kit(e)}),eat=()=>"Choose an existing project folder",tat=()=>"选择现有项目文件夹",nat=()=>"انتخاب پوشهٔ موجود پروژه",rat=()=>"اختر مجلد مشروع موجود",sat=()=>"Elige una carpeta de proyecto existente",iat=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tat():t==="fa"?nat():t==="ar"?rat():t==="es"?sat():t==="hi"?iat():eat()}),aat=()=>"Choosing…",oat=()=>"正在选择…",cat=()=>"در حال انتخاب…",lat=()=>"جارٍ الاختيار…",uat=()=>"Eligiendo…",_at=()=>"चुना जा रहा है…",fat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oat():t==="fa"?cat():t==="ar"?lat():t==="es"?uat():t==="hi"?_at():aat()}),dat=()=>"Clone destination",hat=()=>"克隆位置",pat=()=>"مقصد کلون",mat=()=>"وجهة الاستنساخ",gat=()=>"Destino del clon",vat=()=>"क्लोन गंतव्य",bat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hat():t==="fa"?pat():t==="ar"?mat():t==="es"?gat():t==="hi"?vat():dat()}),yat=()=>"Clone paper project",xat=()=>"克隆论文项目",wat=()=>"کلون پروژهٔ مقاله",kat=()=>"استنساخ مشروع الورقة",Sat=()=>"Clonar proyecto del paper",Cat=()=>"पेपर प्रोजेक्ट क्लोन करें",Eat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xat():t==="fa"?wat():t==="ar"?kat():t==="es"?Sat():t==="hi"?Cat():yat()}),Nat=()=>"Create project",zat=()=>"创建项目",jat=()=>"ایجاد پروژه",Aat=()=>"إنشاء المشروع",Tat=()=>"Crear proyecto",Rat=()=>"प्रोजेक्ट बनाएं",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zat():t==="fa"?jat():t==="ar"?Aat():t==="es"?Tat():t==="hi"?Rat():Nat()}),Mat=()=>"Creating…",Oat=()=>"正在创建…",Dat=()=>"در حال ایجاد…",Lat=()=>"جارٍ الإنشاء…",Iat=()=>"Creando…",$at=()=>"बनाया जा रहा है…",Bat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oat():t==="fa"?Dat():t==="ar"?Lat():t==="es"?Iat():t==="hi"?$at():Mat()}),Pat=()=>"Choose a different destination. This path is a file, not a folder.",Fat=()=>"请选择其他位置。此路径是文件,不是文件夹。",Hat=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",qat=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",Uat=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Gat=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",xw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fat():t==="fa"?Hat():t==="ar"?qat():t==="es"?Uat():t==="hi"?Gat():Pat()}),Vat=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Kat=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Wat=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Qat=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",Xat=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",Yat=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kat():t==="fa"?Wat():t==="ar"?Qat():t==="es"?Xat():t==="hi"?Yat():Vat()}),Zat=()=>"Blank project",Jat=()=>"空白项目",eot=()=>"پروژهٔ خالی",tot=()=>"مشروع فارغ",not=()=>"Proyecto en blanco",rot=()=>"खाली प्रोजेक्ट",sot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jat():t==="fa"?eot():t==="ar"?tot():t==="es"?not():t==="hi"?rot():Zat()}),iot=()=>"Cancel",aot=()=>"取消",oot=()=>"لغو",cot=()=>"إلغاء",lot=()=>"Cancelar",uot=()=>"रद्द करें",_ot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aot():t==="fa"?oot():t==="ar"?cot():t==="es"?lot():t==="hi"?uot():iot()}),fot=()=>"Change",dot=()=>"更改",hot=()=>"تغییر",pot=()=>"تغيير",mot=()=>"Cambiar",got=()=>"बदलें",vot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dot():t==="fa"?hot():t==="ar"?pot():t==="es"?mot():t==="hi"?got():fot()}),bot=()=>"Change selected paper",yot=()=>"更改所选论文",xot=()=>"تغییر مقالهٔ انتخاب‌شده",wot=()=>"تغيير الورقة المحددة",kot=()=>"Cambiar el paper seleccionado",Sot=()=>"चयनित पेपर बदलें",Cot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yot():t==="fa"?xot():t==="ar"?wot():t==="es"?kot():t==="hi"?Sot():bot()}),Eot=()=>"Check out a Git branch before using this folder.",Not=()=>"使用此文件夹前,请先检出一个 Git 分支。",zot=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",jot=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Aot=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Tot=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Rot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Not():t==="fa"?zot():t==="ar"?jot():t==="es"?Aot():t==="hi"?Tot():Eot()}),Mot=()=>"Checking project location.",Oot=()=>"正在检查项目位置。",Dot=()=>"در حال بررسی محل پروژه.",Lot=()=>"جارٍ التحقق من موقع المشروع.",Iot=()=>"Comprobando la ubicación del proyecto.",$ot=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oot():t==="fa"?Dot():t==="ar"?Lot():t==="es"?Iot():t==="hi"?$ot():Mot()}),Bot=()=>"Existing folder",Pot=()=>"现有文件夹",Fot=()=>"پوشهٔ موجود",Hot=()=>"مجلد موجود",qot=()=>"Carpeta existente",Uot=()=>"मौजूदा फ़ोल्डर",Got=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pot():t==="fa"?Fot():t==="ar"?Hot():t==="es"?qot():t==="hi"?Uot():Bot()}),Vot=()=>"Experiment branches will be pushed to the remote GitHub repository.",Kot=()=>"实验分支将推送到远程 GitHub 仓库。",Wot=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Qot=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",Xot=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",Yot=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",Zot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kot():t==="fa"?Wot():t==="ar"?Qot():t==="es"?Xot():t==="hi"?Yot():Vot()}),Jot=()=>"From a paper",ect=()=>"从论文创建",tct=()=>"از یک مقاله",nct=()=>"من ورقة بحثية",rct=()=>"A partir de un paper",sct=()=>"एक पेपर से",ict=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ect():t==="fa"?tct():t==="ar"?nct():t==="es"?rct():t==="hi"?sct():Jot()}),act=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",oct=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",cct=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",lct=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",uct=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",_ct=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",fct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oct():t==="fa"?cct():t==="ar"?lct():t==="es"?uct():t==="hi"?_ct():act()}),dct=()=>"my-research",hct=()=>"my-research",pct=()=>"my-research",mct=()=>"my-research",gct=()=>"mi-investigacion",vct=()=>"मेरा-शोध",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hct():t==="fa"?pct():t==="ar"?mct():t==="es"?gct():t==="hi"?vct():dct()}),bct=()=>"No papers found. Try an arXiv ID, URL, or a different title.",yct=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",xct=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",wct=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",kct=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Sct=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",Cct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yct():t==="fa"?xct():t==="ar"?wct():t==="es"?kct():t==="hi"?Sct():bct()}),Ect=()=>"No public repository found on alphaXiv",Nct=()=>"在 alphaXiv 上未找到公开仓库",zct=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",jct=()=>"لم يُعثر على مستودع عام على alphaXiv",Act=()=>"No se encontró ningún repositorio público en alphaXiv",Tct=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Rct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nct():t==="fa"?zct():t==="ar"?jct():t==="es"?Act():t==="hi"?Tct():Ect()}),Mct=()=>"OpenResearch will start a blank project with this paper's PDF.",Oct=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Dct=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Lct=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Ict=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",$ct=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Bct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oct():t==="fa"?Dct():t==="ar"?Lct():t==="es"?Ict():t==="hi"?$ct():Mct()}),Pct=()=>"Paper",Fct=()=>"论文",Hct=()=>"مقاله",qct=()=>"ورقة بحثية",Uct=()=>"Paper",Gct=()=>"पेपर",Vct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fct():t==="fa"?Hct():t==="ar"?qct():t==="es"?Uct():t==="hi"?Gct():Pct()}),Kct=()=>"Project location",Wct=()=>"项目位置",Qct=()=>"محل پروژه",Xct=()=>"موقع المشروع",Yct=()=>"Ubicación del proyecto",Zct=()=>"प्रोजेक्ट स्थान",ww=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wct():t==="fa"?Qct():t==="ar"?Xct():t==="es"?Yct():t==="hi"?Zct():Kct()}),Jct=()=>"Project name",elt=()=>"项目名称",tlt=()=>"نام پروژه",nlt=()=>"اسم المشروع",rlt=()=>"Nombre del proyecto",slt=()=>"प्रोजेक्ट नाम",F3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?elt():t==="fa"?tlt():t==="ar"?nlt():t==="es"?rlt():t==="hi"?slt():Jct()}),ilt=()=>"Search for a paper by arXiv ID, URL, or title",alt=()=>"按 arXiv ID、网址或标题搜索论文",olt=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",clt=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",llt=()=>"Busca un paper por ID de arXiv, URL o título",ult=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",_lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?alt():t==="fa"?olt():t==="ar"?clt():t==="es"?llt():t==="hi"?ult():ilt()}),flt=()=>"Sync experiments to GitHub",dlt=()=>"将实验同步到 GitHub",hlt=()=>"همگام‌سازی آزمایش‌ها با GitHub",plt=()=>"مزامنة التجارب مع GitHub",mlt=()=>"Sincronizar experimentos con GitHub",glt=()=>"प्रयोग GitHub पर सिंक करें",vlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dlt():t==="fa"?hlt():t==="ar"?plt():t==="es"?mlt():t==="hi"?glt():flt()}),blt=()=>"That folder no longer exists. Choose it again.",ylt=()=>"该文件夹已不存在。请重新选择。",xlt=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",wlt=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",klt=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",Slt=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",Clt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ylt():t==="fa"?xlt():t==="ar"?wlt():t==="es"?klt():t==="hi"?Slt():blt()}),Elt=()=>"The selected folder contains an invalid Git repository.",Nlt=()=>"所选文件夹包含无效的 Git 仓库。",zlt=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",jlt=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Alt=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Tlt=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Rlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nlt():t==="fa"?zlt():t==="ar"?jlt():t==="es"?Alt():t==="hi"?Tlt():Elt()}),Mlt=()=>"The selected path is not a folder.",Olt=()=>"所选路径不是文件夹。",Dlt=()=>"مسیر انتخاب‌شده پوشه نیست.",Llt=()=>"المسار المحدد ليس مجلدًا.",Ilt=()=>"La ruta seleccionada no es una carpeta.",$lt=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",Blt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Olt():t==="fa"?Dlt():t==="ar"?Llt():t==="es"?Ilt():t==="hi"?$lt():Mlt()}),Plt=e=>`Checking ${e==null?void 0:e.repository}.`,Flt=e=>`正在检查 ${e==null?void 0:e.repository}。`,Hlt=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,qlt=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,Ult=e=>`Comprobando ${e==null?void 0:e.repository}.`,Glt=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Vlt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Flt(e):t==="fa"?Hlt(e):t==="ar"?qlt(e):t==="es"?Ult(e):t==="hi"?Glt(e):Plt(e)}),Klt=e=>`Creates ${e==null?void 0:e.repository}.`,Wlt=e=>`将创建 ${e==null?void 0:e.repository}。`,Qlt=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,Xlt=e=>`ينشئ ${e==null?void 0:e.repository}.`,Ylt=e=>`Crea ${e==null?void 0:e.repository}.`,Zlt=e=>`${e==null?void 0:e.repository} बनाता है।`,Jlt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wlt(e):t==="fa"?Qlt(e):t==="ar"?Xlt(e):t==="es"?Ylt(e):t==="hi"?Zlt(e):Klt(e)}),eut=e=>`Pushes to ${e==null?void 0:e.repository}.`,tut=e=>`将推送到 ${e==null?void 0:e.repository}。`,nut=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,rut=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,sut=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,iut=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,aut=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tut(e):t==="fa"?nut(e):t==="ar"?rut(e):t==="es"?sut(e):t==="hi"?iut(e):eut(e)}),out=()=>"Project location is required.",cut=()=>"必须填写项目位置。",lut=()=>"محل پروژه الزامی است.",uut=()=>"موقع المشروع مطلوب.",_ut=()=>"La ubicación del proyecto es obligatoria.",fut=()=>"प्रोजेक्ट स्थान ज़रूरी है।",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cut():t==="fa"?lut():t==="ar"?uut():t==="es"?_ut():t==="hi"?fut():out()}),dut=()=>"Choose a different destination. The paper repository needs a new or empty folder.",hut=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",put=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",mut=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",gut=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",vut=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hut():t==="fa"?put():t==="ar"?mut():t==="es"?gut():t==="hi"?vut():dut()}),but=()=>"A linked public code repository is cloned without credentials.",yut=()=>"关联的公开代码仓库无需凭据即可克隆。",xut=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",wut=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",kut=()=>"El repositorio de código público vinculado se clona sin credenciales.",Sut=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",Cut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yut():t==="fa"?xut():t==="ar"?wut():t==="es"?kut():t==="hi"?Sut():but()}),Eut=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Nut=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,zut=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,jut=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,Aut=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Tut=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Rut=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nut(e):t==="fa"?zut(e):t==="ar"?jut(e):t==="es"?Aut(e):t==="hi"?Tut(e):Eut(e)}),Mut=()=>"Searching alphaXiv…",Out=()=>"正在搜索 alphaXiv…",Dut=()=>"در حال جست‌وجوی alphaXiv…",Lut=()=>"جارٍ البحث في alphaXiv…",Iut=()=>"Buscando en alphaXiv…",$ut=()=>"alphaXiv खोजा जा रहा है…",But=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Out():t==="fa"?Dut():t==="ar"?Lut():t==="es"?Iut():t==="hi"?$ut():Mut()}),Put=()=>"Use folder",Fut=()=>"使用文件夹",Hut=()=>"استفاده از پوشه",qut=()=>"استخدام المجلد",Uut=()=>"Usar carpeta",Gut=()=>"फ़ोल्डर इस्तेमाल करें",Vut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fut():t==="fa"?Hut():t==="ar"?qut():t==="es"?Uut():t==="hi"?Gut():Put()}),Kut=()=>"Can’t reach OpenResearch. This page is no longer live.",Wut=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Qut=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Xut=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",Yut=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",Zut=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",H3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wut():t==="fa"?Qut():t==="ar"?Xut():t==="es"?Yut():t==="hi"?Zut():Kut()}),Jut=()=>"A workspace for your research agents",e_t=()=>"面向研究智能体的工作空间",t_t=()=>"فضای کاری برای عامل‌های پژوهشی شما",n_t=()=>"مساحة عمل لوكلاء بحثك",r_t=()=>"Un espacio de trabajo para tus agentes de investigación",s_t=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",i_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e_t():t==="fa"?t_t():t==="ar"?n_t():t==="es"?r_t():t==="hi"?s_t():Jut()}),a_t=()=>"Add papers that represent your research interests, including papers by other authors.",o_t=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",c_t=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",l_t=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",u_t=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",__t=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",f_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o_t():t==="fa"?c_t():t==="ar"?l_t():t==="es"?u_t():t==="hi"?__t():a_t()}),d_t=()=>"API key",h_t=()=>"API 密钥",p_t=()=>"کلید API",m_t=()=>"مفتاح API",g_t=()=>"Clave de API",v_t=()=>"API की",TS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h_t():t==="fa"?p_t():t==="ar"?m_t():t==="es"?g_t():t==="hi"?v_t():d_t()}),b_t=()=>"AI/ML",y_t=()=>"人工智能与机器学习",x_t=()=>"هوش مصنوعی و یادگیری ماشین",w_t=()=>"الذكاء الاصطناعي/تعلّم الآلة",k_t=()=>"IA/ML",S_t=()=>"AI/ML",C_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y_t():t==="fa"?x_t():t==="ar"?w_t():t==="es"?k_t():t==="hi"?S_t():b_t()}),E_t=()=>"Biology",N_t=()=>"生物学",z_t=()=>"زیست‌شناسی",j_t=()=>"الأحياء",A_t=()=>"Biología",T_t=()=>"जीव विज्ञान",R_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N_t():t==="fa"?z_t():t==="ar"?j_t():t==="es"?A_t():t==="hi"?T_t():E_t()}),M_t=()=>"Other",O_t=()=>"其他",D_t=()=>"سایر",L_t=()=>"أخرى",I_t=()=>"Otra",$_t=()=>"अन्य",B_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_t():t==="fa"?D_t():t==="ar"?L_t():t==="es"?I_t():t==="hi"?$_t():M_t()}),P_t=()=>"Physics",F_t=()=>"物理学",H_t=()=>"فیزیک",q_t=()=>"الفيزياء",U_t=()=>"Física",G_t=()=>"भौतिकी",V_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F_t():t==="fa"?H_t():t==="ar"?q_t():t==="es"?U_t():t==="hi"?G_t():P_t()}),K_t=()=>"Back",W_t=()=>"返回",Q_t=()=>"بازگشت",X_t=()=>"رجوع",Y_t=()=>"Atrás",Z_t=()=>"वापस",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W_t():t==="fa"?Q_t():t==="ar"?X_t():t==="es"?Y_t():t==="hi"?Z_t():K_t()}),J_t=()=>"Check failed",eft=()=>"检查失败",tft=()=>"بررسی ناموفق بود",nft=()=>"فشل الفحص",rft=()=>"Error en la comprobación",sft=()=>"जाँच विफल",ift=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eft():t==="fa"?tft():t==="ar"?nft():t==="es"?rft():t==="hi"?sft():J_t()}),aft=()=>"Checking",oft=()=>"正在检查",cft=()=>"در حال بررسی",lft=()=>"جارٍ الفحص",uft=()=>"Comprobando",_ft=()=>"जाँचा जा रहा है",Ef=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oft():t==="fa"?cft():t==="ar"?lft():t==="es"?uft():t==="hi"?_ft():aft()}),fft=()=>"Checking Git…",dft=()=>"正在检查 Git…",hft=()=>"در حال بررسی Git…",pft=()=>"جارٍ فحص Git…",mft=()=>"Comprobando Git…",gft=()=>"Git जाँचा जा रहा है…",vft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dft():t==="fa"?hft():t==="ar"?pft():t==="es"?mft():t==="hi"?gft():fft()}),bft=()=>"Choose a coding agent",yft=()=>"选择编程智能体",xft=()=>"یک عامل کدنویسی انتخاب کنید",wft=()=>"اختر وكيل برمجة",kft=()=>"Elige un agente de programación",Sft=()=>"एक कोडिंग एजेंट चुनें",Cft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yft():t==="fa"?xft():t==="ar"?wft():t==="es"?kft():t==="hi"?Sft():bft()}),Eft=()=>"Choose a coding agent to continue.",Nft=()=>"选择一个编程智能体以继续。",zft=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",jft=()=>"اختر وكيل برمجة للمتابعة.",Aft=()=>"Elige un agente de programación para continuar.",Tft=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Rft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nft():t==="fa"?zft():t==="ar"?jft():t==="es"?Aft():t==="hi"?Tft():Eft()}),Mft=()=>"Choose another coding agent",Oft=()=>"选择其他编程智能体",Dft=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Lft=()=>"اختيار وكيل برمجة آخر",Ift=()=>"Elegir otro agente de programación",$ft=()=>"दूसरा कोडिंग एजेंट चुनें",Bft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oft():t==="fa"?Dft():t==="ar"?Lft():t==="es"?Ift():t==="hi"?$ft():Mft()}),Pft=()=>"Choose at least one research area to continue.",Fft=()=>"请至少选择一个研究领域后再继续。",Hft=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",qft=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",Uft=()=>"Elige al menos un área de investigación para continuar.",Gft=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Vft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fft():t==="fa"?Hft():t==="ar"?qft():t==="es"?Uft():t==="hi"?Gft():Pft()}),Kft=()=>"Choose one or more.",Wft=()=>"请选择一项或多项。",Qft=()=>"یک یا چند مورد را انتخاب کنید.",Xft=()=>"اختر واحدًا أو أكثر.",Yft=()=>"Elige una o varias.",Zft=()=>"एक या अधिक चुनें।",Jft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wft():t==="fa"?Qft():t==="ar"?Xft():t==="es"?Yft():t==="hi"?Zft():Kft()}),edt=()=>"Choose your preferred coding agent",tdt=()=>"请选择首选编程智能体",ndt=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",rdt=()=>"اختر وكيل البرمجة المفضّل لديك",sdt=()=>"Elige tu agente de programación preferido",idt=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",adt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tdt():t==="fa"?ndt():t==="ar"?rdt():t==="es"?sdt():t==="hi"?idt():edt()}),odt=()=>"Consolidate your research",cdt=()=>"集中管理研究",ldt=()=>"پژوهش خود را یکپارچه کنید",udt=()=>"وحّد أبحاثك",_dt=()=>"Consolida tu investigación",fdt=()=>"अपने शोध को एक जगह लाएं",ddt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cdt():t==="fa"?ldt():t==="ar"?udt():t==="es"?_dt():t==="hi"?fdt():odt()}),hdt=()=>"Continue",pdt=()=>"继续",mdt=()=>"ادامه",gdt=()=>"متابعة",vdt=()=>"Continuar",bdt=()=>"जारी रखें",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pdt():t==="fa"?mdt():t==="ar"?gdt():t==="es"?vdt():t==="hi"?bdt():hdt()}),ydt=()=>"Describe your research area to continue.",xdt=()=>"请描述你的研究领域后再继续。",wdt=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",kdt=()=>"صِف مجالك البحثي للمتابعة.",Sdt=()=>"Describe tu área de investigación para continuar.",Cdt=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",Edt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xdt():t==="fa"?wdt():t==="ar"?kdt():t==="es"?Sdt():t==="hi"?Cdt():ydt()}),Ndt=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",zdt=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",jdt=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Adt=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Tdt=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Rdt=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Mdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zdt():t==="fa"?jdt():t==="ar"?Adt():t==="es"?Tdt():t==="hi"?Rdt():Ndt()}),Odt=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Ddt=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Ldt=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Idt=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",$dt=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",Bdt=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",Pdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ddt():t==="fa"?Ldt():t==="ar"?Idt():t==="es"?$dt():t==="hi"?Bdt():Odt()}),Fdt=()=>"Error details",Hdt=()=>"错误详情",qdt=()=>"جزئیات خطا",Udt=()=>"تفاصيل الخطأ",Gdt=()=>"Detalles del error",Vdt=()=>"त्रुटि विवरण",Kdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hdt():t==="fa"?qdt():t==="ar"?Udt():t==="es"?Gdt():t==="hi"?Vdt():Fdt()}),Wdt=()=>"Everything stays local",Qdt=()=>"一切都保留在本地",Xdt=()=>"همه‌چیز محلی می‌ماند",Ydt=()=>"كل شيء يبقى محليًا",Zdt=()=>"Todo se queda en local",Jdt=()=>"सब कुछ लोकल ही रहता है",eht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qdt():t==="fa"?Xdt():t==="ar"?Ydt():t==="es"?Zdt():t==="hi"?Jdt():Wdt()}),tht=()=>"Get started",nht=()=>"开始使用",rht=()=>"شروع",sht=()=>"ابدأ الآن",iht=()=>"Empezar",aht=()=>"शुरू करें",oht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nht():t==="fa"?rht():t==="ar"?sht():t==="es"?iht():t==="hi"?aht():tht()}),cht=()=>"Git is required for local experiments. Install Git, then re-check.",lht=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",uht=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",_ht=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",fht=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",dht=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lht():t==="fa"?uht():t==="ar"?_ht():t==="es"?fht():t==="hi"?dht():cht()}),hht=()=>"Ground your agents",pht=()=>"为智能体提供可靠依据",mht=()=>"عامل‌هایتان را به منابع متصل کنید",ght=()=>"زوّد وكلاءك بأساس بحثي",vht=()=>"Dale contexto a tus agentes",bht=()=>"अपने एजेंटों को आधार दें",yht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pht():t==="fa"?mht():t==="ar"?ght():t==="es"?vht():t==="hi"?bht():hht()}),xht=()=>"Install broken",wht=()=>"安装损坏",kht=()=>"نصب خراب است",Sht=()=>"التثبيت معطوب",Cht=()=>"Instalación dañada",Eht=()=>"इंस्टॉल खराब है",Nht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wht():t==="fa"?kht():t==="ar"?Sht():t==="es"?Cht():t==="hi"?Eht():xht()}),zht=()=>"Install Git",jht=()=>"安装 Git",Aht=()=>"نصب Git",Tht=()=>"ثبّت Git",Rht=()=>"Instalar Git",Mht=()=>"Git इंस्टॉल करें",Oht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jht():t==="fa"?Aht():t==="ar"?Tht():t==="es"?Rht():t==="hi"?Mht():zht()}),Dht=()=>"Git is required for local experiments. OpenResearch can install Git for Windows for your account, with no administrator prompt.",Lht=()=>"本地实验需要 Git。OpenResearch 可以为你的账户安装 Git for Windows,无需管理员权限。",Iht=()=>"Git برای آزمایش‌های محلی لازم است. OpenResearch می‌تواند Git for Windows را بدون نیاز به دسترسی مدیر برای حساب شما نصب کند.",$ht=()=>"‏Git مطلوب للتجارب المحلية. يمكن لـ OpenResearch تثبيت Git for Windows لحسابك دون طلب صلاحيات المسؤول.",Bht=()=>"Git es necesario para los experimentos locales. OpenResearch puede instalar Git for Windows para tu cuenta, sin pedir permisos de administrador.",Pht=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। OpenResearch बिना एडमिनिस्ट्रेटर अनुमति के आपके खाते के लिए Git for Windows इंस्टॉल कर सकता है।",Fht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lht():t==="fa"?Iht():t==="ar"?$ht():t==="es"?Bht():t==="hi"?Pht():Dht()}),Hht=()=>"Install Git to continue",qht=()=>"请安装 Git 后再继续",Uht=()=>"برای ادامه Git را نصب کنید",Ght=()=>"ثبّت Git للمتابعة",Vht=()=>"Instala Git para continuar",Kht=()=>"जारी रखने के लिए Git इंस्टॉल करें",Wht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qht():t==="fa"?Uht():t==="ar"?Ght():t==="es"?Vht():t==="hi"?Kht():Hht()}),Qht=()=>"Installing Git…",Xht=()=>"正在安装 Git…",Yht=()=>"در حال نصب Git…",Zht=()=>"جارٍ تثبيت Git…",Jht=()=>"Instalando Git…",ept=()=>"Git इंस्टॉल हो रहा है…",tpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xht():t==="fa"?Yht():t==="ar"?Zht():t==="es"?Jht():t==="hi"?ept():Qht()}),npt=()=>"Loading account details…",rpt=()=>"正在加载账户信息…",spt=()=>"در حال بارگذاری اطلاعات حساب…",ipt=()=>"جارٍ تحميل تفاصيل الحساب…",apt=()=>"Cargando los datos de la cuenta…",opt=()=>"खाता विवरण लोड हो रहा है…",cpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rpt():t==="fa"?spt():t==="ar"?ipt():t==="es"?apt():t==="hi"?opt():npt()}),lpt=()=>"Local Git",upt=()=>"本地 Git",_pt=()=>"Git محلی",fpt=()=>"Git محلي",dpt=()=>"Git local",hpt=()=>"लोकल Git",ppt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?upt():t==="fa"?_pt():t==="ar"?fpt():t==="es"?dpt():t==="hi"?hpt():lpt()}),mpt=()=>"Install needed",gpt=()=>"需要安装",vpt=()=>"نیاز به نصب",bpt=()=>"التثبيت مطلوب",ypt=()=>"No detectado",xpt=()=>"इंस्टॉल ज़रूरी है",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gpt():t==="fa"?vpt():t==="ar"?bpt():t==="es"?ypt():t==="hi"?xpt():mpt()}),wpt=()=>"Not found",kpt=()=>"未找到",Spt=()=>"پیدا نشد",Cpt=()=>"غير موجود",Ept=()=>"No encontrado",Npt=()=>"नहीं मिला",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kpt():t==="fa"?Spt():t==="ar"?Cpt():t==="es"?Ept():t==="hi"?Npt():wpt()}),zpt=()=>"Signed out",jpt=()=>"未登录",Apt=()=>"وارد نشده",Tpt=()=>"غير مسجل الدخول",Rpt=()=>"Sin iniciar sesión",Mpt=()=>"साइन आउट",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jpt():t==="fa"?Apt():t==="ar"?Tpt():t==="es"?Rpt():t==="hi"?Mpt():zpt()}),Opt=()=>"OpenResearch uses a coding agent already installed on this machine.",Dpt=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",Lpt=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",Ipt=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",$pt=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",Bpt=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",Ppt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpt():t==="fa"?Lpt():t==="ar"?Ipt():t==="es"?$pt():t==="hi"?Bpt():Opt()}),Fpt=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",Hpt=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",qpt=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",Upt=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",Gpt=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",Vpt=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",Kpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hpt():t==="fa"?qpt():t==="ar"?Upt():t==="es"?Gpt():t==="hi"?Vpt():Fpt()}),Wpt=()=>"Other research area",Qpt=()=>"其他研究领域",Xpt=()=>"حوزهٔ پژوهشی دیگر",Ypt=()=>"مجال بحثي آخر",Zpt=()=>"Otra área de investigación",Jpt=()=>"अन्य शोध क्षेत्र",e0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qpt():t==="fa"?Xpt():t==="ar"?Ypt():t==="es"?Zpt():t==="hi"?Jpt():Wpt()}),t0t=()=>"Re-check",n0t=()=>"重新检查",r0t=()=>"بررسی دوباره",s0t=()=>"إعادة الفحص",i0t=()=>"Volver a comprobar",a0t=()=>"फिर से जाँचें",tb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n0t():t==="fa"?r0t():t==="ar"?s0t():t==="es"?i0t():t==="hi"?a0t():t0t()}),o0t=()=>"Ready",c0t=()=>"已就绪",l0t=()=>"آماده",u0t=()=>"جاهز",_0t=()=>"Listo",f0t=()=>"तैयार",RS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c0t():t==="fa"?l0t():t==="ar"?u0t():t==="es"?_0t():t==="hi"?f0t():o0t()}),d0t=()=>"Re-check Git before continuing",h0t=()=>"请重新检查 Git 后再继续",p0t=()=>"پیش از ادامه Git را دوباره بررسی کنید",m0t=()=>"أعد فحص Git قبل المتابعة",g0t=()=>"Vuelve a comprobar Git antes de continuar",v0t=()=>"जारी रखने से पहले Git फिर से जाँचें",b0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h0t():t==="fa"?p0t():t==="ar"?m0t():t==="es"?g0t():t==="hi"?v0t():d0t()}),y0t=()=>"Representative papers",x0t=()=>"代表性论文",w0t=()=>"مقاله‌های شاخص",k0t=()=>"أوراق تمثّل اهتماماتك البحثية",S0t=()=>"Papers representativos",C0t=()=>"प्रतिनिधि पेपर",E0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x0t():t==="fa"?w0t():t==="ar"?k0t():t==="es"?S0t():t==="hi"?C0t():y0t()}),N0t=()=>"Research background",z0t=()=>"研究背景",j0t=()=>"پیشینهٔ پژوهشی",A0t=()=>"الخلفية البحثية",T0t=()=>"Trayectoria de investigación",R0t=()=>"शोध पृष्ठभूमि",M0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z0t():t==="fa"?j0t():t==="ar"?A0t():t==="es"?T0t():t==="hi"?R0t():N0t()}),O0t=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",D0t=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",L0t=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",I0t=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",$0t=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",B0t=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",kw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D0t():t==="fa"?L0t():t==="ar"?I0t():t==="es"?$0t():t==="hi"?B0t():O0t()}),P0t=()=>"Search alphaXiv by title to link a paper…",F0t=()=>"按标题搜索 alphaXiv 以关联论文…",H0t=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",q0t=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",U0t=()=>"Busca en alphaXiv por título para vincular un paper…",G0t=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",V0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F0t():t==="fa"?H0t():t==="ar"?q0t():t==="es"?U0t():t==="hi"?G0t():P0t()}),K0t=()=>"Searching alphaXiv…",W0t=()=>"正在搜索 alphaXiv…",Q0t=()=>"در حال جست‌وجوی alphaXiv…",X0t=()=>"جارٍ البحث في alphaXiv…",Y0t=()=>"Buscando en alphaXiv…",Z0t=()=>"alphaXiv खोजा जा रहा है…",J0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W0t():t==="fa"?Q0t():t==="ar"?X0t():t==="es"?Y0t():t==="hi"?Z0t():K0t()}),emt=()=>"Selected",tmt=()=>"已选择",nmt=()=>"انتخاب‌شده",rmt=()=>"محدد",smt=()=>"Seleccionado",imt=()=>"चयनित",amt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tmt():t==="fa"?nmt():t==="ar"?rmt():t==="es"?smt():t==="hi"?imt():emt()}),omt=()=>"Local model unavailable",cmt=()=>"本地模型不可用",lmt=()=>"مدل محلی در دسترس نیست",umt=()=>"النموذج المحلي غير متاح",_mt=()=>"Modelo local no disponible",fmt=()=>"लोकल मॉडल उपलब्ध नहीं",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cmt():t==="fa"?lmt():t==="ar"?umt():t==="es"?_mt():t==="hi"?fmt():omt()}),dmt=()=>"Setting things up…",hmt=()=>"正在设置…",pmt=()=>"در حال راه‌اندازی…",mmt=()=>"جارٍ التهيئة…",gmt=()=>"Preparando todo…",vmt=()=>"सेट अप किया जा रहा है…",bmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hmt():t==="fa"?pmt():t==="ar"?mmt():t==="es"?gmt():t==="hi"?vmt():dmt()}),ymt=()=>"Connect a local model or sign in to a coding agent to continue",xmt=()=>"连接本地模型或登录编码智能体以继续",wmt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",kmt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",Smt=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",Cmt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",Emt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xmt():t==="fa"?wmt():t==="ar"?kmt():t==="es"?Smt():t==="hi"?Cmt():ymt()}),Nmt=()=>"Connect a local model or sign in to an agent to continue.",zmt=()=>"连接本地模型或登录一个智能体以继续。",jmt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",Amt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",Tmt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",Rmt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",Mmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zmt():t==="fa"?jmt():t==="ar"?Amt():t==="es"?Tmt():t==="hi"?Rmt():Nmt()}),Omt=()=>"Signed in",Dmt=()=>"已登录",Lmt=()=>"وارد شده",Imt=()=>"تم تسجيل الدخول",$mt=()=>"Sesión iniciada",Bmt=()=>"साइन इन",Pmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dmt():t==="fa"?Lmt():t==="ar"?Imt():t==="es"?$mt():t==="hi"?Bmt():Omt()}),Fmt=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",Hmt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",qmt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",Umt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",Gmt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",Vmt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",Kmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hmt():t==="fa"?qmt():t==="ar"?Umt():t==="es"?Gmt():t==="hi"?Vmt():Fmt()}),Wmt=()=>"· Step 1 of 2",Qmt=()=>"· 第 1 步,共 2 步",Xmt=()=>"· مرحلهٔ ۱ از ۲",Ymt=()=>"· الخطوة 1 من 2",Zmt=()=>"· Paso 1 de 2",Jmt=()=>"· चरण 1 / 2",egt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qmt():t==="fa"?Xmt():t==="ar"?Ymt():t==="es"?Zmt():t==="hi"?Jmt():Wmt()}),tgt=()=>"· Step 2 of 2",ngt=()=>"· 第 2 步,共 2 步",rgt=()=>"· مرحلهٔ ۲ از ۲",sgt=()=>"· الخطوة 2 من 2",igt=()=>"· Paso 2 de 2",agt=()=>"· चरण 2 / 2",ogt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ngt():t==="fa"?rgt():t==="ar"?sgt():t==="es"?igt():t==="hi"?agt():tgt()}),cgt=()=>"Tell us about your research",lgt=()=>"介绍一下你的研究",ugt=()=>"از پژوهش خود بگویید",_gt=()=>"أخبرنا عن بحثك",fgt=()=>"Cuéntanos sobre tu investigación",dgt=()=>"हमें अपने शोध के बारे में बताएं",hgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lgt():t==="fa"?ugt():t==="ar"?_gt():t==="es"?fgt():t==="hi"?dgt():cgt()}),pgt=()=>"Tell us your other research area",mgt=()=>"告诉我们你的其他研究领域",ggt=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",vgt=()=>"أخبرنا عن مجالك البحثي الآخر",bgt=()=>"Cuéntanos cuál es tu otra área de investigación",ygt=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",xgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mgt():t==="fa"?ggt():t==="ar"?vgt():t==="es"?bgt():t==="hi"?ygt():pgt()}),wgt=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",kgt=()=>"在一处跟踪实验、产物、算力、技能和代码。",Sgt=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Cgt=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",Egt=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",Ngt=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",zgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kgt():t==="fa"?Sgt():t==="ar"?Cgt():t==="es"?Egt():t==="hi"?Ngt():wgt()}),jgt=()=>"Unable to verify",Agt=()=>"无法验证",Tgt=()=>"تأیید ممکن نیست",Rgt=()=>"تعذّر التحقق",Mgt=()=>"No se pudo verificar",Ogt=()=>"सत्यापित नहीं हो सका",Sw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Agt():t==="fa"?Tgt():t==="ar"?Rgt():t==="es"?Mgt():t==="hi"?Ogt():jgt()}),Dgt=()=>"Update required",Lgt=()=>"需要更新",Igt=()=>"نیازمند به‌روزرسانی",$gt=()=>"مطلوب تحديث",Bgt=()=>"Actualización necesaria",Pgt=()=>"अपडेट ज़रूरी है",Fgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lgt():t==="fa"?Igt():t==="ar"?$gt():t==="es"?Bgt():t==="hi"?Pgt():Dgt()}),Hgt=()=>"Waiting for the Git check",qgt=()=>"正在等待 Git 检查",Ugt=()=>"در انتظار بررسی Git",Ggt=()=>"في انتظار فحص Git",Vgt=()=>"Esperando la comprobación de Git",Kgt=()=>"Git जाँच का इंतज़ार है",Wgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qgt():t==="fa"?Ugt():t==="ar"?Ggt():t==="es"?Vgt():t==="hi"?Kgt():Hgt()}),Qgt=()=>"Waiting for the local tool checks",Xgt=()=>"正在等待本地工具检查",Ygt=()=>"در انتظار بررسی ابزارهای محلی",Zgt=()=>"في انتظار فحوص الأدوات المحلية",Jgt=()=>"Esperando las comprobaciones de las herramientas locales",e1t=()=>"लोकल टूल जाँच का इंतज़ार है",t1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xgt():t==="fa"?Ygt():t==="ar"?Zgt():t==="es"?Jgt():t==="hi"?e1t():Qgt()}),n1t=()=>"What areas are you interested in?",r1t=()=>"你对哪些领域感兴趣?",s1t=()=>"به چه حوزه‌هایی علاقه دارید؟",i1t=()=>"ما المجالات التي تهتم بها؟",a1t=()=>"¿Qué áreas te interesan?",o1t=()=>"आपकी रुचि किन क्षेत्रों में है?",c1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r1t():t==="fa"?s1t():t==="ar"?i1t():t==="es"?a1t():t==="hi"?o1t():n1t()}),l1t=()=>"Your code, data, and experiment history stay on your machine.",u1t=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",_1t=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",f1t=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",d1t=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",h1t=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",p1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u1t():t==="fa"?_1t():t==="ar"?f1t():t==="es"?d1t():t==="hi"?h1t():l1t()}),m1t=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",g1t=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",v1t=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",b1t=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",y1t=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",x1t=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",w1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g1t():t==="fa"?v1t():t==="ar"?b1t():t==="es"?y1t():t==="hi"?x1t():m1t()}),k1t=()=>"Add cookie",S1t=()=>"添加 cookie",C1t=()=>"افزودن کوکی",E1t=()=>"إضافة ملف تعريف الارتباط",N1t=()=>"Añadir cookie",z1t=()=>"कुकी जोड़ें",j1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S1t():t==="fa"?C1t():t==="ar"?E1t():t==="es"?N1t():t==="hi"?z1t():k1t()}),A1t=()=>"Changed here and on Overleaf — choose which copy to keep",T1t=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",R1t=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",M1t=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",O1t=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",D1t=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",L1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T1t():t==="fa"?R1t():t==="ar"?M1t():t==="es"?O1t():t==="hi"?D1t():A1t()}),I1t=()=>"Create a token ↗",$1t=()=>"创建令牌 ↗",B1t=()=>"ساخت توکن ↗",P1t=()=>"إنشاء رمز ↗",F1t=()=>"Crear un token ↗",H1t=()=>"एक टोकन बनाएं ↗",q1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$1t():t==="fa"?B1t():t==="ar"?P1t():t==="es"?F1t():t==="hi"?H1t():I1t()}),U1t=()=>"Overleaf Git token",G1t=()=>"Overleaf Git 令牌",V1t=()=>"توکن Git در Overleaf",K1t=()=>"رمز Git لـ Overleaf",W1t=()=>"Token de Git de Overleaf",Q1t=()=>"Overleaf Git टोकन",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G1t():t==="fa"?V1t():t==="ar"?K1t():t==="es"?W1t():t==="hi"?Q1t():U1t()}),X1t=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Y1t=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Z1t=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",J1t=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",evt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",tvt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",nvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y1t():t==="fa"?Z1t():t==="ar"?J1t():t==="es"?evt():t==="hi"?tvt():X1t()}),rvt=()=>"Import from browser",svt=()=>"从浏览器导入",ivt=()=>"وارد کردن از مرورگر",avt=()=>"الاستيراد من المتصفح",ovt=()=>"Importar desde el navegador",cvt=()=>"ब्राउज़र से इंपोर्ट करें",lvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?svt():t==="fa"?ivt():t==="ar"?avt():t==="es"?ovt():t==="hi"?cvt():rvt()}),uvt=()=>"In step with Overleaf",_vt=()=>"已与 Overleaf 同步",fvt=()=>"با Overleaf همگام است",dvt=()=>"متزامن مع Overleaf",hvt=()=>"Sincronizado con Overleaf",pvt=()=>"Overleaf के साथ मेल में",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_vt():t==="fa"?fvt():t==="ar"?dvt():t==="es"?hvt():t==="hi"?pvt():uvt()}),mvt=()=>"The last sync did not finish.",gvt=()=>"上次同步未完成。",vvt=()=>"آخرین همگام‌سازی کامل نشد.",bvt=()=>"لم تكتمل آخر مزامنة.",yvt=()=>"La última sincronización no terminó.",xvt=()=>"पिछला सिंक पूरा नहीं हुआ।",wvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gvt():t==="fa"?vvt():t==="ar"?bvt():t==="es"?yvt():t==="hi"?xvt():mvt()}),kvt=()=>"Link and sync",Svt=()=>"关联并同步",Cvt=()=>"پیوند و همگام‌سازی",Evt=()=>"الربط والمزامنة",Nvt=()=>"Vincular y sincronizar",zvt=()=>"लिंक करें और सिंक करें",jvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Svt():t==="fa"?Cvt():t==="ar"?Evt():t==="es"?Nvt():t==="hi"?zvt():kvt()}),Avt=()=>"Connecting to Overleaf…",Tvt=()=>"正在连接 Overleaf…",Rvt=()=>"در حال اتصال به Overleaf…",Mvt=()=>"جارٍ الاتصال بـ Overleaf…",Ovt=()=>"Conectando con Overleaf…",Dvt=()=>"Overleaf से कनेक्ट हो रहा है…",Lvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tvt():t==="fa"?Rvt():t==="ar"?Mvt():t==="es"?Ovt():t==="hi"?Dvt():Avt()}),Ivt=()=>"Edits are live on Overleaf",$vt=()=>"编辑已在 Overleaf 实时同步",Bvt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",Pvt=()=>"تظهر التعديلات فورًا على Overleaf",Fvt=()=>"Los cambios se sincronizan en directo con Overleaf",Hvt=()=>"बदलाव Overleaf पर लाइव हैं",qvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$vt():t==="fa"?Bvt():t==="ar"?Pvt():t==="es"?Fvt():t==="hi"?Hvt():Ivt()}),Uvt=()=>"Retry",Gvt=()=>"重试",Vvt=()=>"تلاش دوباره",Kvt=()=>"إعادة المحاولة",Wvt=()=>"Reintentar",Qvt=()=>"फिर से कोशिश करें",Xvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gvt():t==="fa"?Vvt():t==="ar"?Kvt():t==="es"?Wvt():t==="hi"?Qvt():Uvt()}),Yvt=()=>"Live sync stopped.",Zvt=()=>"实时同步已停止。",Jvt=()=>"همگام‌سازی زنده متوقف شد.",ebt=()=>"توقفت المزامنة المباشرة.",tbt=()=>"Sincronización en directo detenida.",nbt=()=>"लाइव सिंक रुक गया।",rbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zvt():t==="fa"?Jvt():t==="ar"?ebt():t==="es"?tbt():t==="hi"?nbt():Yvt()}),sbt=()=>"Live sync starts once the paper is in step with Overleaf.",ibt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",abt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",obt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",cbt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",lbt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",ubt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ibt():t==="fa"?abt():t==="ar"?obt():t==="es"?cbt():t==="hi"?lbt():sbt()}),_bt=()=>"My projects ↗",fbt=()=>"我的项目 ↗",dbt=()=>"پروژه‌های من ↗",hbt=()=>"مشاريعي ↗",pbt=()=>"Mis proyectos ↗",mbt=()=>"मेरे प्रोजेक्ट ↗",Bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fbt():t==="fa"?dbt():t==="ar"?hbt():t==="es"?pbt():t==="hi"?mbt():_bt()}),gbt=()=>"Nothing could be synced.",vbt=()=>"没有内容可以同步。",bbt=()=>"هیچ موردی قابل همگام‌سازی نبود.",ybt=()=>"تعذّرت مزامنة أي شيء.",xbt=()=>"No se pudo sincronizar nada.",wbt=()=>"कुछ भी सिंक नहीं हो सका।",kbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vbt():t==="fa"?bbt():t==="ar"?ybt():t==="es"?xbt():t==="hi"?wbt():gbt()}),Sbt=()=>"Open Overleaf ↗",Cbt=()=>"打开 Overleaf ↗",Ebt=()=>"باز کردن Overleaf ↗",Nbt=()=>"فتح Overleaf ↗",zbt=()=>"Abrir Overleaf ↗",jbt=()=>"Overleaf खोलें ↗",Abt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cbt():t==="fa"?Ebt():t==="ar"?Nbt():t==="es"?zbt():t==="hi"?jbt():Sbt()}),Tbt=()=>"Cancel",Rbt=()=>"取消",Mbt=()=>"لغو",Obt=()=>"إلغاء",Dbt=()=>"Cancelar",Lbt=()=>"रद्द करें",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rbt():t==="fa"?Mbt():t==="ar"?Obt():t==="es"?Dbt():t==="hi"?Lbt():Tbt()}),Ibt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",$bt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Bbt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Pbt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",Fbt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",Hbt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",qbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$bt():t==="fa"?Bbt():t==="ar"?Pbt():t==="es"?Fbt():t==="hi"?Hbt():Ibt()}),Ubt=()=>"Keep this copy",Gbt=()=>"保留此副本",Vbt=()=>"نگه داشتن این نسخه",Kbt=()=>"الاحتفاظ بهذه النسخة",Wbt=()=>"Conservar esta copia",Qbt=()=>"यह कॉपी रखें",Xbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbt():t==="fa"?Vbt():t==="ar"?Kbt():t==="es"?Wbt():t==="hi"?Qbt():Ubt()}),Ybt=()=>"Open in Overleaf",Zbt=()=>"在 Overleaf 中打开",Jbt=()=>"باز کردن در Overleaf",eyt=()=>"فتح في Overleaf",tyt=()=>"Abrir en Overleaf",nyt=()=>"Overleaf में खोलें",ryt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zbt():t==="fa"?Jbt():t==="ar"?eyt():t==="es"?tyt():t==="hi"?nyt():Ybt()}),syt=()=>"Replace the Overleaf token",iyt=()=>"替换 Overleaf 令牌",ayt=()=>"جایگزینی توکن Overleaf",oyt=()=>"استبدال رمز Overleaf",cyt=()=>"Reemplazar el token de Overleaf",lyt=()=>"Overleaf टोकन बदलें",Pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iyt():t==="fa"?ayt():t==="ar"?oyt():t==="es"?cyt():t==="hi"?lyt():syt()}),uyt=()=>"Sync files",_yt=()=>"同步文件",fyt=()=>"همگام‌سازی فایل‌ها",dyt=()=>"مزامنة الملفات",hyt=()=>"Sincronizar archivos",pyt=()=>"फ़ाइलें सिंक करें",myt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_yt():t==="fa"?fyt():t==="ar"?dyt():t==="es"?hyt():t==="hi"?pyt():uyt()}),gyt=()=>"Unlink",vyt=()=>"取消关联",byt=()=>"قطع پیوند",yyt=()=>"إلغاء الربط",xyt=()=>"Desvincular",wyt=()=>"लिंक हटाएं",kyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vyt():t==="fa"?byt():t==="ar"?yyt():t==="es"?xyt():t==="hi"?wyt():gyt()}),Syt=()=>"Upload a copy as a new project ↗",Cyt=()=>"上传副本作为新项目 ↗",Eyt=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",Nyt=()=>"رفع نسخة كمشروع جديد ↗",zyt=()=>"Subir una copia como proyecto nuevo ↗",jyt=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cyt():t==="fa"?Eyt():t==="ar"?Nyt():t==="es"?zyt():t==="hi"?jyt():Syt()}),Ayt=()=>"Use Overleaf's",Tyt=()=>"使用 Overleaf 的副本",Ryt=()=>"استفاده از نسخهٔ Overleaf",Myt=()=>"استخدام نسخة Overleaf",Oyt=()=>"Usar la de Overleaf",Dyt=()=>"Overleaf का इस्तेमाल करें",Lyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tyt():t==="fa"?Ryt():t==="ar"?Myt():t==="es"?Oyt():t==="hi"?Dyt():Ayt()}),Iyt=()=>"This paper stays in step with Overleaf.",$yt=()=>"此论文将与 Overleaf 保持同步。",Byt=()=>"این مقاله با Overleaf همگام می‌ماند.",Pyt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",Fyt=()=>"Este paper se mantiene sincronizado con Overleaf.",Hyt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",qyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$yt():t==="fa"?Byt():t==="ar"?Pyt():t==="es"?Fyt():t==="hi"?Hyt():Iyt()}),Uyt=()=>"Paste it instead",Gyt=()=>"改为粘贴",Vyt=()=>"به‌جایش بچسبانید",Kyt=()=>"الصقه بدلًا من ذلك",Wyt=()=>"Pegarla manualmente",Qyt=()=>"इसके बजाय पेस्ट करें",Xyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gyt():t==="fa"?Vyt():t==="ar"?Kyt():t==="es"?Wyt():t==="hi"?Qyt():Uyt()}),Yyt=e=>`Pulled ${e==null?void 0:e.paths}.`,Zyt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Jyt=e=>`${e==null?void 0:e.paths} دریافت شد.`,ext=e=>`سُحب ${e==null?void 0:e.paths}.`,txt=e=>`Descargado: ${e==null?void 0:e.paths}.`,nxt=e=>`${e==null?void 0:e.paths} पुल किया।`,rxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zyt(e):t==="fa"?Jyt(e):t==="ar"?ext(e):t==="es"?txt(e):t==="hi"?nxt(e):Yyt(e)}),sxt=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,ixt=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,axt=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,oxt=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,cxt=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,lxt=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,uxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ixt(e):t==="fa"?axt(e):t==="ar"?oxt(e):t==="es"?cxt(e):t==="hi"?lxt(e):sxt(e)}),_xt=e=>`Pushed ${e==null?void 0:e.paths}.`,fxt=e=>`已推送 ${e==null?void 0:e.paths}。`,dxt=e=>`${e==null?void 0:e.paths} ارسال شد.`,hxt=e=>`رُفع ${e==null?void 0:e.paths}.`,pxt=e=>`Subido: ${e==null?void 0:e.paths}.`,mxt=e=>`${e==null?void 0:e.paths} पुश किया।`,gxt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fxt(e):t==="fa"?dxt(e):t==="ar"?hxt(e):t==="es"?pxt(e):t==="hi"?mxt(e):_xt(e)}),vxt=()=>"Add a fresh Overleaf session cookie to start following again.",bxt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",yxt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",xxt=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",wxt=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",kxt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",Sxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bxt():t==="fa"?yxt():t==="ar"?xxt():t==="es"?wxt():t==="hi"?kxt():vxt()}),Cxt=()=>"Save the file first",Ext=()=>"请先保存文件",Nxt=()=>"ابتدا فایل را ذخیره کنید",zxt=()=>"احفظ الملف أولًا",jxt=()=>"Guarda el archivo primero",Axt=()=>"पहले फ़ाइल सेव करें",Txt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ext():t==="fa"?Nxt():t==="ar"?zxt():t==="es"?jxt():t==="hi"?Axt():Cxt()}),Rxt=()=>"Save this file to sync it with Overleaf",Mxt=()=>"保存此文件以与 Overleaf 同步",Oxt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",Dxt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",Lxt=()=>"Guarda este archivo para sincronizarlo con Overleaf",Ixt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mxt():t==="fa"?Oxt():t==="ar"?Dxt():t==="es"?Lxt():t==="hi"?Ixt():Rxt()}),$xt=()=>"Save token",Bxt=()=>"保存令牌",Pxt=()=>"ذخیرهٔ توکن",Fxt=()=>"حفظ الرمز",Hxt=()=>"Guardar token",qxt=()=>"टोकन सेव करें",Uxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bxt():t==="fa"?Pxt():t==="ar"?Fxt():t==="es"?Hxt():t==="hi"?qxt():$xt()}),Gxt=()=>"Send this paper to Overleaf",Vxt=()=>"将此论文发送到 Overleaf",Kxt=()=>"ارسال مقاله به Overleaf",Wxt=()=>"أرسل هذه الورقة إلى Overleaf",Qxt=()=>"Enviar este paper a Overleaf",Xxt=()=>"यह पेपर Overleaf को भेजें",Yxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vxt():t==="fa"?Kxt():t==="ar"?Wxt():t==="es"?Qxt():t==="hi"?Xxt():Gxt()}),Zxt=()=>"Overleaf session cookie",Jxt=()=>"Overleaf 会话 cookie",e2t=()=>"کوکی نشست Overleaf",t2t=()=>"ملف تعريف ارتباط جلسة Overleaf",n2t=()=>"Cookie de sesión de Overleaf",r2t=()=>"Overleaf सेशन कुकी",q3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jxt():t==="fa"?e2t():t==="ar"?t2t():t==="es"?n2t():t==="hi"?r2t():Zxt()}),s2t=()=>"To follow Overleaf as people type, paste your Overleaf session cookie: in a browser signed in to Overleaf, open the developer tools, find the overleaf_session2 cookie, and copy its value. It stays on this machine.",i2t=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",a2t=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",o2t=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",c2t=()=>"Para seguir los cambios de Overleaf mientras se escribe, pega tu cookie de sesión de Overleaf: en un navegador con la sesión de Overleaf iniciada, abre las herramientas de desarrollo, busca la cookie overleaf_session2 y copia su valor. Se queda en este equipo.",l2t=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",u2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i2t():t==="fa"?a2t():t==="ar"?o2t():t==="es"?c2t():t==="hi"?l2t():s2t()}),_2t=()=>"Overleaf sync failed",f2t=()=>"Overleaf 同步失败",d2t=()=>"همگام‌سازی با Overleaf ناموفق بود",h2t=()=>"فشلت مزامنة Overleaf",p2t=()=>"Error al sincronizar con Overleaf",m2t=()=>"Overleaf सिंक विफल",U3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f2t():t==="fa"?d2t():t==="ar"?h2t():t==="es"?p2t():t==="hi"?m2t():_2t()}),g2t=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",v2t=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",b2t=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",y2t=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",x2t=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",w2t=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",k2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v2t():t==="fa"?b2t():t==="ar"?y2t():t==="es"?x2t():t==="hi"?w2t():g2t()}),S2t=()=>"Syncing with Overleaf…",C2t=()=>"正在与 Overleaf 同步…",E2t=()=>"در حال همگام‌سازی با Overleaf…",N2t=()=>"جارٍ المزامنة مع Overleaf…",z2t=()=>"Sincronizando con Overleaf…",j2t=()=>"Overleaf के साथ सिंक हो रहा है…",LL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C2t():t==="fa"?E2t():t==="ar"?N2t():t==="es"?z2t():t==="hi"?j2t():S2t()}),A2t=()=>"Paste an Overleaf Git authentication token to keep this paper in step with an Overleaf project. Create one in Overleaf under Account Settings — Git integration comes with a paid Overleaf plan.",T2t=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",R2t=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",M2t=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",O2t=()=>"Pega un token de autenticación de Git de Overleaf para mantener este paper sincronizado con un proyecto de Overleaf. Créalo en Overleaf, en Account Settings — la integración con Git requiere un plan de pago de Overleaf.",D2t=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",L2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T2t():t==="fa"?R2t():t==="ar"?M2t():t==="es"?O2t():t==="hi"?D2t():A2t()}),I2t=()=>"Paste the URL of the Overleaf project this paper belongs to. Overleaf cannot create one over Git, so open or create the project there first.",$2t=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",B2t=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",P2t=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",F2t=()=>"Pega la URL del proyecto de Overleaf al que pertenece este paper. Overleaf no puede crear proyectos por Git, así que abre o crea el proyecto allí primero.",H2t=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",q2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$2t():t==="fa"?B2t():t==="ar"?P2t():t==="es"?F2t():t==="hi"?H2t():I2t()}),U2t=()=>"Toggle Plan mode for this chat",G2t=()=>"切换此聊天的计划模式",V2t=()=>"تغییر حالت طرح این گفت‌وگو",K2t=()=>"تبديل وضع التخطيط لهذه المحادثة",W2t=()=>"Activa o desactiva el modo Plan en este chat",Q2t=()=>"इस चैट के लिए प्लान मोड टॉगल करें",X2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G2t():t==="fa"?V2t():t==="ar"?K2t():t==="es"?W2t():t==="hi"?Q2t():U2t()}),Y2t=()=>"Accept and auto mode",Z2t=()=>"接受并使用自动模式",J2t=()=>"پذیرش و حالت خودکار",ewt=()=>"قبول وتفعيل الوضع التلقائي",twt=()=>"Aceptar en modo automático",nwt=()=>"स्वीकार करें और ऑटो मोड",rwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z2t():t==="fa"?J2t():t==="ar"?ewt():t==="es"?twt():t==="hi"?nwt():Y2t()}),swt=()=>"Accept and bypass all",iwt=()=>"接受并跳过所有审批",awt=()=>"پذیرش و عبور از همهٔ تأییدها",owt=()=>"القبول وتجاوز الكل",cwt=()=>"Aceptar y omitir permisos",lwt=()=>"स्वीकार करें और सब बायपास करें",uwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iwt():t==="fa"?awt():t==="ar"?owt():t==="es"?cwt():t==="hi"?lwt():swt()}),_wt=()=>"Accept plan",fwt=()=>"接受计划",dwt=()=>"پذیرش طرح",hwt=()=>"قبول الخطة",pwt=()=>"Aceptar plan",mwt=()=>"प्लान स्वीकार करें",gwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fwt():t==="fa"?dwt():t==="ar"?hwt():t==="es"?pwt():t==="hi"?mwt():_wt()}),vwt=e=>`${e==null?void 0:e.agent} proposed a plan`,bwt=e=>`${e==null?void 0:e.agent} 提出了一个计划`,ywt=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,xwt=e=>`${e==null?void 0:e.agent} اقترح خطة`,wwt=e=>`${e==null?void 0:e.agent} propuso un plan`,kwt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,Swt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bwt(e):t==="fa"?ywt(e):t==="ar"?xwt(e):t==="es"?wwt(e):t==="hi"?kwt(e):vwt(e)}),Cwt=e=>`${e==null?void 0:e.agent} is ready to proceed`,Ewt=e=>`${e==null?void 0:e.agent} 已准备好继续`,Nwt=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,zwt=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,jwt=e=>`${e==null?void 0:e.agent} está listo para continuar`,Awt=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,Twt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ewt(e):t==="fa"?Nwt(e):t==="ar"?zwt(e):t==="es"?jwt(e):t==="hi"?Awt(e):Cwt(e)}),Rwt=()=>"Back",Mwt=()=>"返回",Owt=()=>"بازگشت",Dwt=()=>"رجوع",Lwt=()=>"Atrás",Iwt=()=>"वापस",IL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mwt():t==="fa"?Owt():t==="ar"?Dwt():t==="es"?Lwt():t==="hi"?Iwt():Rwt()}),$wt=()=>"More approval options",Bwt=()=>"更多批准选项",Pwt=()=>"گزینه‌های تأیید بیشتر",Fwt=()=>"خيارات موافقة إضافية",Hwt=()=>"Más opciones de aprobación",qwt=()=>"और स्वीकृति विकल्प",Uwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bwt():t==="fa"?Pwt():t==="ar"?Fwt():t==="es"?Hwt():t==="hi"?qwt():$wt()}),Gwt=()=>"Open plan",Vwt=()=>"打开计划",Kwt=()=>"باز کردن طرح",Wwt=()=>"فتح الخطة",Qwt=()=>"Abrir plan",Xwt=()=>"प्लान खोलें",Ywt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vwt():t==="fa"?Kwt():t==="ar"?Wwt():t==="es"?Qwt():t==="hi"?Xwt():Gwt()}),Zwt=()=>"Reject",Jwt=()=>"拒绝",e4t=()=>"رد کردن",t4t=()=>"رفض",n4t=()=>"Rechazar",r4t=()=>"अस्वीकार करें",s4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jwt():t==="fa"?e4t():t==="ar"?t4t():t==="es"?n4t():t==="hi"?r4t():Zwt()}),i4t=()=>"Revise",a4t=()=>"修改",o4t=()=>"بازنگری",c4t=()=>"طلب تعديل",l4t=()=>"Pedir cambios",u4t=()=>"संशोधित करें",_4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a4t():t==="fa"?o4t():t==="ar"?c4t():t==="es"?l4t():t==="hi"?u4t():i4t()}),f4t=()=>"Revise…",d4t=()=>"修改…",h4t=()=>"بازنگری…",p4t=()=>"طلب تعديل…",m4t=()=>"Pedir cambios…",g4t=()=>"संशोधित करें…",v4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d4t():t==="fa"?h4t():t==="ar"?p4t():t==="es"?m4t():t==="hi"?g4t():f4t()}),b4t=()=>"What should change? (optional)",y4t=()=>"需要更改什么?(可选)",x4t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",w4t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",k4t=()=>"¿Qué debería cambiar? (opcional)",S4t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",C4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y4t():t==="fa"?x4t():t==="ar"?w4t():t==="es"?k4t():t==="hi"?S4t():b4t()}),E4t=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,N4t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,z4t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,j4t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,A4t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,T4t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,R4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N4t(e):t==="fa"?z4t(e):t==="ar"?j4t(e):t==="es"?A4t(e):t==="hi"?T4t(e):E4t(e)}),M4t=()=>"Cancel",O4t=()=>"取消",D4t=()=>"لغو",L4t=()=>"إلغاء",I4t=()=>"Cancelar",$4t=()=>"रद्द करें",B4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O4t():t==="fa"?D4t():t==="ar"?L4t():t==="es"?I4t():t==="hi"?$4t():M4t()}),P4t=()=>"Delete project",F4t=()=>"删除项目",H4t=()=>"حذف پروژه",q4t=()=>"حذف المشروع",U4t=()=>"Eliminar proyecto",G4t=()=>"प्रोजेक्ट हटाएं",$L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F4t():t==="fa"?H4t():t==="ar"?q4t():t==="es"?U4t():t==="hi"?G4t():P4t()}),V4t=()=>"The local folder and linked GitHub repository are kept.",K4t=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",W4t=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",Q4t=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",X4t=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Y4t=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",Z4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K4t():t==="fa"?W4t():t==="ar"?Q4t():t==="es"?X4t():t==="hi"?Y4t():V4t()}),J4t=()=>"The local folder is kept.",e3t=()=>"本地文件夹会保留。",t3t=()=>"پوشهٔ محلی نگه داشته می‌شود.",n3t=()=>"يُحتفظ بالمجلد المحلي.",r3t=()=>"La carpeta local se conserva.",s3t=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",i3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e3t():t==="fa"?t3t():t==="ar"?n3t():t==="es"?r3t():t==="hi"?s3t():J4t()}),a3t=()=>"New project",o3t=()=>"新建项目",c3t=()=>"پروژهٔ جدید",l3t=()=>"مشروع جديد",u3t=()=>"Nuevo proyecto",_3t=()=>"नया प्रोजेक्ट",nb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o3t():t==="fa"?c3t():t==="ar"?l3t():t==="es"?u3t():t==="hi"?_3t():a3t()}),f3t=()=>"Projects",d3t=()=>"项目",h3t=()=>"پروژه‌ها",p3t=()=>"المشاريع",m3t=()=>"Proyectos",g3t=()=>"प्रोजेक्ट",MS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d3t():t==="fa"?h3t():t==="ar"?p3t():t==="es"?m3t():t==="hi"?g3t():f3t()}),v3t=()=>"Local",b3t=()=>"本地",y3t=()=>"محلی",x3t=()=>"محلي",w3t=()=>"Local",k3t=()=>"लोकल",G3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b3t():t==="fa"?y3t():t==="ar"?x3t():t==="es"?w3t():t==="hi"?k3t():v3t()}),S3t=()=>"Installing the compatible binary. This may take a few minutes.",C3t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",E3t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",N3t=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",z3t=()=>"Instalando el binario compatible. Puede tardar unos minutos.",j3t=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",A3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C3t():t==="fa"?E3t():t==="ar"?N3t():t==="es"?z3t():t==="hi"?j3t():S3t()}),T3t=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,R3t=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,M3t=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,O3t=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,D3t=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,L3t=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,I3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?R3t(e):t==="fa"?M3t(e):t==="ar"?O3t(e):t==="es"?D3t(e):t==="hi"?L3t(e):T3t(e)}),$3t=()=>"Check again",B3t=()=>"再次检查",P3t=()=>"بررسی دوباره",F3t=()=>"تحقق مجددًا",H3t=()=>"Volver a comprobar",q3t=()=>"फिर से जाँचें",Fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B3t():t==="fa"?P3t():t==="ar"?F3t():t==="es"?H3t():t==="hi"?q3t():$3t()}),U3t=()=>"Closing…",G3t=()=>"正在关闭…",V3t=()=>"در حال بستن…",K3t=()=>"جارٍ الإغلاق…",W3t=()=>"Cerrando…",Q3t=()=>"बंद हो रहा है…",X3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G3t():t==="fa"?V3t():t==="ar"?K3t():t==="es"?W3t():t==="hi"?Q3t():U3t()}),Y3t=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,Z3t=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,J3t=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,e5t=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,t5t=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,n5t=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,r5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Z3t(e):t==="fa"?J3t(e):t==="ar"?e5t(e):t==="es"?t5t(e):t==="hi"?n5t(e):Y3t(e)}),s5t=()=>"Preparing your remote workspace…",i5t=()=>"正在准备远程工作区…",a5t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",o5t=()=>"جارٍ تحضير مساحة عملك البعيدة…",c5t=()=>"Preparando tu espacio de trabajo remoto…",l5t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",u5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i5t():t==="fa"?a5t():t==="ar"?o5t():t==="es"?c5t():t==="hi"?l5t():s5t()}),_5t=e=>`Connecting to ${e==null?void 0:e.host}`,f5t=e=>`正在连接到 ${e==null?void 0:e.host}`,d5t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,h5t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,p5t=e=>`Conectando a ${e==null?void 0:e.host}`,m5t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,g5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f5t(e):t==="fa"?d5t(e):t==="ar"?h5t(e):t==="es"?p5t(e):t==="hi"?m5t(e):_5t(e)}),v5t=()=>"Close remote host picker",b5t=()=>"关闭远程主机选择器",y5t=()=>"بستن انتخاب‌گر میزبان راه‌دور",x5t=()=>"إغلاق مُنتقي المضيف البعيد",w5t=()=>"Cerrar el selector de hosts remotos",k5t=()=>"रिमोट होस्ट पिकर बंद करें",S5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b5t():t==="fa"?y5t():t==="ar"?x5t():t==="es"?w5t():t==="hi"?k5t():v5t()}),C5t=()=>"Choose a configured SSH host.",E5t=()=>"选择已配置的 SSH 主机。",N5t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",z5t=()=>"اختر مضيف SSH مُعدًّا.",j5t=()=>"Elige un host SSH configurado.",A5t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",T5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E5t():t==="fa"?N5t():t==="ar"?z5t():t==="es"?j5t():t==="hi"?A5t():C5t()}),R5t=()=>"Connect to remote",M5t=()=>"连接到远程主机",O5t=()=>"اتصال به میزبان راه‌دور",D5t=()=>"الاتصال بجهاز بعيد",L5t=()=>"Conectar a un host remoto",I5t=()=>"रिमोट से कनेक्ट करें",V3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M5t():t==="fa"?O5t():t==="ar"?D5t():t==="es"?L5t():t==="hi"?I5t():R5t()}),$5t=()=>"Disconnect",B5t=()=>"断开连接",P5t=()=>"قطع اتصال",F5t=()=>"قطع الاتصال",H5t=()=>"Desconectar",q5t=()=>"डिस्कनेक्ट करें",K3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B5t():t==="fa"?P5t():t==="ar"?F5t():t==="es"?H5t():t==="hi"?q5t():$5t()}),U5t=()=>"Your remote work is still running. Reconnect when you’re ready.",G5t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",V5t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",K5t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",W5t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",Q5t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",X5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G5t():t==="fa"?V5t():t==="ar"?K5t():t==="es"?W5t():t==="hi"?Q5t():U5t()}),Y5t=e=>`Disconnected from ${e==null?void 0:e.host}`,Z5t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,J5t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,ekt=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,tkt=e=>`Desconectado de ${e==null?void 0:e.host}`,nkt=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,BL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Z5t(e):t==="fa"?J5t(e):t==="ar"?ekt(e):t==="es"?tkt(e):t==="hi"?nkt(e):Y5t(e)}),rkt=e=>`Could not connect to ${e==null?void 0:e.host}`,skt=e=>`无法连接到 ${e==null?void 0:e.host}`,ikt=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,akt=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,okt=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,ckt=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,lkt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?skt(e):t==="fa"?ikt(e):t==="ar"?akt(e):t==="es"?okt(e):t==="hi"?ckt(e):rkt(e)}),ukt=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",_kt=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",fkt=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",dkt=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",hkt=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",pkt=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",mkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_kt():t==="fa"?fkt():t==="ar"?dkt():t==="es"?hkt():t==="hi"?pkt():ukt()}),gkt=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",vkt=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",bkt=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",ykt=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",xkt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",wkt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",kkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vkt():t==="fa"?bkt():t==="ar"?ykt():t==="es"?xkt():t==="hi"?wkt():gkt()}),Skt=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,Ckt=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,Ekt=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,Nkt=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,zkt=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,jkt=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,Akt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ckt(e):t==="fa"?Ekt(e):t==="ar"?Nkt(e):t==="es"?zkt(e):t==="hi"?jkt(e):Skt(e)}),Tkt=()=>"OpenResearch binary",Rkt=()=>"OpenResearch 二进制文件",Mkt=()=>"فایل اجرایی OpenResearch",Okt=()=>"الملف التنفيذي لـ OpenResearch",Dkt=()=>"Binario de OpenResearch",Lkt=()=>"OpenResearch बाइनरी",Ikt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rkt():t==="fa"?Mkt():t==="ar"?Okt():t==="es"?Dkt():t==="hi"?Lkt():Tkt()}),$kt=()=>"OpenResearch Database",Bkt=()=>"OpenResearch 数据库",Pkt=()=>"پایگاه دادهٔ OpenResearch",Fkt=()=>"قاعدة بيانات OpenResearch",Hkt=()=>"Base de datos de OpenResearch",qkt=()=>"OpenResearch डेटाबेस",Ukt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bkt():t==="fa"?Pkt():t==="ar"?Fkt():t==="es"?Hkt():t==="hi"?qkt():$kt()}),Gkt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",Vkt=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",Kkt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",Wkt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",Qkt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",Xkt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",Ykt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vkt():t==="fa"?Kkt():t==="ar"?Wkt():t==="es"?Qkt():t==="hi"?Xkt():Gkt()}),Zkt=()=>"Install OpenResearch?",Jkt=()=>"安装 OpenResearch?",eSt=()=>"OpenResearch نصب شود؟",tSt=()=>"تثبيت OpenResearch؟",nSt=()=>"¿Instalar OpenResearch?",rSt=()=>"OpenResearch इंस्टॉल करें?",sSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jkt():t==="fa"?eSt():t==="ar"?tSt():t==="es"?nSt():t==="hi"?rSt():Zkt()}),iSt=()=>"Installing…",aSt=()=>"正在安装…",oSt=()=>"در حال نصب…",cSt=()=>"جارٍ التثبيت…",lSt=()=>"Instalando…",uSt=()=>"इंस्टॉल हो रहा है…",_St=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aSt():t==="fa"?oSt():t==="ar"?cSt():t==="es"?lSt():t==="hi"?uSt():iSt()}),fSt=()=>"No matching SSH hosts",dSt=()=>"没有匹配的 SSH 主机",hSt=()=>"میزبان SSH منطبقی پیدا نشد",pSt=()=>"لا توجد مضيفات SSH مطابقة",mSt=()=>"No hay hosts SSH que coincidan",gSt=()=>"कोई मेल खाता SSH होस्ट नहीं",vSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dSt():t==="fa"?hSt():t==="ar"?pSt():t==="es"?mSt():t==="hi"?gSt():fSt()}),bSt=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,ySt=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,xSt=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,wSt=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,kSt=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,SSt=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,CSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ySt(e):t==="fa"?xSt(e):t==="ar"?wSt(e):t==="es"?kSt(e):t==="hi"?SSt(e):bSt(e)}),ESt=()=>"Open remote",NSt=()=>"打开远程工作区",zSt=()=>"باز کردن راه‌دور",jSt=()=>"فتح مساحة العمل البعيدة",ASt=()=>"Abrir remoto",TSt=()=>"रिमोट खोलें",RSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NSt():t==="fa"?zSt():t==="ar"?jSt():t==="es"?ASt():t==="hi"?TSt():ESt()}),MSt=()=>"Closing this tab or disconnecting leaves agents and experiments running. Approval requests remain pending for up to 55 minutes. A host restart or administrator policy may stop OpenResearch.",OSt=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",DSt=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",LSt=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",ISt=()=>"Si cierras esta pestaña o te desconectas, los agentes y experimentos siguen en ejecución. Las solicitudes de aprobación quedan pendientes hasta 55 minutos. Un reinicio del host o una política del administrador pueden detener OpenResearch.",$St=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",BSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OSt():t==="fa"?DSt():t==="ar"?LSt():t==="es"?ISt():t==="hi"?$St():MSt()}),PSt=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",FSt=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",HSt=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",qSt=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",USt=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",GSt=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",VSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FSt():t==="fa"?HSt():t==="ar"?qSt():t==="es"?USt():t==="hi"?GSt():PSt()}),KSt=()=>"Preparing remote workspace…",WSt=()=>"正在准备远程工作区…",QSt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",XSt=()=>"جارٍ تحضير مساحة العمل البعيدة…",YSt=()=>"Preparando el espacio de trabajo remoto…",ZSt=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",JSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WSt():t==="fa"?QSt():t==="ar"?XSt():t==="es"?YSt():t==="hi"?ZSt():KSt()}),e6t=()=>"Reconnect",t6t=()=>"重新连接",n6t=()=>"اتصال دوباره",r6t=()=>"إعادة الاتصال",s6t=()=>"Reconectar",i6t=()=>"फिर से कनेक्ट करें",Hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t6t():t==="fa"?n6t():t==="ar"?r6t():t==="es"?s6t():t==="hi"?i6t():e6t()}),a6t=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",o6t=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",c6t=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",l6t=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",u6t=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",_6t=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",f6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o6t():t==="fa"?c6t():t==="ar"?l6t():t==="es"?u6t():t==="hi"?_6t():a6t()}),d6t=e=>`Reconnecting to ${e==null?void 0:e.host}`,h6t=e=>`正在重新连接到 ${e==null?void 0:e.host}`,p6t=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,m6t=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,g6t=e=>`Reconectando a ${e==null?void 0:e.host}`,v6t=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,b6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?h6t(e):t==="fa"?p6t(e):t==="ar"?m6t(e):t==="es"?g6t(e):t==="hi"?v6t(e):d6t(e)}),y6t=()=>"Search SSH hosts",x6t=()=>"搜索 SSH 主机",w6t=()=>"جستجوی میزبان‌های SSH",k6t=()=>"البحث في مضيفات SSH",S6t=()=>"Buscar hosts SSH",C6t=()=>"SSH होस्ट खोजें",qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x6t():t==="fa"?w6t():t==="ar"?k6t():t==="es"?S6t():t==="hi"?C6t():y6t()}),E6t=e=>`SSH: ${e==null?void 0:e.host}`,N6t=e=>`SSH:${e==null?void 0:e.host}`,z6t=e=>`SSH: ${e==null?void 0:e.host}`,j6t=e=>`SSH: ${e==null?void 0:e.host}`,A6t=e=>`SSH: ${e==null?void 0:e.host}`,T6t=e=>`SSH: ${e==null?void 0:e.host}`,Cw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N6t(e):t==="fa"?z6t(e):t==="ar"?j6t(e):t==="es"?A6t(e):t==="hi"?T6t(e):E6t(e)}),R6t=()=>"Start a new OpenResearch host",M6t=()=>"启动新的 OpenResearch 主机",O6t=()=>"راه‌اندازی میزبان جدید OpenResearch",D6t=()=>"بدء مضيف OpenResearch جديد",L6t=()=>"Iniciar un nuevo host de OpenResearch",I6t=()=>"एक नया OpenResearch होस्ट शुरू करें",$6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M6t():t==="fa"?O6t():t==="ar"?D6t():t==="es"?L6t():t==="hi"?I6t():R6t()}),B6t=e=>`End ${e==null?void 0:e.count} pending approvals.`,P6t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,F6t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,H6t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,q6t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,U6t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,G6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P6t(e):t==="fa"?F6t(e):t==="ar"?H6t(e):t==="es"?q6t(e):t==="hi"?U6t(e):B6t(e)}),V6t=()=>"Stop OpenResearch",K6t=()=>"停止 OpenResearch",W6t=()=>"توقف OpenResearch",Q6t=()=>"إيقاف OpenResearch",X6t=()=>"Detener OpenResearch",Y6t=()=>"OpenResearch रोकें",Z6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K6t():t==="fa"?W6t():t==="ar"?Q6t():t==="es"?X6t():t==="hi"?Y6t():V6t()}),J6t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,eCt=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,tCt=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,nCt=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,rCt=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,sCt=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,iCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eCt(e):t==="fa"?tCt(e):t==="ar"?nCt(e):t==="es"?rCt(e):t==="hi"?sCt(e):J6t(e)}),aCt=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,oCt=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,cCt=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,lCt=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,uCt=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,_Ct=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,fCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oCt(e):t==="fa"?cCt(e):t==="ar"?lCt(e):t==="es"?uCt(e):t==="hi"?_Ct(e):aCt(e)}),dCt=()=>"Stop OpenResearch on host",hCt=()=>"停止主机上的 OpenResearch",pCt=()=>"توقف OpenResearch روی میزبان",mCt=()=>"إيقاف OpenResearch على المضيف",gCt=()=>"Detener OpenResearch en el host",vCt=()=>"होस्ट पर OpenResearch रोकें",PL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hCt():t==="fa"?pCt():t==="ar"?mCt():t==="es"?gCt():t==="hi"?vCt():dCt()}),bCt=()=>"This will also:",yCt=()=>"这还将:",xCt=()=>"این کار همچنین:",wCt=()=>"سيؤدي هذا أيضًا إلى:",kCt=()=>"Esto también:",SCt=()=>"इससे यह भी होगा:",CCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yCt():t==="fa"?xCt():t==="ar"?wCt():t==="es"?kCt():t==="hi"?SCt():bCt()}),ECt=()=>"End 1 pending approval.",NCt=()=>"结束 1 个待审批请求。",zCt=()=>"۱ تأیید در انتظار را پایان می‌دهد.",jCt=()=>"إنهاء طلب موافقة معلّق واحد.",ACt=()=>"Cancelará 1 aprobación pendiente.",TCt=()=>"1 लंबित स्वीकृति खत्म होगी।",RCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NCt():t==="fa"?zCt():t==="ar"?jCt():t==="es"?ACt():t==="hi"?TCt():ECt()}),MCt=()=>"Leave 1 submitted experiment running.",OCt=()=>"让 1 个已提交实验继续运行。",DCt=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",LCt=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",ICt=()=>"Dejará 1 experimento enviado en ejecución.",$Ct=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",BCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OCt():t==="fa"?DCt():t==="ar"?LCt():t==="es"?ICt():t==="hi"?$Ct():MCt()}),PCt=()=>"Disconnect 1 other client.",FCt=()=>"断开 1 个其他客户端。",HCt=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",qCt=()=>"قطع اتصال عميل آخر واحد.",UCt=()=>"Desconectará a otro cliente.",GCt=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",VCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FCt():t==="fa"?HCt():t==="ar"?qCt():t==="es"?UCt():t==="hi"?GCt():PCt()}),KCt=()=>"Keep 1 queued message saved.",WCt=()=>"保留 1 条排队消息。",QCt=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",XCt=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",YCt=()=>"Conservará 1 mensaje en cola.",ZCt=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",JCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WCt():t==="fa"?QCt():t==="ar"?XCt():t==="es"?YCt():t==="hi"?ZCt():KCt()}),e7t=()=>"Interrupt 1 active agent turn.",t7t=()=>"中断 1 个活动代理任务。",n7t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",r7t=()=>"مقاطعة جولة وكيل نشطة واحدة.",s7t=()=>"Interrumpirá 1 turno activo de un agente.",i7t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",a7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t7t():t==="fa"?n7t():t==="ar"?r7t():t==="es"?s7t():t==="hi"?i7t():e7t()}),o7t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,c7t=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,l7t=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,u7t=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,_7t=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,f7t=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,d7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c7t(e):t==="fa"?l7t(e):t==="ar"?u7t(e):t==="es"?_7t(e):t==="hi"?f7t(e):o7t(e)}),h7t=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,p7t=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,m7t=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,g7t=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,v7t=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,b7t=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,y7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?p7t(e):t==="fa"?m7t(e):t==="ar"?g7t(e):t==="es"?v7t(e):t==="hi"?b7t(e):h7t(e)}),x7t=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,w7t=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,k7t=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,S7t=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,C7t=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,E7t=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,N7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w7t(e):t==="fa"?k7t(e):t==="ar"?S7t(e):t==="es"?C7t(e):t==="hi"?E7t(e):x7t(e)}),z7t=()=>"Stopping host…",j7t=()=>"正在停止主机…",A7t=()=>"در حال توقف میزبان…",T7t=()=>"جارٍ إيقاف المضيف…",R7t=()=>"Deteniendo el host…",M7t=()=>"होस्ट रोका जा रहा है…",O7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j7t():t==="fa"?A7t():t==="ar"?T7t():t==="es"?R7t():t==="hi"?M7t():z7t()}),D7t=()=>"Update",L7t=()=>"更新",I7t=()=>"به‌روزرسانی",$7t=()=>"تحديث",B7t=()=>"Actualizar",P7t=()=>"अपडेट करें",Uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L7t():t==="fa"?I7t():t==="ar"?$7t():t==="es"?B7t():t==="hi"?P7t():D7t()}),F7t=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,H7t=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,q7t=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,U7t=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,G7t=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,V7t=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,K7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H7t(e):t==="fa"?q7t(e):t==="ar"?U7t(e):t==="es"?G7t(e):t==="hi"?V7t(e):F7t(e)}),W7t=()=>"Update OpenResearch?",Q7t=()=>"更新 OpenResearch?",X7t=()=>"OpenResearch به‌روزرسانی شود؟",Y7t=()=>"تحديث OpenResearch؟",Z7t=()=>"¿Actualizar OpenResearch?",J7t=()=>"OpenResearch अपडेट करें?",e8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q7t():t==="fa"?X7t():t==="ar"?Y7t():t==="es"?Z7t():t==="hi"?J7t():W7t()}),t8t=()=>"Updating…",n8t=()=>"正在更新…",r8t=()=>"در حال به‌روزرسانی…",s8t=()=>"جارٍ التحديث…",i8t=()=>"Actualizando…",a8t=()=>"अपडेट हो रहा है…",o8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n8t():t==="fa"?r8t():t==="ar"?s8t():t==="es"?i8t():t==="hi"?a8t():t8t()}),c8t=()=>"Disable syncing",l8t=()=>"关闭同步",u8t=()=>"غیرفعال کردن همگام‌سازی",_8t=()=>"تعطيل المزامنة",f8t=()=>"Desactivar sincronización",d8t=()=>"सिंकिंग बंद करें",h8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l8t():t==="fa"?u8t():t==="ar"?_8t():t==="es"?f8t():t==="hi"?d8t():c8t()}),p8t=()=>"Enable GitHub syncing",m8t=()=>"启用 GitHub 同步",g8t=()=>"فعال‌سازی همگام‌سازی GitHub",v8t=()=>"تفعيل مزامنة GitHub",b8t=()=>"Activar sincronización con GitHub",y8t=()=>"GitHub सिंकिंग चालू करें",x8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m8t():t==="fa"?g8t():t==="ar"?v8t():t==="es"?b8t():t==="hi"?y8t():p8t()}),w8t=()=>"Enabling…",k8t=()=>"正在启用…",S8t=()=>"در حال فعال‌سازی…",C8t=()=>"جارٍ التفعيل…",E8t=()=>"Activando…",N8t=()=>"चालू हो रहा है…",z8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k8t():t==="fa"?S8t():t==="ar"?C8t():t==="es"?E8t():t==="hi"?N8t():w8t()}),j8t=()=>"Updating…",A8t=()=>"正在更新…",T8t=()=>"در حال به‌روزرسانی…",R8t=()=>"جارٍ التحديث…",M8t=()=>"Actualizando…",O8t=()=>"अपडेट हो रहा है…",D8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A8t():t==="fa"?T8t():t==="ar"?R8t():t==="es"?M8t():t==="hi"?O8t():j8t()}),L8t=()=>"Reopen a previous chat",I8t=()=>"重新打开之前的聊天",$8t=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",B8t=()=>"إعادة فتح محادثة سابقة",P8t=()=>"Vuelve a abrir un chat anterior",F8t=()=>"पिछली चैट फिर से खोलें",H8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I8t():t==="fa"?$8t():t==="ar"?B8t():t==="es"?P8t():t==="hi"?F8t():L8t()}),q8t=()=>"No chats to resume",U8t=()=>"没有可恢复的聊天",G8t=()=>"گفت‌وگویی برای ادامه وجود ندارد",V8t=()=>"لا توجد محادثات لاستئنافها",K8t=()=>"No hay chats que reanudar",W8t=()=>"फिर से शुरू करने के लिए कोई चैट नहीं है",Q8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U8t():t==="fa"?G8t():t==="ar"?V8t():t==="es"?K8t():t==="hi"?W8t():q8t()}),X8t=()=>"From your terminal — adopting copies the transcript, and new turns continue there",Y8t=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",Z8t=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",J8t=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",e9t=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",t9t=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",Gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y8t():t==="fa"?Z8t():t==="ar"?J8t():t==="es"?e9t():t==="hi"?t9t():X8t()}),n9t=()=>"Search chats",r9t=()=>"搜索聊天",s9t=()=>"جست‌وجوی گفت‌وگوها",i9t=()=>"البحث في المحادثات",a9t=()=>"Buscar chats",o9t=()=>"चैट खोजें",Vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r9t():t==="fa"?s9t():t==="ar"?i9t():t==="es"?a9t():t==="hi"?o9t():n9t()}),c9t=()=>"Resume a chat",l9t=()=>"恢复聊天",u9t=()=>"ادامهٔ یک گفت‌وگو",_9t=()=>"استئناف محادثة",f9t=()=>"Reanudar un chat",d9t=()=>"चैट फिर से शुरू करें",Kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l9t():t==="fa"?u9t():t==="ar"?_9t():t==="es"?f9t():t==="hi"?d9t():c9t()}),h9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,p9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,m9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,g9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,v9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,b9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,y9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?p9t(e):t==="fa"?m9t(e):t==="ar"?g9t(e):t==="es"?v9t(e):t==="hi"?b9t(e):h9t(e)}),x9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,w9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,k9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,S9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,C9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,E9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,N9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w9t(e):t==="fa"?k9t(e):t==="ar"?S9t(e):t==="es"?C9t(e):t==="hi"?E9t(e):x9t(e)}),z9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · next attempt in ${e==null?void 0:e.seconds}s`,j9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,A9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,T9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,R9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · siguiente intento en ${e==null?void 0:e.seconds} s`,M9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,O9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j9t(e):t==="fa"?A9t(e):t==="ar"?T9t(e):t==="es"?R9t(e):t==="hi"?M9t(e):z9t(e)}),D9t=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,L9t=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,I9t=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,$9t=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,B9t=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,P9t=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,F9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L9t(e):t==="fa"?I9t(e):t==="ar"?$9t(e):t==="es"?B9t(e):t==="hi"?P9t(e):D9t(e)}),H9t=()=>"CLI is retrying…",q9t=()=>"CLI 正在重试…",U9t=()=>"CLI در حال تلاش دوباره است…",G9t=()=>"تعيد واجهة سطر الأوامر المحاولة…",V9t=()=>"La CLI está reintentando…",K9t=()=>"CLI फिर से कोशिश कर रहा है…",W9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q9t():t==="fa"?U9t():t==="ar"?G9t():t==="es"?V9t():t==="hi"?K9t():H9t()}),Q9t=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,X9t=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,Y9t=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Z9t=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,J9t=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,eEt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,tEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X9t(e):t==="fa"?Y9t(e):t==="ar"?Z9t(e):t==="es"?J9t(e):t==="hi"?eEt(e):Q9t(e)}),nEt=()=>"Sending again…",rEt=()=>"正在重新发送…",sEt=()=>"در حال ارسال دوباره…",iEt=()=>"جارٍ إعادة الإرسال…",aEt=()=>"Reenviando…",oEt=()=>"फिर से भेजा जा रहा है…",cEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rEt():t==="fa"?sEt():t==="ar"?iEt():t==="es"?aEt():t==="hi"?oEt():nEt()}),lEt=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,uEt=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,_Et=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,fEt=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,dEt=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,hEt=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,pEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uEt(e):t==="fa"?_Et(e):t==="ar"?fEt(e):t==="es"?dEt(e):t==="hi"?hEt(e):lEt(e)}),mEt=()=>"Retrying…",gEt=()=>"正在重试…",vEt=()=>"در حال تلاش دوباره…",bEt=()=>"جارٍ إعادة المحاولة…",yEt=()=>"Reintentando…",xEt=()=>"फिर से कोशिश हो रही है…",FL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gEt():t==="fa"?vEt():t==="ar"?bEt():t==="es"?yEt():t==="hi"?xEt():mEt()}),wEt=()=>"Default speed",kEt=()=>"默认速度",SEt=()=>"سرعت پیش‌فرض",CEt=()=>"السرعة الافتراضية",EEt=()=>"Velocidad predeterminada",NEt=()=>"डिफ़ॉल्ट गति",zEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kEt():t==="fa"?SEt():t==="ar"?CEt():t==="es"?EEt():t==="hi"?NEt():wEt()}),jEt=()=>"Standard",AEt=()=>"标准",TEt=()=>"استاندارد",REt=()=>"قياسي",MEt=()=>"Estándar",OEt=()=>"स्टैंडर्ड",DEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AEt():t==="fa"?TEt():t==="ar"?REt():t==="es"?MEt():t==="hi"?OEt():jEt()}),LEt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,IEt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,$Et=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,BEt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,PEt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,FEt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,HEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IEt(e):t==="fa"?$Et(e):t==="ar"?BEt(e):t==="es"?PEt(e):t==="hi"?FEt(e):LEt(e)}),qEt=()=>"Appearance",UEt=()=>"外观",GEt=()=>"ظاهر",VEt=()=>"المظهر",KEt=()=>"Apariencia",WEt=()=>"रूप-रंग",QEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UEt():t==="fa"?GEt():t==="ar"?VEt():t==="es"?KEt():t==="hi"?WEt():qEt()}),XEt=()=>"Check",YEt=()=>"检查",ZEt=()=>"بررسی",JEt=()=>"فحص",eNt=()=>"Comprobar",tNt=()=>"जाँचें",nNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YEt():t==="fa"?ZEt():t==="ar"?JEt():t==="es"?eNt():t==="hi"?tNt():XEt()}),rNt=()=>"Check again",sNt=()=>"再次检查",iNt=()=>"بررسی دوباره",aNt=()=>"تحقق مجددًا",oNt=()=>"Volver a comprobar",cNt=()=>"फिर से जाँचें",Qm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sNt():t==="fa"?iNt():t==="ar"?aNt():t==="es"?oNt():t==="hi"?cNt():rNt()}),lNt=()=>"Check for updates",uNt=()=>"检查更新",_Nt=()=>"بررسی به‌روزرسانی",fNt=()=>"التحقق من التحديثات",dNt=()=>"Buscar actualizaciones",hNt=()=>"अपडेट के लिए जाँचें",pNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uNt():t==="fa"?_Nt():t==="ar"?fNt():t==="es"?dNt():t==="hi"?hNt():lNt()}),mNt=()=>"Check now",gNt=()=>"立即检查",vNt=()=>"اکنون بررسی کن",bNt=()=>"التحقق الآن",yNt=()=>"Comprobar ahora",xNt=()=>"अभी जाँचें",wNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gNt():t==="fa"?vNt():t==="ar"?bNt():t==="es"?yNt():t==="hi"?xNt():mNt()}),kNt=()=>"Check setup",SNt=()=>"检查设置",CNt=()=>"بررسی راه‌اندازی",ENt=()=>"فحص الإعداد",NNt=()=>"Comprobar configuración",zNt=()=>"सेटअप जाँचें",jNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SNt():t==="fa"?CNt():t==="ar"?ENt():t==="es"?NNt():t==="hi"?zNt():kNt()}),ANt=()=>"orx checks a few times a day on its own.",TNt=()=>"orx 每天会自动检查几次。",RNt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",MNt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",ONt=()=>"orx lo comprueba por sí solo varias veces al día.",DNt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",LNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TNt():t==="fa"?RNt():t==="ar"?MNt():t==="es"?ONt():t==="hi"?DNt():ANt()}),INt=()=>"Choose a flavor",$Nt=()=>"选择配置",BNt=()=>"انتخاب پیکربندی",PNt=()=>"اختر تكوين الموارد",FNt=()=>"Elige una opción",HNt=()=>"एक फ़्लेवर चुनें",qNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Nt():t==="fa"?BNt():t==="ar"?PNt():t==="es"?FNt():t==="hi"?HNt():INt()}),UNt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,GNt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,VNt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,KNt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,WNt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,QNt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,XNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GNt(e):t==="fa"?VNt(e):t==="ar"?KNt(e):t==="es"?WNt(e):t==="hi"?QNt(e):UNt(e)}),YNt=()=>"clean",ZNt=()=>"无更改",JNt=()=>"بدون تغییر",ezt=()=>"نظيف",tzt=()=>"sin cambios",nzt=()=>"साफ़",rzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZNt():t==="fa"?JNt():t==="ar"?ezt():t==="es"?tzt():t==="hi"?nzt():YNt()}),szt=e=>`Already linked at ${e==null?void 0:e.link}.`,izt=e=>`已链接到 ${e==null?void 0:e.link}。`,azt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,ozt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,czt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,lzt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,uzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?izt(e):t==="fa"?azt(e):t==="ar"?ozt(e):t==="es"?czt(e):t==="hi"?lzt(e):szt(e)}),_zt=e=>`Linked ${e==null?void 0:e.link}.`,fzt=e=>`已链接 ${e==null?void 0:e.link}。`,dzt=e=>`${e==null?void 0:e.link} پیوند شد.`,hzt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,pzt=e=>`Enlazado en ${e==null?void 0:e.link}.`,mzt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,gzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fzt(e):t==="fa"?dzt(e):t==="ar"?hzt(e):t==="es"?pzt(e):t==="hi"?mzt(e):_zt(e)}),vzt=()=>"Close terminal",bzt=()=>"关闭终端",yzt=()=>"بستن ترمینال",xzt=()=>"إغلاق الطرفية",wzt=()=>"Cerrar la terminal",kzt=()=>"टर्मिनल बंद करें",Wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bzt():t==="fa"?yzt():t==="ar"?xzt():t==="es"?wzt():t==="hi"?kzt():vzt()}),Szt=()=>"Terminal closed",Czt=()=>"终端已关闭",Ezt=()=>"ترمینال بسته شد",Nzt=()=>"أُغلقت الطرفية",zzt=()=>"Terminal cerrada",jzt=()=>"टर्मिनल बंद हो गया",Azt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Czt():t==="fa"?Ezt():t==="ar"?Nzt():t==="es"?zzt():t==="hi"?jzt():Szt()}),Tzt=()=>"Finished",Rzt=()=>"已完成",Mzt=()=>"انجام شد",Ozt=()=>"اكتمل",Dzt=()=>"Finalizado",Lzt=()=>"पूर्ण",Izt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rzt():t==="fa"?Mzt():t==="ar"?Ozt():t==="es"?Dzt():t==="hi"?Lzt():Tzt()}),$zt=()=>"Command failed",Bzt=()=>"命令失败",Pzt=()=>"دستور ناموفق بود",Fzt=()=>"فشل الأمر",Hzt=()=>"El comando falló",qzt=()=>"कमांड विफल रही",Uzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bzt():t==="fa"?Pzt():t==="ar"?Fzt():t==="es"?Hzt():t==="hi"?qzt():$zt()}),Gzt=()=>"Running…",Vzt=()=>"运行中…",Kzt=()=>"در حال اجرا…",Wzt=()=>"قيد التشغيل…",Qzt=()=>"Ejecutando…",Xzt=()=>"चल रहा है…",Yzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vzt():t==="fa"?Kzt():t==="ar"?Wzt():t==="es"?Qzt():t==="hi"?Xzt():Gzt()}),Zzt=()=>"Connect",Jzt=()=>"连接",ejt=()=>"اتصال",tjt=()=>"اتصال",njt=()=>"Conectar",rjt=()=>"कनेक्ट करें",OS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jzt():t==="fa"?ejt():t==="ar"?tjt():t==="es"?njt():t==="hi"?rjt():Zzt()}),sjt=()=>"Connected via GitHub CLI",ijt=()=>"已通过 GitHub CLI 连接",ajt=()=>"از طریق GitHub CLI متصل است",ojt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",cjt=()=>"Conectado mediante GitHub CLI",ljt=()=>"GitHub CLI के ज़रिए कनेक्टेड",HL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ijt():t==="fa"?ajt():t==="ar"?ojt():t==="es"?cjt():t==="hi"?ljt():sjt()}),ujt=()=>"Connecting…",_jt=()=>"正在连接…",fjt=()=>"در حال اتصال…",djt=()=>"جارٍ الاتصال…",hjt=()=>"Conectando…",pjt=()=>"कनेक्ट हो रहा है…",qL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_jt():t==="fa"?fjt():t==="ar"?djt():t==="es"?hjt():t==="hi"?pjt():ujt()}),mjt=e=>`CPU cores: ${e==null?void 0:e.count}`,gjt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,vjt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,bjt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,yjt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,xjt=e=>`CPU कोर: ${e==null?void 0:e.count}`,wjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gjt(e):t==="fa"?vjt(e):t==="ar"?bjt(e):t==="es"?yjt(e):t==="hi"?xjt(e):mjt(e)}),kjt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",Sjt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",Cjt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",Ejt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",Njt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",zjt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",jjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sjt():t==="fa"?Cjt():t==="ar"?Ejt():t==="es"?Njt():t==="hi"?zjt():kjt()}),Ajt=()=>"the current project",Tjt=()=>"当前项目",Rjt=()=>"پروژهٔ فعلی",Mjt=()=>"المشروع الحالي",Ojt=()=>"el proyecto actual",Djt=()=>"मौजूदा प्रोजेक्ट",Ljt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tjt():t==="fa"?Rjt():t==="ar"?Mjt():t==="es"?Ojt():t==="hi"?Djt():Ajt()}),Ijt=e=>`${e==null?void 0:e.value} (custom)`,$jt=e=>`${e==null?void 0:e.value}(自定义)`,Bjt=e=>`${e==null?void 0:e.value} (سفارشی)`,Pjt=e=>`${e==null?void 0:e.value} (مخصص)`,Fjt=e=>`${e==null?void 0:e.value} (personalizado)`,Hjt=e=>`${e==null?void 0:e.value} (कस्टम)`,qjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$jt(e):t==="fa"?Bjt(e):t==="ar"?Pjt(e):t==="es"?Fjt(e):t==="hi"?Hjt(e):Ijt(e)}),Ujt=()=>"detached",Gjt=()=>"分离头指针",Vjt=()=>"جدا از شاخه",Kjt=()=>"منفصل",Wjt=()=>"desacoplado",Qjt=()=>"डिटैच्ड",DS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gjt():t==="fa"?Vjt():t==="ar"?Kjt():t==="es"?Wjt():t==="hi"?Qjt():Ujt()}),Xjt=()=>"Disconnected",Yjt=()=>"已断开连接",Zjt=()=>"قطع اتصال",Jjt=()=>"غير متصل",eAt=()=>"Desconectado",tAt=()=>"डिस्कनेक्ट हो गया",UL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yjt():t==="fa"?Zjt():t==="ar"?Jjt():t==="es"?eAt():t==="hi"?tAt():Xjt()}),nAt=()=>"Environment tab",rAt=()=>"环境标签页",sAt=()=>"زبانهٔ محیط",iAt=()=>"تبويب البيئة",aAt=()=>"pestaña Entorno",oAt=()=>"एनवायरनमेंट टैब",cAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rAt():t==="fa"?sAt():t==="ar"?iAt():t==="es"?aAt():t==="hi"?oAt():nAt()}),lAt=()=>"Free models · No sign-in required",uAt=()=>"免费模型 · 无需登录",_At=()=>"مدل‌های رایگان · بدون نیاز به ورود",fAt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",dAt=()=>"Modelos gratuitos · No es necesario iniciar sesión",hAt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",pAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uAt():t==="fa"?_At():t==="ar"?fAt():t==="es"?dAt():t==="hi"?hAt():lAt()}),mAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,gAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,vAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,bAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,yAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,xAt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,wAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gAt(e):t==="fa"?vAt(e):t==="ar"?bAt(e):t==="es"?yAt(e):t==="hi"?xAt(e):mAt(e)}),kAt=()=>"GitHub rejected the push because this repository is archived and read-only. The local project is still available. Unarchive the repository on GitHub, then enable syncing here.",SAt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",CAt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",EAt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",NAt=()=>"GitHub rechazó el push porque este repositorio está archivado y es de solo lectura. El proyecto local sigue disponible. Desarchiva el repositorio en GitHub y vuelve a activar la sincronización aquí.",zAt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",jAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SAt():t==="fa"?CAt():t==="ar"?EAt():t==="es"?NAt():t==="hi"?zAt():kAt()}),AAt=()=>"GitHub contains changes that are not in this local project. Pull the latest GitHub changes and resolve any conflicts in Git, then try enabling syncing again.",TAt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",RAt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",MAt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",OAt=()=>"GitHub tiene cambios que no están en este proyecto local. Descarga los últimos cambios de GitHub, resuelve los conflictos en Git y vuelve a intentar activar la sincronización.",DAt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",LAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TAt():t==="fa"?RAt():t==="ar"?MAt():t==="es"?OAt():t==="hi"?DAt():AAt()}),IAt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",$At=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",BAt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",PAt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",FAt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",HAt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",qAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$At():t==="fa"?BAt():t==="ar"?PAt():t==="es"?FAt():t==="hi"?HAt():IAt()}),UAt=e=>`GPU × ${e==null?void 0:e.count}`,GAt=e=>`${e==null?void 0:e.count} 个 GPU`,VAt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,KAt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,WAt=e=>`GPU × ${e==null?void 0:e.count}`,QAt=e=>`GPU × ${e==null?void 0:e.count}`,XAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GAt(e):t==="fa"?VAt(e):t==="ar"?KAt(e):t==="es"?WAt(e):t==="hi"?QAt(e):UAt(e)}),YAt=()=>"has changes",ZAt=()=>"有更改",JAt=()=>"دارای تغییر",eTt=()=>"به تغييرات",tTt=()=>"con cambios",nTt=()=>"बदलाव हैं",rTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZAt():t==="fa"?JAt():t==="ar"?eTt():t==="es"?tTt():t==="hi"?nTt():YAt()}),sTt=e=>`This token is valid but does not report whether it can launch Jobs; OAuth tokens from ${e==null?void 0:e.login} never do. Launches may still work. For a definitive check, save a write-scoped token from ${e==null?void 0:e.url}.`,iTt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,aTt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,oTt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,cTt=e=>`Este token es válido, pero no indica si puede lanzar Jobs; los tokens OAuth de ${e==null?void 0:e.login} nunca lo indican. Puede que los lanzamientos funcionen igualmente. Para comprobarlo con seguridad, guarda un token con permiso de escritura desde ${e==null?void 0:e.url}.`,lTt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,uTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iTt(e):t==="fa"?aTt(e):t==="ar"?oTt(e):t==="es"?cTt(e):t==="hi"?lTt(e):sTt(e)}),_Tt=()=>"This token is valid, but cannot submit Hugging Face Jobs. Create a token with Jobs write permission in Hugging Face token settings, then replace it here.",fTt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",dTt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",hTt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",pTt=()=>"Este token es válido, pero no puede enviar Hugging Face Jobs. Crea un token con permiso de escritura en Jobs desde la configuración de tokens de Hugging Face y reemplázalo aquí.",mTt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",gTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fTt():t==="fa"?dTt():t==="ar"?hTt():t==="es"?pTt():t==="hi"?mTt():_Tt()}),vTt=()=>"Install",bTt=()=>"安装",yTt=()=>"نصب",xTt=()=>"تثبيت",wTt=()=>"Instalar",kTt=()=>"इंस्टॉल करें",STt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bTt():t==="fa"?yTt():t==="ar"?xTt():t==="es"?wTt():t==="hi"?kTt():vTt()}),CTt=e=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,ETt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,NTt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,zTt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,jTt=e=>`Añade ${e==null?void 0:e.command} a tu terminal, apuntando a esta app, para que la CLI y la app tengan siempre la misma versión.`,ATt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,TTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ETt(e):t==="fa"?NTt(e):t==="ar"?zTt(e):t==="es"?jTt(e):t==="hi"?ATt(e):CTt(e)}),RTt=e=>`Install the ${e==null?void 0:e.command} command`,MTt=e=>`安装 ${e==null?void 0:e.command} 命令`,OTt=e=>`نصب فرمان ${e==null?void 0:e.command}`,DTt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,LTt=e=>`Instalar el comando ${e==null?void 0:e.command}`,ITt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,$Tt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MTt(e):t==="fa"?OTt(e):t==="ar"?DTt(e):t==="es"?LTt(e):t==="hi"?ITt(e):RTt(e)}),BTt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",PTt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",FTt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",HTt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",qTt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",UTt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",GTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PTt():t==="fa"?FTt():t==="ar"?HTt():t==="es"?qTt():t==="hi"?UTt():BTt()}),VTt=()=>"Install the new release now instead of waiting for the background update.",KTt=()=>"立即安装新版本,无需等待后台更新。",WTt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",QTt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",XTt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",YTt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",ZTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KTt():t==="fa"?WTt():t==="ar"?QTt():t==="es"?XTt():t==="hi"?YTt():VTt()}),JTt=()=>"Discard your unsaved Kubernetes changes?",eRt=()=>"要放弃未保存的 Kubernetes 更改吗?",tRt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",nRt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",rRt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",sRt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",iRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eRt():t==="fa"?tRt():t==="ar"?nRt():t==="es"?rRt():t==="hi"?sRt():JTt()}),aRt=()=>"Key from",oRt=()=>"密钥来自",cRt=()=>"کلید از",lRt=()=>"المفتاح من",uRt=()=>"Clave tomada de la",_Rt=()=>"की स्रोत",fRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oRt():t==="fa"?cRt():t==="ar"?lRt():t==="es"?uRt():t==="hi"?_Rt():aRt()}),dRt=()=>"Use current kubectl context",hRt=()=>"使用当前 kubectl 上下文",pRt=()=>"استفاده از کانتکست فعلی kubectl",mRt=()=>"استخدام سياق kubectl الحالي",gRt=()=>"Usar el contexto actual de kubectl",vRt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",bRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hRt():t==="fa"?pRt():t==="ar"?mRt():t==="es"?gRt():t==="hi"?vRt():dRt()}),yRt=e=>`Use current context (${e==null?void 0:e.context})`,xRt=e=>`使用当前上下文(${e==null?void 0:e.context})`,wRt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,kRt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,SRt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,CRt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,ERt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xRt(e):t==="fa"?wRt(e):t==="ar"?kRt(e):t==="es"?SRt(e):t==="hi"?CRt(e):yRt(e)}),NRt=()=>"Language",zRt=()=>"语言",jRt=()=>"زبان",ARt=()=>"اللغة",TRt=()=>"Idioma",RRt=()=>"भाषा",MRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zRt():t==="fa"?jRt():t==="ar"?ARt():t==="es"?TRt():t==="hi"?RRt():NRt()}),ORt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,DRt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,LRt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,IRt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,$Rt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,BRt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,PRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DRt(e):t==="fa"?LRt(e):t==="ar"?IRt(e):t==="es"?$Rt(e):t==="hi"?BRt(e):ORt(e)}),FRt=()=>"Make default",HRt=()=>"设为默认值",qRt=()=>"پیش‌فرض شود",URt=()=>"جعله افتراضيًا",GRt=()=>"Establecer como predeterminado",VRt=()=>"डिफ़ॉल्ट बनाएं",KRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HRt():t==="fa"?qRt():t==="ar"?URt():t==="es"?GRt():t==="hi"?VRt():FRt()}),WRt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",QRt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",XRt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",YRt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",ZRt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",JRt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",eMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QRt():t==="fa"?XRt():t==="ar"?YRt():t==="es"?ZRt():t==="hi"?JRt():WRt()}),tMt=()=>"Replace token ID",nMt=()=>"替换令牌 ID",rMt=()=>"جایگزینی شناسهٔ توکن",sMt=()=>"استبدال معرّف الرمز",iMt=()=>"Reemplazar ID del token",aMt=()=>"टोकन ID बदलें",oMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nMt():t==="fa"?rMt():t==="ar"?sMt():t==="es"?iMt():t==="hi"?aMt():tMt()}),cMt=()=>"Replace token secret",lMt=()=>"替换令牌密钥",uMt=()=>"جایگزینی رمز توکن",_Mt=()=>"استبدال سرّ الرمز",fMt=()=>"Reemplazar secreto del token",dMt=()=>"टोकन सीक्रेट बदलें",hMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lMt():t==="fa"?uMt():t==="ar"?_Mt():t==="es"?fMt():t==="hi"?dMt():cMt()}),pMt=()=>"How to get a Modal token",mMt=()=>"如何获取 Modal 令牌",gMt=()=>"روش دریافت توکن Modal",vMt=()=>"كيفية الحصول على رمز Modal",bMt=()=>"Cómo obtener un token de Modal",yMt=()=>"Modal टोकन कैसे लें",xMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mMt():t==="fa"?gMt():t==="ar"?vMt():t==="es"?bMt():t==="hi"?yMt():pMt()}),wMt=()=>"Token ID",kMt=()=>"令牌 ID",SMt=()=>"شناسهٔ توکن",CMt=()=>"معرّف الرمز",EMt=()=>"ID del token",NMt=()=>"टोकन ID",zMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kMt():t==="fa"?SMt():t==="ar"?CMt():t==="es"?EMt():t==="hi"?NMt():wMt()}),jMt=()=>"Token secret",AMt=()=>"令牌密钥",TMt=()=>"رمز توکن",RMt=()=>"سرّ الرمز",MMt=()=>"Secreto del token",OMt=()=>"टोकन सीक्रेट",DMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AMt():t==="fa"?TMt():t==="ar"?RMt():t==="es"?MMt():t==="hi"?OMt():jMt()}),LMt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,IMt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,$Mt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,BMt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,PMt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,FMt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,HMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IMt(e):t==="fa"?$Mt(e):t==="ar"?BMt(e):t==="es"?PMt(e):t==="hi"?FMt(e):LMt(e)}),qMt=e=>`Needs ${e==null?void 0:e.tool}`,UMt=e=>`需要 ${e==null?void 0:e.tool}`,GMt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,VMt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,KMt=e=>`Requiere ${e==null?void 0:e.tool}`,WMt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,QMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UMt(e):t==="fa"?GMt(e):t==="ar"?VMt(e):t==="es"?KMt(e):t==="hi"?WMt(e):qMt(e)}),XMt=()=>"Needs tools",YMt=()=>"缺少工具",ZMt=()=>"به ابزارها نیاز دارد",JMt=()=>"يحتاج إلى أدوات",eOt=()=>"Requiere herramientas",tOt=()=>"टूल की ज़रूरत है",nOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YMt():t==="fa"?ZMt():t==="ar"?JMt():t==="es"?eOt():t==="hi"?tOt():XMt()}),rOt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,sOt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,iOt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,aOt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,oOt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,cOt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,lOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sOt(e):t==="fa"?iOt(e):t==="ar"?aOt(e):t==="es"?oOt(e):t==="hi"?cOt(e):rOt(e)}),uOt=()=>"New runs use SSH; choose a host when launching.",_Ot=()=>"新运行将使用 SSH;启动时请选择主机。",fOt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",dOt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",hOt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",pOt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",mOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ot():t==="fa"?fOt():t==="ar"?dOt():t==="es"?hOt():t==="hi"?pOt():uOt()}),gOt=()=>"New token",vOt=()=>"新令牌",bOt=()=>"توکن جدید",yOt=()=>"رمز جديد",xOt=()=>"Nuevo token",wOt=()=>"नया टोकन",kOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vOt():t==="fa"?bOt():t==="ar"?yOt():t==="es"?xOt():t==="hi"?wOt():gOt()}),SOt=()=>"No default flavor",COt=()=>"不设默认配置",EOt=()=>"بدون پیکربندی پیش‌فرض",NOt=()=>"لا يوجد تكوين افتراضي للموارد",zOt=()=>"Sin opción predeterminada",jOt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",AOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?COt():t==="fa"?EOt():t==="ar"?NOt():t==="es"?zOt():t==="hi"?jOt():SOt()}),TOt=()=>"none",ROt=()=>"无",MOt=()=>"هیچ‌کدام",OOt=()=>"لا شيء",DOt=()=>"ninguno",LOt=()=>"कोई नहीं",GL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ROt():t==="fa"?MOt():t==="ar"?OOt():t==="es"?DOt():t==="hi"?LOt():TOt()}),IOt=()=>"Not connected",$Ot=()=>"未连接",BOt=()=>"متصل نیست",POt=()=>"غير متصل",FOt=()=>"No conectado",HOt=()=>"कनेक्टेड नहीं",VL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ot():t==="fa"?BOt():t==="ar"?POt():t==="es"?FOt():t==="hi"?HOt():IOt()}),qOt=()=>"not found on PATH",UOt=()=>"在 PATH 中未找到",GOt=()=>"در PATH پیدا نشد",VOt=()=>"غير موجود في PATH",KOt=()=>"no se encontró en el PATH",WOt=()=>"PATH पर नहीं मिला",QOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UOt():t==="fa"?GOt():t==="ar"?VOt():t==="es"?KOt():t==="hi"?WOt():qOt()}),XOt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,YOt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,ZOt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,JOt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,eDt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,tDt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,nDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YOt(e):t==="fa"?ZOt(e):t==="ar"?JOt(e):t==="es"?eDt(e):t==="hi"?tDt(e):XOt(e)}),rDt=()=>"not initialized",sDt=()=>"尚未初始化",iDt=()=>"راه‌اندازی نشده",aDt=()=>"غير مهيّأ",oDt=()=>"sin inicializar",cDt=()=>"शुरू नहीं किया गया",lDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sDt():t==="fa"?iDt():t==="ar"?aDt():t==="es"?oDt():t==="hi"?cDt():rDt()}),uDt=()=>"Not set",_Dt=()=>"未设置",fDt=()=>"تنظیم نشده",dDt=()=>"غير مضبوط",hDt=()=>"Sin definir",pDt=()=>"सेट नहीं",W3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Dt():t==="fa"?fDt():t==="ar"?dDt():t==="es"?hDt():t==="hi"?pDt():uDt()}),mDt=()=>"OAuth (subscription login)",gDt=()=>"OAuth(订阅登录)",vDt=()=>"OAuth (ورود با اشتراک)",bDt=()=>"OAuth (تسجيل دخول الاشتراك)",yDt=()=>"OAuth (inicio de sesión con suscripción)",xDt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",wDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gDt():t==="fa"?vDt():t==="ar"?bDt():t==="es"?yDt():t==="hi"?xDt():mDt()}),kDt=e=>`The old copy was left at ${e==null?void 0:e.path} on a different disk. You can delete it after confirming everything works.`,SDt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,CDt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,EDt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,NDt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,zDt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,jDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SDt(e):t==="fa"?CDt(e):t==="ar"?EDt(e):t==="es"?NDt(e):t==="hi"?zDt(e):kDt(e)}),ADt=()=>"Setting up…",TDt=()=>"正在设置…",RDt=()=>"در حال راه‌اندازی…",MDt=()=>"جارٍ الإعداد…",ODt=()=>"Configurando…",DDt=()=>"सेट अप हो रहा है…",LDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TDt():t==="fa"?RDt():t==="ar"?MDt():t==="es"?ODt():t==="hi"?DDt():ADt()}),IDt=()=>"Account",$Dt=()=>"账户",BDt=()=>"حساب",PDt=()=>"الحساب",FDt=()=>"Cuenta",HDt=()=>"खाता",LS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Dt():t==="fa"?BDt():t==="ar"?PDt():t==="es"?FDt():t==="hi"?HDt():IDt()}),qDt=()=>"Add one with",UDt=()=>"使用以下命令添加:",GDt=()=>"یکی با این فرمان اضافه کنید:",VDt=()=>"أضِف واحدًا عبر",KDt=()=>"Añade una con",WDt=()=>"इसके साथ एक जोड़ें",QDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UDt():t==="fa"?GDt():t==="ar"?VDt():t==="es"?KDt():t==="hi"?WDt():qDt()}),XDt=()=>"Add variable",YDt=()=>"添加变量",ZDt=()=>"افزودن متغیر",JDt=()=>"إضافة متغيّر",eLt=()=>"Añadir variable",tLt=()=>"वेरिएबल जोड़ें",nLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YDt():t==="fa"?ZDt():t==="ar"?JDt():t==="es"?eLt():t==="hi"?tLt():XDt()}),rLt=()=>"Agent models",sLt=()=>"智能体模型",iLt=()=>"مدل‌های عامل",aLt=()=>"نماذج الوكيل",oLt=()=>"Modelos de los agentes",cLt=()=>"एजेंट मॉडल",lLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sLt():t==="fa"?iLt():t==="ar"?aLt():t==="es"?oLt():t==="hi"?cLt():rLt()}),uLt=()=>"Anonymous usage analytics",_Lt=()=>"匿名使用情况分析",fLt=()=>"تحلیل ناشناس استفاده",dLt=()=>"تحليلات استخدام مجهولة الهوية",hLt=()=>"Estadísticas de uso anónimas",pLt=()=>"अनाम उपयोग एनालिटिक्स",Qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Lt():t==="fa"?fLt():t==="ar"?dLt():t==="es"?hLt():t==="hi"?pLt():uLt()}),mLt=()=>"Auth",gLt=()=>"身份验证",vLt=()=>"احراز هویت",bLt=()=>"المصادقة",yLt=()=>"Autenticación",xLt=()=>"ऑथ",wLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gLt():t==="fa"?vLt():t==="ar"?bLt():t==="es"?yLt():t==="hi"?xLt():mLt()}),kLt=()=>"Authentication",SLt=()=>"身份验证",CLt=()=>"احراز هویت",ELt=()=>"المصادقة",NLt=()=>"Autenticación",zLt=()=>"प्रमाणीकरण",KL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLt():t==="fa"?CLt():t==="ar"?ELt():t==="es"?NLt():t==="hi"?zLt():kLt()}),jLt=()=>"Back to Compute",ALt=()=>"返回算力设置",TLt=()=>"بازگشت به رایانش",RLt=()=>"العودة إلى الحوسبة",MLt=()=>"Volver a Cómputo",OLt=()=>"कंप्यूट पर वापस जाएं",WL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ALt():t==="fa"?TLt():t==="ar"?RLt():t==="es"?MLt():t==="hi"?OLt():jLt()}),DLt=()=>"Backend",LLt=()=>"后端",ILt=()=>"بک‌اند",$Lt=()=>"بيئة التنفيذ",BLt=()=>"Backend",PLt=()=>"बैकएंड",FLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LLt():t==="fa"?ILt():t==="ar"?$Lt():t==="es"?BLt():t==="hi"?PLt():DLt()}),HLt=()=>"Baseline",qLt=()=>"基线",ULt=()=>"خط مبنا",GLt=()=>"الأساس المرجعي",VLt=()=>"Rama base",KLt=()=>"बेसलाइन",WLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qLt():t==="fa"?ULt():t==="ar"?GLt():t==="es"?VLt():t==="hi"?KLt():HLt()}),QLt=()=>"Binary",XLt=()=>"可执行文件",YLt=()=>"فایل اجرایی",ZLt=()=>"الملف التنفيذي",JLt=()=>"Binario",eIt=()=>"बाइनरी",tIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XLt():t==="fa"?YLt():t==="ar"?ZLt():t==="es"?JLt():t==="hi"?eIt():QLt()}),nIt=()=>"Cancel",rIt=()=>"取消",sIt=()=>"لغو",iIt=()=>"إلغاء",aIt=()=>"Cancelar",oIt=()=>"रद्द करें",Nf=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rIt():t==="fa"?sIt():t==="ar"?iIt():t==="es"?aIt():t==="hi"?oIt():nIt()}),cIt=()=>"Cancel new variable",lIt=()=>"取消新变量",uIt=()=>"لغو متغیر جدید",_It=()=>"إلغاء المتغيّر الجديد",fIt=()=>"Cancelar nueva variable",dIt=()=>"नया वेरिएबल रद्द करें",hIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lIt():t==="fa"?uIt():t==="ar"?_It():t==="es"?fIt():t==="hi"?dIt():cIt()}),pIt=()=>"Checking compute targets…",mIt=()=>"正在检查算力目标…",gIt=()=>"در حال بررسی مقصدهای رایانشی…",vIt=()=>"جارٍ التحقق من أهداف الحوسبة…",bIt=()=>"Comprobando destinos de cómputo…",yIt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",xIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mIt():t==="fa"?gIt():t==="ar"?vIt():t==="es"?bIt():t==="hi"?yIt():pIt()}),wIt=()=>"Checking kubectl…",kIt=()=>"正在检查 kubectl…",SIt=()=>"در حال بررسی kubectl…",CIt=()=>"جارٍ التحقق من kubectl…",EIt=()=>"Comprobando kubectl…",NIt=()=>"kubectl जाँचा जा रहा है…",zIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kIt():t==="fa"?SIt():t==="ar"?CIt():t==="es"?EIt():t==="hi"?NIt():wIt()}),jIt=()=>"Checking Modal…",AIt=()=>"正在检查 Modal…",TIt=()=>"در حال بررسی Modal…",RIt=()=>"جارٍ التحقق من Modal…",MIt=()=>"Comprobando Modal…",OIt=()=>"Modal जाँचा जा रहा है…",DIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AIt():t==="fa"?TIt():t==="ar"?RIt():t==="es"?MIt():t==="hi"?OIt():jIt()}),LIt=()=>"Choose a preset flavor",IIt=()=>"选择预设规格",$It=()=>"یک پیکربندی آماده انتخاب کنید",BIt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",PIt=()=>"Elige una opción predefinida",FIt=()=>"एक प्रीसेट फ़्लेवर चुनें",Xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IIt():t==="fa"?$It():t==="ar"?BIt():t==="es"?PIt():t==="hi"?FIt():LIt()}),HIt=()=>"cluster default",qIt=()=>"集群默认值",UIt=()=>"پیش‌فرض خوشه",GIt=()=>"افتراضي العنقود",VIt=()=>"valor predeterminado del clúster",KIt=()=>"क्लस्टर डिफ़ॉल्ट",Yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qIt():t==="fa"?UIt():t==="ar"?GIt():t==="es"?VIt():t==="hi"?KIt():HIt()}),WIt=()=>"cluster default (e.g. 4h, 30m)",QIt=()=>"集群默认值(例如 4h、30m)",XIt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",YIt=()=>"افتراضي العنقود (مثل 4h أو 30m)",ZIt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",JIt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",e$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QIt():t==="fa"?XIt():t==="ar"?YIt():t==="es"?ZIt():t==="hi"?JIt():WIt()}),t$t=()=>"Cluster unreachable",n$t=()=>"无法连接集群",r$t=()=>"خوشه در دسترس نیست",s$t=()=>"تعذّر الوصول إلى العنقود",i$t=()=>"Clúster inaccesible",a$t=()=>"क्लस्टर तक नहीं पहुँचा जा सका",o$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n$t():t==="fa"?r$t():t==="ar"?s$t():t==="es"?i$t():t==="hi"?a$t():t$t()}),c$t=()=>"Compute",l$t=()=>"算力",u$t=()=>"رایانش",_$t=()=>"الحوسبة",f$t=()=>"Cómputo",d$t=()=>"कंप्यूट",QL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l$t():t==="fa"?u$t():t==="ar"?_$t():t==="es"?f$t():t==="hi"?d$t():c$t()}),h$t=()=>"Connect compute backends and choose where new runs execute.",p$t=()=>"连接算力后端,并选择新运行的执行位置。",m$t=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",g$t=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",v$t=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",b$t=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",y$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p$t():t==="fa"?m$t():t==="ar"?g$t():t==="es"?v$t():t==="hi"?b$t():h$t()}),x$t=()=>"Connected",w$t=()=>"已连接",k$t=()=>"متصل",S$t=()=>"متصل",C$t=()=>"Conectado",E$t=()=>"कनेक्टेड",N$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w$t():t==="fa"?k$t():t==="ar"?S$t():t==="es"?C$t():t==="hi"?E$t():x$t()}),z$t=()=>"Context",j$t=()=>"上下文",A$t=()=>"زمینه",T$t=()=>"السياق",R$t=()=>"Contexto",M$t=()=>"कॉन्टेक्स्ट",O$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j$t():t==="fa"?A$t():t==="ar"?T$t():t==="es"?R$t():t==="hi"?M$t():z$t()}),D$t=()=>"Current",L$t=()=>"当前",I$t=()=>"فعلی",$$t=()=>"الحالي",B$t=()=>"Actual",P$t=()=>"मौजूदा",F$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L$t():t==="fa"?I$t():t==="ar"?$$t():t==="es"?B$t():t==="hi"?P$t():D$t()}),H$t=()=>"Currently off:",q$t=()=>"当前已关闭:",U$t=()=>"اکنون خاموش است:",G$t=()=>"معطّل حاليًا:",V$t=()=>"Desactivado actualmente:",K$t=()=>"फ़िलहाल बंद:",W$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q$t():t==="fa"?U$t():t==="ar"?G$t():t==="es"?V$t():t==="hi"?K$t():H$t()}),Q$t=()=>"Custom flavor",X$t=()=>"自定义规格",Y$t=()=>"پیکربندی سفارشی",Z$t=()=>"تكوين موارد مخصّص",J$t=()=>"Opción personalizada",eBt=()=>"कस्टम फ़्लेवर",tBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X$t():t==="fa"?Y$t():t==="ar"?Z$t():t==="es"?J$t():t==="hi"?eBt():Q$t()}),nBt=()=>"Custom flavor…",rBt=()=>"自定义规格…",sBt=()=>"پیکربندی سفارشی…",iBt=()=>"تكوين موارد مخصّص…",aBt=()=>"Opción personalizada…",oBt=()=>"कस्टम फ़्लेवर…",cBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rBt():t==="fa"?sBt():t==="ar"?iBt():t==="es"?aBt():t==="hi"?oBt():nBt()}),lBt=()=>"Data directory",uBt=()=>"数据目录",_Bt=()=>"پوشهٔ داده",fBt=()=>"دليل البيانات",dBt=()=>"Directorio de datos",hBt=()=>"डेटा डायरेक्टरी",pBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uBt():t==="fa"?_Bt():t==="ar"?fBt():t==="es"?dBt():t==="hi"?hBt():lBt()}),mBt=()=>"default",gBt=()=>"默认",vBt=()=>"پیش‌فرض",bBt=()=>"افتراضي",yBt=()=>"predeterminado",xBt=()=>"डिफ़ॉल्ट",wBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gBt():t==="fa"?vBt():t==="ar"?bBt():t==="es"?yBt():t==="hi"?xBt():mBt()}),kBt=()=>"Default",SBt=()=>"默认",CBt=()=>"پیش‌فرض",EBt=()=>"الافتراضي",NBt=()=>"Predeterminado",zBt=()=>"डिफ़ॉल्ट",XL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SBt():t==="fa"?CBt():t==="ar"?EBt():t==="es"?NBt():t==="hi"?zBt():kBt()}),jBt=()=>"Default destination",ABt=()=>"默认目标",TBt=()=>"مقصد پیش‌فرض",RBt=()=>"الوجهة الافتراضية",MBt=()=>"Destino predeterminado",OBt=()=>"डिफ़ॉल्ट गंतव्य",DBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ABt():t==="fa"?TBt():t==="ar"?RBt():t==="es"?MBt():t==="hi"?OBt():jBt()}),LBt=()=>"Detecting hardware…",IBt=()=>"正在检测硬件…",$Bt=()=>"در حال شناسایی سخت‌افزار…",BBt=()=>"جارٍ اكتشاف العتاد…",PBt=()=>"Detectando hardware…",FBt=()=>"हार्डवेयर पहचाना जा रहा है…",HBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IBt():t==="fa"?$Bt():t==="ar"?BBt():t==="es"?PBt():t==="hi"?FBt():LBt()}),qBt=()=>"Detecting harnesses…",UBt=()=>"正在检测智能体工具…",GBt=()=>"در حال شناسایی ابزارهای عامل…",VBt=()=>"جارٍ اكتشاف أدوات البرمجة…",KBt=()=>"Detectando agentes…",WBt=()=>"हार्नेस पहचाने जा रहे हैं…",QBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBt():t==="fa"?GBt():t==="ar"?VBt():t==="es"?KBt():t==="hi"?WBt():qBt()}),XBt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",YBt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",ZBt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",JBt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",ePt=()=>"Desactivar la sincronización detiene los push automáticos. El cómputo sigue usando snapshots directos del código fuente. No se elimina el repositorio de GitHub ni el código que ya se subió.",tPt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",nPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YBt():t==="fa"?ZBt():t==="ar"?JBt():t==="es"?ePt():t==="hi"?tPt():XBt()}),rPt=()=>"Effective URL",sPt=()=>"实际使用的网址",iPt=()=>"نشانی مؤثر",aPt=()=>"الرابط الفعّال",oPt=()=>"URL efectiva",cPt=()=>"प्रभावी URL",lPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sPt():t==="fa"?iPt():t==="ar"?aPt():t==="es"?oPt():t==="hi"?cPt():rPt()}),uPt=()=>"Enable GitHub syncing for new projects",_Pt=()=>"为新项目启用 GitHub 同步",fPt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",dPt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",hPt=()=>"Activar la sincronización con GitHub en proyectos nuevos",pPt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",Zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Pt():t==="fa"?fPt():t==="ar"?dPt():t==="es"?hPt():t==="hi"?pPt():uPt()}),mPt=()=>"Environment",gPt=()=>"环境",vPt=()=>"محیط",bPt=()=>"البيئة",yPt=()=>"Entorno",xPt=()=>"एनवायरनमेंट",YL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gPt():t==="fa"?vPt():t==="ar"?bPt():t==="es"?yPt():t==="hi"?xPt():mPt()}),wPt=()=>"Failed",kPt=()=>"失败",SPt=()=>"ناموفق",CPt=()=>"فشل",EPt=()=>"Error",NPt=()=>"विफल",IS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kPt():t==="fa"?SPt():t==="ar"?CPt():t==="es"?EPt():t==="hi"?NPt():wPt()}),zPt=()=>"General",jPt=()=>"常规",APt=()=>"عمومی",TPt=()=>"عام",RPt=()=>"General",MPt=()=>"सामान्य",OPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jPt():t==="fa"?APt():t==="ar"?TPt():t==="es"?RPt():t==="hi"?MPt():zPt()}),DPt=()=>"GitHub publishing",LPt=()=>"GitHub 发布",IPt=()=>"انتشار در GitHub",$Pt=()=>"النشر على GitHub",BPt=()=>"Publicación en GitHub",PPt=()=>"GitHub प्रकाशन",FPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LPt():t==="fa"?IPt():t==="ar"?$Pt():t==="es"?BPt():t==="hi"?PPt():DPt()}),HPt=()=>"Git token",qPt=()=>"Git 令牌",UPt=()=>"توکن Git",GPt=()=>"رمز Git",VPt=()=>"Token de Git",KPt=()=>"Git टोकन",WPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qPt():t==="fa"?UPt():t==="ar"?GPt():t==="es"?VPt():t==="hi"?KPt():HPt()}),QPt=()=>"Harnesses",XPt=()=>"智能体工具",YPt=()=>"ابزارهای عامل",ZPt=()=>"أدوات البرمجة",JPt=()=>"Agentes",eFt=()=>"हार्नेस",Q3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XPt():t==="fa"?YPt():t==="ar"?ZPt():t==="es"?JPt():t==="hi"?eFt():QPt()}),tFt=()=>"hf_…",nFt=()=>"hf_…",rFt=()=>"hf_…",sFt=()=>"hf_…",iFt=()=>"hf_…",aFt=()=>"hf_…",oFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nFt():t==="fa"?rFt():t==="ar"?sFt():t==="es"?iFt():t==="hi"?aFt():tFt()}),cFt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",lFt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",uFt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",_Ft=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",fFt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",dFt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",hFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lFt():t==="fa"?uFt():t==="ar"?_Ft():t==="es"?fFt():t==="hi"?dFt():cFt()}),pFt=()=>"Initialize Git",mFt=()=>"初始化 Git",gFt=()=>"راه‌اندازی Git",vFt=()=>"تهيئة Git",bFt=()=>"Inicializar Git",yFt=()=>"Git शुरू करें",xFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mFt():t==="fa"?gFt():t==="ar"?vFt():t==="es"?bFt():t==="hi"?yFt():pFt()}),wFt=()=>"Install",kFt=()=>"安装",SFt=()=>"نصب",CFt=()=>"تثبيت",EFt=()=>"Instalar",NFt=()=>"इंस्टॉल करें",ZL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kFt():t==="fa"?SFt():t==="ar"?CFt():t==="es"?EFt():t==="hi"?NFt():wFt()}),zFt=()=>"Install broken",jFt=()=>"安装损坏",AFt=()=>"نصب خراب است",TFt=()=>"التثبيت معطوب",RFt=()=>"Instalación dañada",MFt=()=>"इंस्टॉल खराब है",OFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jFt():t==="fa"?AFt():t==="ar"?TFt():t==="es"?RFt():t==="hi"?MFt():zFt()}),DFt=()=>"Install GitHub CLI",LFt=()=>"安装 GitHub CLI",IFt=()=>"نصب GitHub CLI",$Ft=()=>"تثبيت واجهة GitHub لسطر الأوامر",BFt=()=>"Instalar GitHub CLI",PFt=()=>"GitHub CLI इंस्टॉल करें",FFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LFt():t==="fa"?IFt():t==="ar"?$Ft():t==="es"?BFt():t==="hi"?PFt():DFt()}),HFt=()=>"Install updates automatically",qFt=()=>"自动安装更新",UFt=()=>"نصب خودکار به‌روزرسانی‌ها",GFt=()=>"تثبيت التحديثات تلقائيًا",VFt=()=>"Instalar actualizaciones automáticamente",KFt=()=>"अपडेट अपने आप इंस्टॉल करें",Jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qFt():t==="fa"?UFt():t==="ar"?GFt():t==="es"?VFt():t==="hi"?KFt():HFt()}),WFt=()=>"Instance history",QFt=()=>"实例历史",XFt=()=>"تاریخچهٔ نمونه‌ها",YFt=()=>"سجل المثيلات",ZFt=()=>"Historial de instancias",JFt=()=>"इंस्टेंस इतिहास",eHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QFt():t==="fa"?XFt():t==="ar"?YFt():t==="es"?ZFt():t==="hi"?JFt():WFt()}),tHt=()=>"Invalid Token",nHt=()=>"令牌无效",rHt=()=>"توکن نامعتبر",sHt=()=>"رمز غير صالح",iHt=()=>"Token no válido",aHt=()=>"अमान्य टोकन",oHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nHt():t==="fa"?rHt():t==="ar"?sHt():t==="es"?iHt():t==="hi"?aHt():tHt()}),cHt=()=>"Jobs / Dashboard URL",lHt=()=>"Jobs / 控制台网址",uHt=()=>"نشانی Jobs / داشبورد",_Ht=()=>"رابط المهام / لوحة التحكم",fHt=()=>"URL de jobs / dashboard",dHt=()=>"Jobs / डैशबोर्ड URL",hHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lHt():t==="fa"?uHt():t==="ar"?_Ht():t==="es"?fHt():t==="hi"?dHt():cHt()}),pHt=()=>"kubectl not found",mHt=()=>"未找到 kubectl",gHt=()=>"kubectl پیدا نشد",vHt=()=>"لم يُعثر على kubectl",bHt=()=>"No se encontró kubectl",yHt=()=>"kubectl नहीं मिला",xHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mHt():t==="fa"?gHt():t==="ar"?vHt():t==="es"?bHt():t==="hi"?yHt():pHt()}),wHt=()=>"Latest",kHt=()=>"最新版本",SHt=()=>"جدیدترین",CHt=()=>"الأحدث",EHt=()=>"Última",NHt=()=>"नवीनतम",zHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kHt():t==="fa"?SHt():t==="ar"?CHt():t==="es"?EHt():t==="hi"?NHt():wHt()}),jHt=()=>"Loading…",AHt=()=>"正在加载…",THt=()=>"در حال بارگیری…",RHt=()=>"جارٍ التحميل…",MHt=()=>"Cargando…",OHt=()=>"लोड हो रहा है…",__=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AHt():t==="fa"?THt():t==="ar"?RHt():t==="es"?MHt():t==="hi"?OHt():jHt()}),DHt=()=>"Loading Ray settings…",LHt=()=>"正在加载 Ray 设置…",IHt=()=>"در حال بارگیری تنظیمات Ray…",$Ht=()=>"جارٍ تحميل إعدادات Ray…",BHt=()=>"Cargando configuración de Ray…",PHt=()=>"Ray सेटिंग्स लोड हो रही हैं…",FHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LHt():t==="fa"?IHt():t==="ar"?$Ht():t==="es"?BHt():t==="hi"?PHt():DHt()}),HHt=()=>"Loading slurm settings…",qHt=()=>"正在加载 Slurm 设置…",UHt=()=>"در حال بارگیری تنظیمات Slurm…",GHt=()=>"جارٍ تحميل إعدادات slurm…",VHt=()=>"Cargando configuración de Slurm…",KHt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",WHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qHt():t==="fa"?UHt():t==="ar"?GHt():t==="es"?VHt():t==="hi"?KHt():HHt()}),QHt=()=>"Loading status…",XHt=()=>"正在加载状态…",YHt=()=>"در حال بارگیری وضعیت…",ZHt=()=>"جارٍ تحميل الحالة…",JHt=()=>"Cargando estado…",eqt=()=>"स्थिति लोड हो रही है…",tqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XHt():t==="fa"?YHt():t==="ar"?ZHt():t==="es"?JHt():t==="hi"?eqt():QHt()}),nqt=()=>"Local only",rqt=()=>"仅本地",sqt=()=>"فقط محلی",iqt=()=>"محلي فقط",aqt=()=>"Solo local",oqt=()=>"केवल लोकल",cqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rqt():t==="fa"?sqt():t==="ar"?iqt():t==="es"?aqt():t==="hi"?oqt():nqt()}),lqt=()=>"Local repository",uqt=()=>"本地仓库",_qt=()=>"مخزن محلی",fqt=()=>"مستودع محلي",dqt=()=>"Repositorio local",hqt=()=>"लोकल रिपॉज़िटरी",pqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uqt():t==="fa"?_qt():t==="ar"?fqt():t==="es"?dqt():t==="hi"?hqt():lqt()}),mqt=()=>"Login node",gqt=()=>"登录节点",vqt=()=>"گرهٔ ورود",bqt=()=>"عقدة الدخول",yqt=()=>"Nodo de acceso",xqt=()=>"लॉगिन नोड",wqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gqt():t==="fa"?vqt():t==="ar"?bqt():t==="es"?yqt():t==="hi"?xqt():mqt()}),kqt=()=>"Make GitHub syncing the default?",Sqt=()=>"将 GitHub 同步设为默认值?",Cqt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",Eqt=()=>"جعل مزامنة GitHub افتراضية؟",Nqt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",zqt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",jqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sqt():t==="fa"?Cqt():t==="ar"?Eqt():t==="es"?Nqt():t==="hi"?zqt():kqt()}),Aqt=()=>"Missing bash/tar",Tqt=()=>"缺少 bash/tar",Rqt=()=>"bash/tar موجود نیست",Mqt=()=>"‏bash/tar مفقودان",Oqt=()=>"Falta bash/tar",Dqt=()=>"bash/tar गुम है",Lqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tqt():t==="fa"?Rqt():t==="ar"?Mqt():t==="es"?Oqt():t==="hi"?Dqt():Aqt()}),Iqt=()=>"More compute options",$qt=()=>"更多算力选项",Bqt=()=>"گزینه‌های رایانشی بیشتر",Pqt=()=>"خيارات حوسبة إضافية",Fqt=()=>"Más opciones de cómputo",Hqt=()=>"और कंप्यूट विकल्प",qqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$qt():t==="fa"?Bqt():t==="ar"?Pqt():t==="es"?Fqt():t==="hi"?Hqt():Iqt()}),Uqt=()=>"Move failed:",Gqt=()=>"移动失败:",Vqt=()=>"انتقال ناموفق بود:",Kqt=()=>"فشل النقل:",Wqt=()=>"Error al mover:",Qqt=()=>"स्थानांतरण विफल:",Xqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gqt():t==="fa"?Vqt():t==="ar"?Kqt():t==="es"?Wqt():t==="hi"?Qqt():Uqt()}),Yqt=()=>"Moved. orx is now using the new location.",Zqt=()=>"已移动。orx 现在使用新位置。",Jqt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",eUt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",tUt=()=>"Movido. orx ya usa la nueva ubicación.",nUt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",rUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zqt():t==="fa"?Jqt():t==="ar"?eUt():t==="es"?tUt():t==="hi"?nUt():Yqt()}),sUt=()=>"Namespace",iUt=()=>"命名空间",aUt=()=>"فضای نام",oUt=()=>"مساحة الأسماء",cUt=()=>"Namespace",lUt=()=>"नेमस्पेस",uUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iUt():t==="fa"?aUt():t==="ar"?oUt():t==="es"?cUt():t==="hi"?lUt():sUt()}),_Ut=()=>"New location",fUt=()=>"新位置",dUt=()=>"محل جدید",hUt=()=>"الموقع الجديد",pUt=()=>"Nueva ubicación",mUt=()=>"नया स्थान",gUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fUt():t==="fa"?dUt():t==="ar"?hUt():t==="es"?pUt():t==="hi"?mUt():_Ut()}),vUt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",bUt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",yUt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",xUt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",wUt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",kUt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",SUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bUt():t==="fa"?yUt():t==="ar"?xUt():t==="es"?wUt():t==="hi"?kUt():vUt()}),CUt=()=>"New variable key",EUt=()=>"新变量键名",NUt=()=>"کلید متغیر جدید",zUt=()=>"مفتاح المتغيّر الجديد",jUt=()=>"Nombre de la nueva variable",AUt=()=>"नई वेरिएबल की",TUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EUt():t==="fa"?NUt():t==="ar"?zUt():t==="es"?jUt():t==="hi"?AUt():CUt()}),RUt=()=>"New variable value",MUt=()=>"新变量值",OUt=()=>"مقدار متغیر جدید",DUt=()=>"قيمة المتغيّر الجديد",LUt=()=>"Valor de la nueva variable",IUt=()=>"नई वेरिएबल वैल्यू",$Ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUt():t==="fa"?OUt():t==="ar"?DUt():t==="es"?LUt():t==="hi"?IUt():RUt()}),BUt=()=>"No code, prompts, file contents, or account identifiers are sent.",PUt=()=>"不会发送代码、提示词、文件内容或账户标识符。",FUt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",HUt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",qUt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",UUt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",GUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PUt():t==="fa"?FUt():t==="ar"?HUt():t==="es"?qUt():t==="hi"?UUt():BUt()}),VUt=()=>"No hosts found in ~/.ssh/config.",KUt=()=>"在 ~/.ssh/config 中未找到主机。",WUt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",QUt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",XUt=()=>"No se encontraron hosts en ~/.ssh/config.",YUt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",ZUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KUt():t==="fa"?WUt():t==="ar"?QUt():t==="es"?XUt():t==="hi"?YUt():VUt()}),JUt=()=>"No job-create permission",eGt=()=>"没有创建 Job 的权限",tGt=()=>"مجوز ساخت Job وجود ندارد",nGt=()=>"لا صلاحية لإنشاء المهام",rGt=()=>"Sin permiso para crear jobs",sGt=()=>"जॉब बनाने की अनुमति नहीं",iGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eGt():t==="fa"?tGt():t==="ar"?nGt():t==="es"?rGt():t==="hi"?sGt():JUt()}),aGt=()=>"No Write Permissions",oGt=()=>"无写入权限",cGt=()=>"بدون مجوز نوشتن",lGt=()=>"لا صلاحيات كتابة",uGt=()=>"Sin permisos de escritura",_Gt=()=>"लिखने की अनुमति नहीं",fGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oGt():t==="fa"?cGt():t==="ar"?lGt():t==="es"?uGt():t==="hi"?_Gt():aGt()}),dGt=()=>"No key on this computer to register — load a registered key with",hGt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",pGt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",mGt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",gGt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",vGt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",bGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hGt():t==="fa"?pGt():t==="ar"?mGt():t==="es"?gGt():t==="hi"?vGt():dGt()}),yGt=()=>"No key on this computer yet — create one with",xGt=()=>"此计算机上还没有密钥——使用以下命令创建:",wGt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",kGt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",SGt=()=>"Aún no hay ninguna clave en este equipo — crea una con",CGt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",EGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xGt():t==="fa"?wGt():t==="ar"?kGt():t==="es"?SGt():t==="hi"?CGt():yGt()}),NGt=()=>"No Slurm CLI",zGt=()=>"无 Slurm CLI",jGt=()=>"بدون CLI اسلورم",AGt=()=>"لا توجد واجهة Slurm لسطر الأوامر",TGt=()=>"Sin CLI de Slurm",RGt=()=>"कोई Slurm CLI नहीं",MGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zGt():t==="fa"?jGt():t==="ar"?AGt():t==="es"?TGt():t==="hi"?RGt():NGt()}),OGt=()=>"None registered",DGt=()=>"未注册任何密钥",LGt=()=>"هیچ‌کدام ثبت نشده",IGt=()=>"لا شيء مسجّل",$Gt=()=>"Ninguna registrada",BGt=()=>"कोई रजिस्टर्ड नहीं",PGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DGt():t==="fa"?LGt():t==="ar"?IGt():t==="es"?$Gt():t==="hi"?BGt():OGt()}),FGt=()=>"Not checked",HGt=()=>"未检查",qGt=()=>"بررسی نشده",UGt=()=>"لم يُفحص",GGt=()=>"Sin comprobar",VGt=()=>"जाँचा नहीं गया",JL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HGt():t==="fa"?qGt():t==="ar"?UGt():t==="es"?GGt():t==="hi"?VGt():FGt()}),KGt=()=>"Not configured",WGt=()=>"未配置",QGt=()=>"پیکربندی نشده",XGt=()=>"غير مُعَد",YGt=()=>"Sin configurar",ZGt=()=>"कॉन्फ़िगर नहीं किया गया",ay=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WGt():t==="fa"?QGt():t==="ar"?XGt():t==="es"?YGt():t==="hi"?ZGt():KGt()}),JGt=()=>"Not installed",eVt=()=>"未安装",tVt=()=>"نصب نیست",nVt=()=>"غير مثبّت",rVt=()=>"No instalado",sVt=()=>"इंस्टॉल नहीं है",iVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eVt():t==="fa"?tVt():t==="ar"?nVt():t==="es"?rVt():t==="hi"?sVt():JGt()}),aVt=()=>"Not now",oVt=()=>"暂不",cVt=()=>"اکنون نه",lVt=()=>"ليس الآن",uVt=()=>"Ahora no",_Vt=()=>"अभी नहीं",fVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oVt():t==="fa"?cVt():t==="ar"?lVt():t==="es"?uVt():t==="hi"?_Vt():aVt()}),dVt=()=>"Not on this computer",hVt=()=>"不在此计算机上",pVt=()=>"روی این رایانه نیست",mVt=()=>"ليس على هذا الحاسوب",gVt=()=>"No en este equipo",vVt=()=>"इस कंप्यूटर पर नहीं",bVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hVt():t==="fa"?pVt():t==="ar"?mVt():t==="es"?gVt():t==="hi"?vVt():dVt()}),yVt=()=>"Not set (pass --host per launch)",xVt=()=>"未设置(每次启动时传入 --host)",wVt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",kVt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",SVt=()=>"Sin definir (pasa --host en cada lanzamiento)",CVt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",eI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xVt():t==="fa"?wVt():t==="ar"?kVt():t==="es"?SVt():t==="hi"?CVt():yVt()}),EVt=()=>"Not signed in",NVt=()=>"未登录",zVt=()=>"وارد نشده",jVt=()=>"لم يتم تسجيل الدخول",AVt=()=>"Sin iniciar sesión",TVt=()=>"साइन इन नहीं है",tI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NVt():t==="fa"?zVt():t==="ar"?jVt():t==="es"?AVt():t==="hi"?TVt():EVt()}),RVt=()=>"On this computer",MVt=()=>"在此计算机上",OVt=()=>"روی این رایانه",DVt=()=>"على هذا الحاسوب",LVt=()=>"En este equipo",IVt=()=>"इस कंप्यूटर पर",$Vt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MVt():t==="fa"?OVt():t==="ar"?DVt():t==="es"?LVt():t==="hi"?IVt():RVt()}),BVt=()=>"Open a project to inspect its repository and GitHub publication state.",PVt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",FVt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",HVt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",qVt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",UVt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",GVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PVt():t==="fa"?FVt():t==="ar"?HVt():t==="es"?qVt():t==="hi"?UVt():BVt()}),VVt=()=>"Open job page",KVt=()=>"打开作业页面",WVt=()=>"باز کردن صفحهٔ کار",QVt=()=>"فتح صفحة المهمة",XVt=()=>"Abrir página del job",YVt=()=>"जॉब पेज खोलें",ej=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KVt():t==="fa"?WVt():t==="ar"?QVt():t==="es"?XVt():t==="hi"?YVt():VVt()}),ZVt=()=>"Open on GitHub",JVt=()=>"在 GitHub 上打开",eKt=()=>"باز کردن در GitHub",tKt=()=>"فتح على GitHub",nKt=()=>"Abrir en GitHub",rKt=()=>"GitHub पर खोलें",tj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JVt():t==="fa"?eKt():t==="ar"?tKt():t==="es"?nKt():t==="hi"?rKt():ZVt()}),sKt=()=>", or create one with",iKt=()=>",或使用以下命令创建:",aKt=()=>"، یا با این فرمان یکی بسازید:",oKt=()=>"، أو أنشئ واحدًا عبر",cKt=()=>", o crea una con",lKt=()=>", या इसके साथ एक बनाएं",uKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iKt():t==="fa"?aKt():t==="ar"?oKt():t==="es"?cKt():t==="hi"?lKt():sKt()}),_Kt=()=>"Org",fKt=()=>"组织",dKt=()=>"سازمان",hKt=()=>"المؤسسة",pKt=()=>"Org.",mKt=()=>"संगठन",gKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fKt():t==="fa"?dKt():t==="ar"?hKt():t==="es"?pKt():t==="hi"?mKt():_Kt()}),vKt=()=>"Orgs",bKt=()=>"组织",yKt=()=>"سازمان‌ها",xKt=()=>"المؤسسات",wKt=()=>"Orgs.",kKt=()=>"संगठन",SKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bKt():t==="fa"?yKt():t==="ar"?xKt():t==="es"?wKt():t==="hi"?kKt():vKt()}),CKt=()=>"orx can't update this install",EKt=()=>"orx 无法更新此安装",NKt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",zKt=()=>"لا يستطيع orx تحديث هذا التثبيت",jKt=()=>"orx no puede actualizar esta instalación",AKt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",TKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EKt():t==="fa"?NKt():t==="ar"?zKt():t==="es"?jKt():t==="hi"?AKt():CKt()}),RKt=()=>"Overleaf",MKt=()=>"Overleaf",OKt=()=>"Overleaf",DKt=()=>"Overleaf",LKt=()=>"Overleaf",IKt=()=>"Overleaf",nI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MKt():t==="fa"?OKt():t==="ar"?DKt():t==="es"?LKt():t==="hi"?IKt():RKt()}),$Kt=()=>"Overleaf Git authentication token",BKt=()=>"Overleaf Git 身份验证令牌",PKt=()=>"توکن احراز هویت Git در Overleaf",FKt=()=>"رمز مصادقة Git لـ Overleaf",HKt=()=>"Token de autenticación de Git de Overleaf",qKt=()=>"Overleaf Git प्रमाणीकरण टोकन",UKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BKt():t==="fa"?PKt():t==="ar"?FKt():t==="es"?HKt():t==="hi"?qKt():$Kt()}),GKt=()=>"Overridden by env",VKt=()=>"已被环境变量覆盖",KKt=()=>"بازنویسی‌شده توسط محیط",WKt=()=>"متجاوَز عبر متغيّر البيئة",QKt=()=>"Sobrescrito por el entorno",XKt=()=>"env द्वारा ओवरराइड किया गया",YKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VKt():t==="fa"?KKt():t==="ar"?WKt():t==="es"?QKt():t==="hi"?XKt():GKt()}),ZKt=()=>"Partition",JKt=()=>"分区",eWt=()=>"پارتیشن",tWt=()=>"القسم",nWt=()=>"Partición",rWt=()=>"पार्टीशन",sWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JKt():t==="fa"?eWt():t==="ar"?tWt():t==="es"?nWt():t==="hi"?rWt():ZKt()}),iWt=()=>"Path",aWt=()=>"路径",oWt=()=>"مسیر",cWt=()=>"المسار",lWt=()=>"Ruta",uWt=()=>"पथ",_Wt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aWt():t==="fa"?oWt():t==="ar"?cWt():t==="es"?lWt():t==="hi"?uWt():iWt()}),fWt=()=>"Plan",dWt=()=>"方案",hWt=()=>"سطح اشتراک",pWt=()=>"الخطة",mWt=()=>"Plan",gWt=()=>"प्लान",vWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dWt():t==="fa"?hWt():t==="ar"?pWt():t==="es"?mWt():t==="hi"?gWt():fWt()}),bWt=()=>"Project",yWt=()=>"项目",xWt=()=>"پروژه",wWt=()=>"المشروع",kWt=()=>"Proyecto",SWt=()=>"प्रोजेक्ट",CWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yWt():t==="fa"?xWt():t==="ar"?wWt():t==="es"?kWt():t==="hi"?SWt():bWt()}),EWt=()=>"Ray version",NWt=()=>"Ray 版本",zWt=()=>"نسخهٔ Ray",jWt=()=>"إصدار Ray",AWt=()=>"Versión de Ray",TWt=()=>"Ray वर्शन",RWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NWt():t==="fa"?zWt():t==="ar"?jWt():t==="es"?AWt():t==="hi"?TWt():EWt()}),MWt=()=>"Reachable",OWt=()=>"可访问",DWt=()=>"در دسترس",LWt=()=>"يمكن الوصول إليه",IWt=()=>"Accesible",$Wt=()=>"पहुँच योग्य",BWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OWt():t==="fa"?DWt():t==="ar"?LWt():t==="es"?IWt():t==="hi"?$Wt():MWt()}),PWt=()=>"Reading ~/.ssh/config…",FWt=()=>"正在读取 ~/.ssh/config…",HWt=()=>"در حال خواندن ‎~/.ssh/config…",qWt=()=>"جارٍ قراءة ‎~/.ssh/config…",UWt=()=>"Leyendo ~/.ssh/config…",GWt=()=>"~/.ssh/config पढ़ा जा रहा है…",rI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FWt():t==="fa"?HWt():t==="ar"?qWt():t==="es"?UWt():t==="hi"?GWt():PWt()}),VWt=()=>"Ready",KWt=()=>"就绪",WWt=()=>"آماده",QWt=()=>"جاهز",XWt=()=>"Listo",YWt=()=>"तैयार",Xm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWt():t==="fa"?WWt():t==="ar"?QWt():t==="es"?XWt():t==="hi"?YWt():VWt()}),ZWt=()=>"Ready to move",JWt=()=>"可以移动",eQt=()=>"آمادهٔ انتقال",tQt=()=>"جاهز للنقل",nQt=()=>"Listo para mover",rQt=()=>"स्थानांतरण के लिए तैयार",sQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JWt():t==="fa"?eQt():t==="ar"?tQt():t==="es"?nQt():t==="hi"?rQt():ZWt()}),iQt=()=>"Configured",aQt=()=>"已配置",oQt=()=>"پیکربندی‌شده",cQt=()=>"مُعَد",lQt=()=>"Configurado",uQt=()=>"कॉन्फ़िगर किया गया",Ym=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aQt():t==="fa"?oQt():t==="ar"?cQt():t==="es"?lQt():t==="hi"?uQt():iQt()}),_Qt=()=>"Refresh",fQt=()=>"刷新",dQt=()=>"تازه‌سازی",hQt=()=>"تحديث",pQt=()=>"Actualizar",mQt=()=>"रीफ़्रेश करें",Zm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fQt():t==="fa"?dQt():t==="ar"?hQt():t==="es"?pQt():t==="hi"?mQt():_Qt()}),gQt=()=>"Remotes",vQt=()=>"远程仓库",bQt=()=>"مخزن‌های دوردست",yQt=()=>"المستودعات البعيدة",xQt=()=>"Remotos",wQt=()=>"रिमोट",kQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vQt():t==="fa"?bQt():t==="ar"?yQt():t==="es"?xQt():t==="hi"?wQt():gQt()}),SQt=()=>"Repository",CQt=()=>"仓库",EQt=()=>"مخزن",NQt=()=>"المستودع",zQt=()=>"Repositorio",jQt=()=>"रिपॉज़िटरी",AQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CQt():t==="fa"?EQt():t==="ar"?NQt():t==="es"?zQt():t==="hi"?jQt():SQt()}),TQt=()=>"Restart to finish updating",RQt=()=>"重新启动以完成更新",MQt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",OQt=()=>"أعد التشغيل لإكمال التحديث",DQt=()=>"Reinicia para terminar la actualización",LQt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",IQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RQt():t==="fa"?MQt():t==="ar"?OQt():t==="es"?DQt():t==="hi"?LQt():TQt()}),$Qt=()=>"Running instances",BQt=()=>"正在运行的实例",PQt=()=>"نمونه‌های در حال اجرا",FQt=()=>"المثيلات قيد التشغيل",HQt=()=>"Instancias en ejecución",qQt=()=>"चल रहे इंस्टेंस",UQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BQt():t==="fa"?PQt():t==="ar"?FQt():t==="es"?HQt():t==="hi"?qQt():$Qt()}),GQt=()=>"Runtime",VQt=()=>"运行时间",KQt=()=>"زمان اجرا",WQt=()=>"مدة التشغيل",QQt=()=>"Runtime",XQt=()=>"रनटाइम",YQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VQt():t==="fa"?KQt():t==="ar"?WQt():t==="es"?QQt():t==="hi"?XQt():GQt()}),ZQt=()=>". Save it under that key if it's meant for HF Jobs.",JQt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",eXt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",tXt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",nXt=()=>". Guárdalo con ese nombre si es para HF Jobs.",rXt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",sXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JQt():t==="fa"?eXt():t==="ar"?tXt():t==="es"?nXt():t==="hi"?rXt():ZQt()}),iXt=()=>"Session cookie",aXt=()=>"会话 cookie",oXt=()=>"کوکی نشست",cXt=()=>"ملف تعريف ارتباط الجلسة",lXt=()=>"Cookie de sesión",uXt=()=>"सेशन कुकी",_Xt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aXt():t==="fa"?oXt():t==="ar"?cXt():t==="es"?lXt():t==="hi"?uXt():iXt()}),fXt=()=>"With a session cookie saved, a linked paper follows Overleaf as people type and sends saves straight back. Figures still move on the slower Git sync. Copy the overleaf_session2 cookie from a browser signed in to Overleaf; it stops working when that sign-in does.",dXt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",hXt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",pXt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",mXt=()=>"Con una cookie de sesión guardada, un paper vinculado sigue los cambios de Overleaf mientras se escribe y envía los guardados directamente. Las figuras siguen usando la sincronización por Git, más lenta. Copia la cookie overleaf_session2 de un navegador con la sesión de Overleaf iniciada; deja de funcionar cuando esa sesión termine.",gXt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",vXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dXt():t==="fa"?hXt():t==="ar"?pXt():t==="es"?mXt():t==="hi"?gXt():fXt()}),bXt=()=>"Settings",yXt=()=>"设置",xXt=()=>"تنظیمات",wXt=()=>"الإعدادات",kXt=()=>"Configuración",SXt=()=>"सेटिंग्स",$S=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yXt():t==="fa"?xXt():t==="ar"?wXt():t==="es"?kXt():t==="hi"?SXt():bXt()}),CXt=()=>"Signed in",EXt=()=>"已登录",NXt=()=>"وارد شده",zXt=()=>"تم تسجيل الدخول",jXt=()=>"Sesión iniciada",AXt=()=>"साइन इन है",TXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EXt():t==="fa"?NXt():t==="ar"?zXt():t==="es"?jXt():t==="hi"?AXt():CXt()}),RXt=()=>"Source",MXt=()=>"来源",OXt=()=>"منبع",DXt=()=>"المصدر",LXt=()=>"Origen",IXt=()=>"स्रोत",sI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MXt():t==="fa"?OXt():t==="ar"?DXt():t==="es"?LXt():t==="hi"?IXt():RXt()}),$Xt=()=>"SSH Key",BXt=()=>"SSH 密钥",PXt=()=>"کلید SSH",FXt=()=>"مفتاح SSH",HXt=()=>"Clave SSH",qXt=()=>"SSH की",UXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BXt():t==="fa"?PXt():t==="ar"?FXt():t==="es"?HXt():t==="hi"?qXt():$Xt()}),GXt=()=>"Started",VXt=()=>"开始时间",KXt=()=>"آغاز",WXt=()=>"بدأ",QXt=()=>"Inicio",XXt=()=>"शुरू हुआ",YXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VXt():t==="fa"?KXt():t==="ar"?WXt():t==="es"?QXt():t==="hi"?XXt():GXt()}),ZXt=()=>"State",JXt=()=>"状态",eYt=()=>"وضعیت",tYt=()=>"الحالة",nYt=()=>"Estado",rYt=()=>"स्थिति",sYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JXt():t==="fa"?eYt():t==="ar"?tYt():t==="es"?nYt():t==="hi"?rYt():ZXt()}),iYt=()=>"Status",aYt=()=>"状态",oYt=()=>"وضعیت",cYt=()=>"الحالة",lYt=()=>"Estado",uYt=()=>"स्थिति",np=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aYt():t==="fa"?oYt():t==="ar"?cYt():t==="es"?lYt():t==="hi"?uYt():iYt()}),_Yt=()=>"Storage",fYt=()=>"存储",dYt=()=>"ذخیره‌سازی",hYt=()=>"التخزين",pYt=()=>"Almacenamiento",mYt=()=>"स्टोरेज",gYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fYt():t==="fa"?dYt():t==="ar"?hYt():t==="es"?pYt():t==="hi"?mYt():_Yt()}),vYt=()=>"Sync",bYt=()=>"同步",yYt=()=>"همگام‌سازی",xYt=()=>"مزامنة",wYt=()=>"Sincronización",kYt=()=>"सिंक",SYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bYt():t==="fa"?yYt():t==="ar"?xYt():t==="es"?wYt():t==="hi"?kYt():vYt()}),CYt=()=>"Syncing off",EYt=()=>"同步已关闭",NYt=()=>"همگام‌سازی خاموش",zYt=()=>"المزامنة معطّلة",jYt=()=>"Sincronización desactivada",AYt=()=>"सिंकिंग बंद है",TYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EYt():t==="fa"?NYt():t==="ar"?zYt():t==="es"?jYt():t==="hi"?AYt():CYt()}),RYt=()=>"Test connection",MYt=()=>"测试连接",OYt=()=>"آزمایش اتصال",DYt=()=>"اختبار الاتصال",LYt=()=>"Probar conexión",IYt=()=>"कनेक्शन जाँचें",$Yt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MYt():t==="fa"?OYt():t==="ar"?DYt():t==="es"?LYt():t==="hi"?IYt():RYt()}),BYt=()=>"Testing…",PYt=()=>"正在测试…",FYt=()=>"در حال آزمایش…",HYt=()=>"جارٍ الاختبار…",qYt=()=>"Probando…",UYt=()=>"जाँचा जा रहा है…",GYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PYt():t==="fa"?FYt():t==="ar"?HYt():t==="es"?qYt():t==="hi"?UYt():BYt()}),VYt=()=>", then add it with",KYt=()=>",然后使用以下命令添加:",WYt=()=>"، سپس با این فرمان اضافه‌اش کنید:",QYt=()=>"، ثم أضِفه عبر",XYt=()=>" y luego añádela con",YYt=()=>", फिर इसे इसके साथ जोड़ें",ZYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KYt():t==="fa"?WYt():t==="ar"?QYt():t==="es"?XYt():t==="hi"?YYt():VYt()}),JYt=()=>"This is useful when collaborators follow project changes on GitHub. New projects will enable syncing automatically, creating a private repository when needed and pushing experiment branches for visibility.",eZt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",tZt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",nZt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",rZt=()=>"Es útil cuando tus colaboradores siguen los cambios del proyecto en GitHub. Los proyectos nuevos activarán la sincronización automáticamente: se creará un repositorio privado cuando haga falta y se subirán las ramas de los experimentos para que sean visibles.",sZt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",iZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eZt():t==="fa"?tZt():t==="ar"?nZt():t==="es"?rZt():t==="hi"?sZt():JYt()}),aZt=()=>"This saved destination is not configured. Set it up below or choose another backend.",oZt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",cZt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",lZt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",uZt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",_Zt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",fZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oZt():t==="fa"?cZt():t==="ar"?lZt():t==="es"?uZt():t==="hi"?_Zt():aZt()}),dZt=()=>"This value looks like a Hugging Face token — compute runs only read it from",hZt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",pZt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",mZt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",gZt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",vZt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",bZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hZt():t==="fa"?pZt():t==="ar"?mZt():t==="es"?gZt():t==="hi"?vZt():dZt()}),yZt=()=>"Time limit",xZt=()=>"时间限制",wZt=()=>"محدودیت زمانی",kZt=()=>"الحد الزمني",SZt=()=>"Límite de tiempo",CZt=()=>"समय सीमा",EZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xZt():t==="fa"?wZt():t==="ar"?kZt():t==="es"?SZt():t==="hi"?CZt():yZt()}),NZt=()=>"Unable to verify",zZt=()=>"无法验证",jZt=()=>"تأیید ممکن نیست",AZt=()=>"تعذّر التحقق",TZt=()=>"No se pudo verificar",RZt=()=>"सत्यापित नहीं हो सका",rb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zZt():t==="fa"?jZt():t==="ar"?AZt():t==="es"?TZt():t==="hi"?RZt():NZt()}),MZt=()=>"Unknown",OZt=()=>"未知",DZt=()=>"نامشخص",LZt=()=>"غير معروف",IZt=()=>"Desconocido",$Zt=()=>"अज्ञात",iI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OZt():t==="fa"?DZt():t==="ar"?LZt():t==="es"?IZt():t==="hi"?$Zt():MZt()}),BZt=()=>"Update required",PZt=()=>"需要更新",FZt=()=>"نیازمند به‌روزرسانی",HZt=()=>"مطلوب تحديث",qZt=()=>"Actualización necesaria",UZt=()=>"अपडेट ज़रूरी है",GZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PZt():t==="fa"?FZt():t==="ar"?HZt():t==="es"?qZt():t==="hi"?UZt():BZt()}),VZt=()=>"Updates",KZt=()=>"更新",WZt=()=>"به‌روزرسانی‌ها",QZt=()=>"التحديثات",XZt=()=>"Actualizaciones",YZt=()=>"अपडेट",nj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KZt():t==="fa"?WZt():t==="ar"?QZt():t==="es"?XZt():t==="hi"?YZt():VZt()}),ZZt=()=>"Usage analytics",JZt=()=>"使用情况分析",eJt=()=>"تحلیل استفاده",tJt=()=>"تحليلات الاستخدام",nJt=()=>"Estadísticas de uso",rJt=()=>"उपयोग एनालिटिक्स",sJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JZt():t==="fa"?eJt():t==="ar"?tJt():t==="es"?nJt():t==="hi"?rJt():ZZt()}),iJt=()=>"value",aJt=()=>"值",oJt=()=>"مقدار",cJt=()=>"القيمة",lJt=()=>"valor",uJt=()=>"वैल्यू",aI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aJt():t==="fa"?oJt():t==="ar"?cJt():t==="es"?lJt():t==="hi"?uJt():iJt()}),_Jt=()=>"Variables available to runs and the research agent (API keys, tokens).",fJt=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",dJt=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",hJt=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",pJt=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",mJt=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",gJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fJt():t==="fa"?dJt():t==="ar"?hJt():t==="es"?pJt():t==="hi"?mJt():_Jt()}),vJt=()=>"Version",bJt=()=>"版本",yJt=()=>"نسخه",xJt=()=>"الإصدار",wJt=()=>"Versión",kJt=()=>"वर्शन",oI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bJt():t==="fa"?yJt():t==="ar"?xJt():t==="es"?wJt():t==="hi"?kJt():vJt()}),SJt=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",CJt=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",EJt=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",NJt=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",zJt=()=>"Si se activa, cada proyecto nuevo tendrá un repositorio privado en GitHub. Las ramas de los experimentos se suben automáticamente para que las vean tus colaboradores. El cómputo siempre usa snapshots directos del código fuente.",jJt=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",AJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CJt():t==="fa"?EJt():t==="ar"?NJt():t==="es"?zJt():t==="hi"?jJt():SJt()}),TJt=()=>"With a token saved, a paper opened in the dashboard can be kept in step with an Overleaf project, in both directions. Overleaf's Git integration comes with a paid Overleaf plan; without one, a paper can still be uploaded to Overleaf as a new project. The token stays on this machine and is not sent to compute backends.",RJt=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",MJt=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",OJt=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",DJt=()=>"Con un token guardado, un paper abierto en el dashboard puede mantenerse sincronizado con un proyecto de Overleaf en ambas direcciones. La integración con Git de Overleaf requiere un plan de pago; sin él, puedes seguir subiendo un paper a Overleaf como proyecto nuevo. El token se queda en este equipo y no se envía a los backends de cómputo.",LJt=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",IJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RJt():t==="fa"?MJt():t==="ar"?OJt():t==="es"?DJt():t==="hi"?LJt():TJt()}),$Jt=()=>"Pick a login node first",BJt=()=>"请先选择登录节点",PJt=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",FJt=()=>"اختر عقدة دخول أولًا",HJt=()=>"Elige primero un nodo de acceso",qJt=()=>"पहले एक लॉगिन नोड चुनें",UJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BJt():t==="fa"?PJt():t==="ar"?FJt():t==="es"?HJt():t==="hi"?qJt():$Jt()}),GJt=()=>"Providers",VJt=()=>"提供商",KJt=()=>"ارائه‌دهندگان",WJt=()=>"المزوّدون",QJt=()=>"Proveedores",XJt=()=>"प्रोवाइडर",cI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VJt():t==="fa"?KJt():t==="ar"?WJt():t==="es"?QJt():t==="hi"?XJt():GJt()}),YJt=()=>"Reconnect",ZJt=()=>"重新连接",JJt=()=>"اتصال دوباره",een=()=>"إعادة الاتصال",ten=()=>"Reconectar",nen=()=>"फिर से कनेक्ट करें",lI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJt():t==="fa"?JJt():t==="ar"?een():t==="es"?ten():t==="hi"?nen():YJt()}),ren=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,sen=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,ien=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,aen=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,oen=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,cen=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,len=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sen(e):t==="fa"?ien(e):t==="ar"?aen(e):t==="es"?oen(e):t==="hi"?cen(e):ren(e)}),uen=()=>"Reinstall with the orx installer to get automatic updates.",_en=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",fen=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",den=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",hen=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",pen=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",men=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_en():t==="fa"?fen():t==="ar"?den():t==="es"?hen():t==="hi"?pen():uen()}),gen=()=>"Release notes",ven=()=>"版本说明",ben=()=>"یادداشت‌های انتشار",yen=()=>"ملاحظات الإصدار",xen=()=>"Notas de la versión",wen=()=>"रिलीज़ नोट्स",uI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ven():t==="fa"?ben():t==="ar"?yen():t==="es"?xen():t==="hi"?wen():gen()}),ken=()=>"Re-link",Sen=()=>"重新链接",Cen=()=>"پیوند دوباره",Een=()=>"إعادة الربط",Nen=()=>"Volver a enlazar",zen=()=>"फिर से लिंक करें",jen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sen():t==="fa"?Cen():t==="ar"?Een():t==="es"?Nen():t==="hi"?zen():ken()}),Aen=()=>"Remove cookie",Ten=()=>"移除 cookie",Ren=()=>"حذف کوکی",Men=()=>"إزالة ملف تعريف الارتباط",Oen=()=>"Quitar cookie",Den=()=>"कुकी हटाएं",Len=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ten():t==="fa"?Ren():t==="ar"?Men():t==="es"?Oen():t==="hi"?Den():Aen()}),Ien=()=>"Remove token",$en=()=>"移除令牌",Ben=()=>"حذف توکن",Pen=()=>"إزالة الرمز",Fen=()=>"Quitar token",Hen=()=>"टोकन हटाएं",qen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$en():t==="fa"?Ben():t==="ar"?Pen():t==="es"?Fen():t==="hi"?Hen():Ien()}),Uen=()=>"Removing…",Gen=()=>"正在移除…",Ven=()=>"در حال حذف…",Ken=()=>"جارٍ الإزالة…",Wen=()=>"Quitando…",Qen=()=>"हटाया जा रहा है…",rj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gen():t==="fa"?Ven():t==="ar"?Ken():t==="es"?Wen():t==="hi"?Qen():Uen()}),Xen=()=>"Replace anyway",Yen=()=>"仍要替换",Zen=()=>"به‌هرحال جایگزین کن",Jen=()=>"الاستبدال على أي حال",etn=()=>"Reemplazar de todos modos",ttn=()=>"फिर भी बदलें",ntn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yen():t==="fa"?Zen():t==="ar"?Jen():t==="es"?etn():t==="hi"?ttn():Xen()}),rtn=()=>"Replace key",stn=()=>"替换密钥",itn=()=>"جایگزینی کلید",atn=()=>"استبدال المفتاح",otn=()=>"Reemplazar clave",ctn=()=>"की बदलें",ltn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?stn():t==="fa"?itn():t==="ar"?atn():t==="es"?otn():t==="hi"?ctn():rtn()}),utn=()=>"Replace token",_tn=()=>"替换令牌",ftn=()=>"جایگزینی توکن",dtn=()=>"استبدال الرمز",htn=()=>"Reemplazar token",ptn=()=>"टोकन बदलें",mtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_tn():t==="fa"?ftn():t==="ar"?dtn():t==="es"?htn():t==="hi"?ptn():utn()}),gtn=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,vtn=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,btn=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,ytn=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,xtn=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,wtn=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,ktn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vtn(e):t==="fa"?btn(e):t==="ar"?ytn(e):t==="es"?xtn(e):t==="hi"?wtn(e):gtn(e)}),Stn=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,Ctn=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,Etn=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,Ntn=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,ztn=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,jtn=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,Atn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ctn(e):t==="fa"?Etn(e):t==="ar"?Ntn(e):t==="es"?ztn(e):t==="hi"?jtn(e):Stn(e)}),Ttn=()=>"Run `gh auth login` in your terminal.",Rtn=()=>"请在终端中运行 `gh auth login`。",Mtn=()=>"در پایانه `gh auth login` را اجرا کنید.",Otn=()=>"نفّذ `gh auth login` في طرفيتك.",Dtn=()=>"Ejecuta `gh auth login` en tu terminal.",Ltn=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",Itn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rtn():t==="fa"?Mtn():t==="ar"?Otn():t==="es"?Dtn():t==="hi"?Ltn():Ttn()}),$tn=()=>"Saved",Btn=()=>"已保存",Ptn=()=>"ذخیره شده",Ftn=()=>"تم الحفظ",Htn=()=>"Guardado",qtn=()=>"सेव हो गया",sj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Btn():t==="fa"?Ptn():t==="ar"?Ftn():t==="es"?Htn():t==="hi"?qtn():$tn()}),Utn=()=>"Set up",Gtn=()=>"设置",Vtn=()=>"راه‌اندازی",Ktn=()=>"إعداد",Wtn=()=>"Configurar",Qtn=()=>"सेट अप करें",Xtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gtn():t==="fa"?Vtn():t==="ar"?Ktn():t==="es"?Wtn():t==="hi"?Qtn():Utn()}),Ytn=()=>"Set up SSH key",Ztn=()=>"设置 SSH 密钥",Jtn=()=>"راه‌اندازی کلید SSH",enn=()=>"إعداد مفتاح SSH",tnn=()=>"Configurar clave SSH",nnn=()=>"SSH की सेट अप करें",rnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ztn():t==="fa"?Jtn():t==="ar"?enn():t==="es"?tnn():t==="hi"?nnn():Ytn()}),snn=()=>"Sign in",inn=()=>"登录",ann=()=>"ورود",onn=()=>"تسجيل الدخول",cnn=()=>"Iniciar sesión",lnn=()=>"साइन इन करें",_I=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?inn():t==="fa"?ann():t==="ar"?onn():t==="es"?cnn():t==="hi"?lnn():snn()}),unn=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,_nn=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,fnn=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,dnn=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,hnn=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,pnn=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,fI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_nn(e):t==="fa"?fnn(e):t==="ar"?dnn(e):t==="es"?hnn(e):t==="hi"?pnn(e):unn(e)}),mnn=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",gnn=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",vnn=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",bnn=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",ynn=()=>"La base de datos local, los logs de las ejecuciones, los artefactos y los adjuntos de los chats. Mover este directorio copia todo el almacén.",xnn=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",wnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gnn():t==="fa"?vnn():t==="ar"?bnn():t==="es"?ynn():t==="hi"?xnn():mnn()}),knn=()=>"The terminal disconnected before setup completed. Try again.",Snn=()=>"设置完成前终端连接已断开。请重试。",Cnn=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",Enn=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",Nnn=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",znn=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",sb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Snn():t==="fa"?Cnn():t==="ar"?Enn():t==="es"?Nnn():t==="hi"?znn():knn()}),jnn=()=>"Dark",Ann=()=>"深色",Tnn=()=>"تیره",Rnn=()=>"داكن",Mnn=()=>"Oscuro",Onn=()=>"डार्क",Dnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ann():t==="fa"?Tnn():t==="ar"?Rnn():t==="es"?Mnn():t==="hi"?Onn():jnn()}),Lnn=()=>"Theme",Inn=()=>"主题",$nn=()=>"پوسته",Bnn=()=>"السمة",Pnn=()=>"Tema",Fnn=()=>"थीम",ij=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Inn():t==="fa"?$nn():t==="ar"?Bnn():t==="es"?Pnn():t==="hi"?Fnn():Lnn()}),Hnn=()=>"Light",qnn=()=>"浅色",Unn=()=>"روشن",Gnn=()=>"فاتح",Vnn=()=>"Claro",Knn=()=>"लाइट",Wnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qnn():t==="fa"?Unn():t==="ar"?Gnn():t==="es"?Vnn():t==="hi"?Knn():Hnn()}),Qnn=()=>"System",Xnn=()=>"系统",Ynn=()=>"سیستم",Znn=()=>"النظام",Jnn=()=>"Sistema",ern=()=>"सिस्टम",trn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xnn():t==="fa"?Ynn():t==="ar"?Znn():t==="es"?Jnn():t==="hi"?ern():Qnn()}),nrn=()=>"Set up billing in the Tinker console",rrn=()=>"在 Tinker 控制台设置账单",srn=()=>"تنظیم پرداخت در کنسول Tinker",irn=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",arn=()=>"Configura la facturación en la consola de Tinker",orn=()=>"Tinker कंसोल में बिलिंग सेट अप करें",crn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rrn():t==="fa"?srn():t==="ar"?irn():t==="es"?arn():t==="hi"?orn():nrn()}),lrn=()=>"Billing setup required",urn=()=>"需要设置账单",_rn=()=>"تنظیم پرداخت لازم است",frn=()=>"مطلوب إعداد الفوترة",drn=()=>"Hay que configurar la facturación",hrn=()=>"बिलिंग सेटअप ज़रूरी है",prn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?urn():t==="fa"?_rn():t==="ar"?frn():t==="es"?drn():t==="hi"?hrn():lrn()}),mrn=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",grn=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",vrn=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",brn=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",yrn=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",xrn=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",wrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?grn():t==="fa"?vrn():t==="ar"?brn():t==="es"?yrn():t==="hi"?xrn():mrn()}),krn=()=>"Invalid Key",Srn=()=>"密钥无效",Crn=()=>"کلید نامعتبر",Ern=()=>"مفتاح غير صالح",Nrn=()=>"Clave no válida",zrn=()=>"अमान्य की",jrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Srn():t==="fa"?Crn():t==="ar"?Ern():t==="es"?Nrn():t==="hi"?zrn():krn()}),Arn=()=>"Token from",Trn=()=>"令牌来自",Rrn=()=>"توکن از",Mrn=()=>"الرمز من",Orn=()=>"Token tomado de la",Drn=()=>"टोकन स्रोत",Lrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Trn():t==="fa"?Rrn():t==="ar"?Mrn():t==="es"?Orn():t==="hi"?Drn():Arn()}),Irn=()=>"Update now",$rn=()=>"立即更新",Brn=()=>"اکنون به‌روزرسانی کن",Prn=()=>"التحديث الآن",Frn=()=>"Actualizar ahora",Hrn=()=>"अभी अपडेट करें",qrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$rn():t==="fa"?Brn():t==="ar"?Prn():t==="es"?Frn():t==="hi"?Hrn():Irn()}),Urn=e=>`Update to ${e==null?void 0:e.version}`,Grn=e=>`更新到 ${e==null?void 0:e.version}`,Vrn=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,Krn=e=>`التحديث إلى ${e==null?void 0:e.version}`,Wrn=e=>`Actualizar a ${e==null?void 0:e.version}`,Qrn=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,Xrn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Grn(e):t==="fa"?Vrn(e):t==="ar"?Krn(e):t==="es"?Wrn(e):t==="hi"?Qrn(e):Urn(e)}),Yrn=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",Zrn=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Jrn=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",esn=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",tsn=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",nsn=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",rsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zrn():t==="fa"?Jrn():t==="ar"?esn():t==="es"?tsn():t==="hi"?nsn():Yrn()}),ssn=()=>"Updating default destination…",isn=()=>"正在更新默认运行位置…",asn=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",osn=()=>"جارٍ تحديث الوجهة الافتراضية…",csn=()=>"Actualizando el destino predeterminado…",lsn=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",usn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?isn():t==="fa"?asn():t==="ar"?osn():t==="es"?csn():t==="hi"?lsn():ssn()}),_sn=()=>"Use this repository for automatic experiment-branch pushes when your connected account can write to it. Otherwise, OpenResearch creates a separate private repository for collaboration.",fsn=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",dsn=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",hsn=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",psn=()=>"Usar este repositorio para subir automáticamente las ramas de los experimentos si tu cuenta conectada tiene permiso de escritura. Si no, OpenResearch crea un repositorio privado aparte para colaborar.",msn=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",gsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fsn():t==="fa"?dsn():t==="ar"?hsn():t==="es"?psn():t==="hi"?msn():_sn()}),vsn=()=>"Validating…",bsn=()=>"正在验证…",ysn=()=>"در حال اعتبارسنجی…",xsn=()=>"جارٍ التحقق…",wsn=()=>"Validando…",ksn=()=>"सत्यापित हो रहा है…",dI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bsn():t==="fa"?ysn():t==="ar"?xsn():t==="es"?wsn():t==="hi"?ksn():vsn()}),Ssn=()=>"View settings",Csn=()=>"查看设置",Esn=()=>"مشاهدهٔ تنظیمات",Nsn=()=>"عرض الإعدادات",zsn=()=>"Ver configuración",jsn=()=>"सेटिंग्स देखें",Asn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Csn():t==="fa"?Esn():t==="ar"?Nsn():t==="es"?zsn():t==="hi"?jsn():Ssn()}),Tsn=e=>`Couldn't delete the side chat: ${e==null?void 0:e.error}`,Rsn=e=>`无法删除侧边对话:${e==null?void 0:e.error}`,Msn=e=>`حذف گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,Osn=e=>`تعذّر حذف المحادثة الجانبية: ${e==null?void 0:e.error}`,Dsn=e=>`No se pudo eliminar el chat lateral: ${e==null?void 0:e.error}`,Lsn=e=>`साइड चैट हटाई नहीं जा सकी: ${e==null?void 0:e.error}`,aj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rsn(e):t==="fa"?Msn(e):t==="ar"?Osn(e):t==="es"?Dsn(e):t==="hi"?Lsn(e):Tsn(e)}),Isn=()=>"Side chats are deleted when you close them or quit the app.",$sn=()=>"关闭侧边对话或退出应用后,侧边对话会被删除。",Bsn=()=>"گفت‌وگوهای جانبی با بستن آن‌ها یا خروج از برنامه حذف می‌شوند.",Psn=()=>"تُحذف المحادثات الجانبية عند إغلاقها أو الخروج من التطبيق.",Fsn=()=>"Los chats laterales se eliminan cuando los cierras o sales de la app.",Hsn=()=>"साइड चैट उन्हें बंद करने या ऐप से बाहर निकलने पर हटा दी जाती हैं।",qsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$sn():t==="fa"?Bsn():t==="ar"?Psn():t==="es"?Fsn():t==="hi"?Hsn():Isn()}),Usn=()=>"Open a chat first, then start a side chat from it.",Gsn=()=>"请先打开一个对话,再从中开启侧边对话。",Vsn=()=>"ابتدا یک گفت‌وگو باز کنید، سپس از آن گفت‌وگوی جانبی شروع کنید.",Ksn=()=>"افتح محادثة أولًا، ثم ابدأ منها محادثة جانبية.",Wsn=()=>"Abre primero un chat y luego inicia un chat lateral desde él.",Qsn=()=>"पहले कोई चैट खोलें, फिर उससे साइड चैट शुरू करें।",Xsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gsn():t==="fa"?Vsn():t==="ar"?Ksn():t==="es"?Wsn():t==="hi"?Qsn():Usn()}),Ysn=()=>"A side chat can't open its own side chat.",Zsn=()=>"侧边对话不能再开启自己的侧边对话。",Jsn=()=>"گفت‌وگوی جانبی نمی‌تواند گفت‌وگوی جانبی خودش را باز کند.",ein=()=>"لا يمكن للمحادثة الجانبية فتح محادثة جانبية خاصة بها.",tin=()=>"Un chat lateral no puede abrir su propio chat lateral.",nin=()=>"साइड चैट अपनी खुद की साइड चैट नहीं खोल सकती।",rin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zsn():t==="fa"?Jsn():t==="ar"?ein():t==="es"?tin():t==="hi"?nin():Ysn()}),sin=()=>"Side chat",iin=()=>"侧边对话",ain=()=>"گفت‌وگوی جانبی",oin=()=>"محادثة جانبية",cin=()=>"Chat lateral",lin=()=>"साइड चैट",X3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iin():t==="fa"?ain():t==="ar"?oin():t==="es"?cin():t==="hi"?lin():sin()}),uin=e=>`Couldn't open a side chat: ${e==null?void 0:e.error}`,_in=e=>`无法打开侧边对话:${e==null?void 0:e.error}`,fin=e=>`باز کردن گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,din=e=>`تعذّر فتح محادثة جانبية: ${e==null?void 0:e.error}`,hin=e=>`No se pudo abrir un chat lateral: ${e==null?void 0:e.error}`,pin=e=>`साइड चैट नहीं खुल सकी: ${e==null?void 0:e.error}`,min=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_in(e):t==="fa"?fin(e):t==="ar"?din(e):t==="es"?hin(e):t==="hi"?pin(e):uin(e)}),gin=()=>"Ask a quick question in a temporary side chat",vin=()=>"在临时侧边对话中快速提问",bin=()=>"یک پرسش کوتاه را در گفت‌وگوی جانبی موقت بپرسید",yin=()=>"اطرح سؤالًا سريعًا في محادثة جانبية مؤقتة",xin=()=>"Haz una pregunta rápida en un chat lateral temporal",win=()=>"अस्थायी साइड चैट में एक छोटा सवाल पूछें",kin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vin():t==="fa"?bin():t==="ar"?yin():t==="es"?xin():t==="hi"?win():gin()}),Sin=()=>"Edit project",Cin=()=>"编辑项目",Ein=()=>"ویرایش پروژه",Nin=()=>"تعديل المشروع",zin=()=>"Editar proyecto",jin=()=>"प्रोजेक्ट संपादित करें",Ain=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cin():t==="fa"?Ein():t==="ar"?Nin():t==="es"?zin():t==="hi"?jin():Sin()}),Tin=()=>"Filter",Rin=()=>"筛选",Min=()=>"فیلتر",Oin=()=>"تصفية",Din=()=>"Filtrar",Lin=()=>"फ़िल्टर",Iin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rin():t==="fa"?Min():t==="ar"?Oin():t==="es"?Din():t==="hi"?Lin():Tin()}),$in=()=>"Group by",Bin=()=>"分组方式",Pin=()=>"گروه‌بندی بر اساس",Fin=()=>"تجميع حسب",Hin=()=>"Agrupar por",qin=()=>"समूह बनाएँ",Uin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bin():t==="fa"?Pin():t==="ar"?Fin():t==="es"?Hin():t==="hi"?qin():$in()}),Gin=()=>"In one list",Vin=()=>"单一列表",Kin=()=>"در یک فهرست",Win=()=>"في قائمة واحدة",Qin=()=>"En una lista",Xin=()=>"एक सूची में",Yin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vin():t==="fa"?Kin():t==="ar"?Win():t==="es"?Qin():t==="hi"?Xin():Gin()}),Zin=()=>"Pin",Jin=()=>"置顶",ean=()=>"سنجاق کردن",tan=()=>"تثبيت",nan=()=>"Fijar",ran=()=>"पिन करें",san=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jin():t==="fa"?ean():t==="ar"?tan():t==="es"?nan():t==="hi"?ran():Zin()}),ian=e=>`${e==null?void 0:e.count} chats`,aan=e=>`${e==null?void 0:e.count} 个聊天`,oan=e=>`${e==null?void 0:e.count} گفت‌وگو`,can=e=>`${e==null?void 0:e.count} محادثات`,lan=e=>`${e==null?void 0:e.count} chats`,uan=e=>`${e==null?void 0:e.count} चैट`,_an=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aan(e):t==="fa"?oan(e):t==="ar"?can(e):t==="es"?lan(e):t==="hi"?uan(e):ian(e)}),fan=e=>`Project details · ${e==null?void 0:e.name}`,dan=e=>`项目详情 · ${e==null?void 0:e.name}`,han=e=>`جزئیات پروژه · ${e==null?void 0:e.name}`,pan=e=>`تفاصيل المشروع · ${e==null?void 0:e.name}`,man=e=>`Detalles del proyecto · ${e==null?void 0:e.name}`,gan=e=>`प्रोजेक्ट विवरण · ${e==null?void 0:e.name}`,van=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dan(e):t==="fa"?han(e):t==="ar"?pan(e):t==="es"?man(e):t==="hi"?gan(e):fan(e)}),ban=()=>"Reveal in Finder",yan=()=>"在访达中显示",xan=()=>"نمایش در Finder",wan=()=>"إظهار في Finder",kan=()=>"Mostrar en Finder",San=()=>"Finder में दिखाएँ",Can=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yan():t==="fa"?xan():t==="ar"?wan():t==="es"?kan():t==="hi"?San():ban()}),Ean=()=>"Source folder",Nan=()=>"源文件夹",zan=()=>"پوشهٔ منبع",jan=()=>"مجلد المصدر",Aan=()=>"Carpeta de origen",Tan=()=>"स्रोत फ़ोल्डर",Ran=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nan():t==="fa"?zan():t==="ar"?jan():t==="es"?Aan():t==="hi"?Tan():Ean()}),Man=()=>"Unpin",Oan=()=>"取消置顶",Dan=()=>"برداشتن سنجاق",Lan=()=>"إلغاء التثبيت",Ian=()=>"Desfijar",$an=()=>"पिन हटाएँ",Ban=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oan():t==="fa"?Dan():t==="ar"?Lan():t==="es"?Ian():t==="hi"?$an():Man()}),Pan=()=>"Skill",Fan=()=>"技能",Han=()=>"مهارت",qan=()=>"مهارة",Uan=()=>"Skill",Gan=()=>"स्किल",Van=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fan():t==="fa"?Han():t==="ar"?qan():t==="es"?Uan():t==="hi"?Gan():Pan()}),Kan=()=>"Loading skill…",Wan=()=>"正在加载技能…",Qan=()=>"در حال بارگیری مهارت…",Xan=()=>"جارٍ تحميل المهارة…",Yan=()=>"Cargando skill…",Zan=()=>"स्किल लोड हो रही है…",Jan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wan():t==="fa"?Qan():t==="ar"?Xan():t==="es"?Yan():t==="hi"?Zan():Kan()}),eon=()=>"Personal",ton=()=>"个人",non=()=>"شخصی",ron=()=>"شخصي",son=()=>"Personal",ion=()=>"व्यक्तिगत",aon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ton():t==="fa"?non():t==="ar"?ron():t==="es"?son():t==="hi"?ion():eon()}),oon=()=>"Alternatively, tell your agent to save a reusable skill for you.",con=()=>"或者,请你的智能体为你保存可重复使用的技能。",lon=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",uon=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",_on=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",fon=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",don=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?con():t==="fa"?lon():t==="ar"?uon():t==="es"?_on():t==="hi"?fon():oon()}),hon=e=>`Delete the “${e==null?void 0:e.name}” skill?`,pon=e=>`删除技能“${e==null?void 0:e.name}”?`,mon=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,gon=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,von=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,bon=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,yon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pon(e):t==="fa"?mon(e):t==="ar"?gon(e):t==="es"?von(e):t==="hi"?bon(e):hon(e)}),xon=e=>`Delete skill ${e==null?void 0:e.name}`,won=e=>`删除技能 ${e==null?void 0:e.name}`,kon=e=>`حذف مهارت ${e==null?void 0:e.name}`,Son=e=>`حذف المهارة ${e==null?void 0:e.name}`,Con=e=>`Eliminar la skill ${e==null?void 0:e.name}`,Eon=e=>`${e==null?void 0:e.name} स्किल हटाएं`,Non=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?won(e):t==="fa"?kon(e):t==="ar"?Son(e):t==="es"?Con(e):t==="hi"?Eon(e):xon(e)}),zon=e=>`Delete the “${e==null?void 0:e.name}” template?`,jon=e=>`删除模板“${e==null?void 0:e.name}”?`,Aon=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,Ton=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,Ron=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,Mon=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,Oon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jon(e):t==="fa"?Aon(e):t==="ar"?Ton(e):t==="es"?Ron(e):t==="hi"?Mon(e):zon(e)}),Don=e=>`Delete template ${e==null?void 0:e.name}`,Lon=e=>`删除模板 ${e==null?void 0:e.name}`,Ion=e=>`حذف قالب ${e==null?void 0:e.name}`,$on=e=>`حذف القالب ${e==null?void 0:e.name}`,Bon=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,Pon=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,Fon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lon(e):t==="fa"?Ion(e):t==="ar"?$on(e):t==="es"?Bon(e):t==="hi"?Pon(e):Don(e)}),Hon=()=>"Invoke skills with /name in chat. Skills from your coding agents are screened for research relevance before importing. Upload a skill to include it yourself. Alternatively, tell your OpenResearch agent to create and add a reusable skill for you.",qon=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",Uon=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",Gon=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",Von=()=>"Usa las skills con /nombre en el chat. Las skills de tus agentes de programación se filtran según su relevancia para la investigación antes de importarlas. Sube una skill para incluirla tú mismo. También puedes pedirle a tu agente de OpenResearch que cree y añada una skill reutilizable por ti.",Kon=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",Won=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qon():t==="fa"?Uon():t==="ar"?Gon():t==="es"?Von():t==="hi"?Kon():Hon()}),Qon=()=>"Drop a SKILL.md or .zip here, or click to choose",Xon=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",Yon=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Zon=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Jon=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",ecn=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",tcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xon():t==="fa"?Yon():t==="ar"?Zon():t==="es"?Jon():t==="hi"?ecn():Qon()}),ncn=()=>"Drop a .tex or .zip here, or click to choose",rcn=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",scn=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",icn=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",acn=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",ocn=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",ccn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rcn():t==="fa"?scn():t==="ar"?icn():t==="es"?acn():t==="hi"?ocn():ncn()}),lcn=()=>"File too large (max 20 MB).",ucn=()=>"文件过大(最大 20 MB)。",_cn=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",fcn=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",dcn=()=>"Archivo demasiado grande (máx. 20 MB).",hcn=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",hI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ucn():t==="fa"?_cn():t==="ar"?fcn():t==="es"?dcn():t==="hi"?hcn():lcn()}),pcn=()=>" + 1 file",mcn=()=>" + 1 个文件",gcn=()=>" + ۱ فایل",vcn=()=>" + ملف واحد",bcn=()=>" + 1 archivo",ycn=()=>" + 1 फ़ाइल",xcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mcn():t==="fa"?gcn():t==="ar"?vcn():t==="es"?bcn():t==="hi"?ycn():pcn()}),wcn=()=>"Customize the skills and LaTeX templates available across your projects. Upload them here, or ask an OpenResearch agent to create and add them for you.",kcn=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",Scn=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",Ccn=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",Ecn=()=>"Personaliza las skills y plantillas de LaTeX disponibles en todos tus proyectos. Súbelas aquí o pídele a un agente de OpenResearch que las cree y las añada por ti.",Ncn=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",zcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kcn():t==="fa"?Scn():t==="ar"?Ccn():t==="es"?Ecn():t==="hi"?Ncn():wcn()}),jcn=()=>"Remove from OpenResearch",Acn=()=>"从 OpenResearch 移除",Tcn=()=>"حذف از OpenResearch",Rcn=()=>"إزالة من OpenResearch",Mcn=()=>"Quitar de OpenResearch",Ocn=()=>"OpenResearch से हटाएं",Dcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Acn():t==="fa"?Tcn():t==="ar"?Rcn():t==="es"?Mcn():t==="hi"?Ocn():jcn()}),Lcn=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,Icn=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,$cn=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,Bcn=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,Pcn=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,Fcn=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,Hcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Icn(e):t==="fa"?$cn(e):t==="ar"?Bcn(e):t==="es"?Pcn(e):t==="hi"?Fcn(e):Lcn(e)}),qcn=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,Ucn=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,Gcn=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,Vcn=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,Kcn=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,Wcn=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,Qcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ucn(e):t==="fa"?Gcn(e):t==="ar"?Vcn(e):t==="es"?Kcn(e):t==="hi"?Wcn(e):qcn(e)}),Xcn=e=>` + ${e==null?void 0:e.count} files`,Ycn=e=>` + ${e==null?void 0:e.count} 个文件`,Zcn=e=>` + ${e==null?void 0:e.count} فایل`,Jcn=e=>` + ملفات (${e==null?void 0:e.count})`,eln=e=>` + ${e==null?void 0:e.count} archivos`,tln=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,nln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ycn(e):t==="fa"?Zcn(e):t==="ar"?Jcn(e):t==="es"?eln(e):t==="hi"?tln(e):Xcn(e)}),rln=()=>"Could not load skills:",sln=()=>"无法加载技能:",iln=()=>"بارگیری مهارت‌ها ممکن نشد:",aln=()=>"تعذّر تحميل المهارات:",oln=()=>"No se pudieron cargar las skills:",cln=()=>"स्किल लोड नहीं हो सकीं:",lln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sln():t==="fa"?iln():t==="ar"?aln():t==="es"?oln():t==="hi"?cln():rln()}),uln=()=>"Could not load templates:",_ln=()=>"无法加载模板:",fln=()=>"بارگیری قالب‌ها ممکن نشد:",dln=()=>"تعذّر تحميل القوالب:",hln=()=>"No se pudieron cargar las plantillas:",pln=()=>"टेम्पलेट लोड नहीं हो सके:",mln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ln():t==="fa"?fln():t==="ar"?dln():t==="es"?hln():t==="hi"?pln():uln()}),gln=()=>"Customize",vln=()=>"自定义",bln=()=>"سفارشی‌سازی",yln=()=>"تخصيص",xln=()=>"Personalizar",wln=()=>"कस्टमाइज़ करें",kln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vln():t==="fa"?bln():t==="ar"?yln():t==="es"?xln():t==="hi"?wln():gln()}),Sln=()=>"Delete skill",Cln=()=>"删除技能",Eln=()=>"حذف مهارت",Nln=()=>"حذف المهارة",zln=()=>"Eliminar skill",jln=()=>"स्किल हटाएं",Aln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cln():t==="fa"?Eln():t==="ar"?Nln():t==="es"?zln():t==="hi"?jln():Sln()}),Tln=()=>"Delete template",Rln=()=>"删除模板",Mln=()=>"حذف قالب",Oln=()=>"حذف القالب",Dln=()=>"Eliminar plantilla",Lln=()=>"टेम्पलेट हटाएं",Iln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rln():t==="fa"?Mln():t==="ar"?Oln():t==="es"?Dln():t==="hi"?Lln():Tln()}),$ln=()=>"LaTeX templates",Bln=()=>"LaTeX 模板",Pln=()=>"قالب‌های LaTeX",Fln=()=>"قوالب LaTeX",Hln=()=>"Plantillas de LaTeX",qln=()=>"LaTeX टेम्पलेट",Uln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bln():t==="fa"?Pln():t==="ar"?Fln():t==="es"?Hln():t==="hi"?qln():$ln()}),Gln=()=>"Loading skills…",Vln=()=>"正在加载技能…",Kln=()=>"در حال بارگیری مهارت‌ها…",Wln=()=>"جارٍ تحميل المهارات…",Qln=()=>"Cargando skills…",Xln=()=>"स्किल लोड हो रही हैं…",Yln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vln():t==="fa"?Kln():t==="ar"?Wln():t==="es"?Qln():t==="hi"?Xln():Gln()}),Zln=()=>"Loading templates…",Jln=()=>"正在加载模板…",eun=()=>"در حال بارگیری قالب‌ها…",tun=()=>"جارٍ تحميل القوالب…",nun=()=>"Cargando plantillas…",run=()=>"टेम्पलेट लोड हो रहे हैं…",sun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jln():t==="fa"?eun():t==="ar"?tun():t==="es"?nun():t==="hi"?run():Zln()}),iun=()=>"No skills yet.",aun=()=>"尚无技能。",oun=()=>"هنوز مهارتی وجود ندارد.",cun=()=>"لا توجد مهارات بعد.",lun=()=>"Aún no hay skills.",uun=()=>"अभी तक कोई स्किल नहीं।",_un=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aun():t==="fa"?oun():t==="ar"?cun():t==="es"?lun():t==="hi"?uun():iun()}),fun=()=>"No templates yet.",dun=()=>"尚无模板。",hun=()=>"هنوز قالبی وجود ندارد.",pun=()=>"لا توجد قوالب بعد.",mun=()=>"Aún no hay plantillas.",gun=()=>"अभी तक कोई टेम्पलेट नहीं।",vun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dun():t==="fa"?hun():t==="ar"?pun():t==="es"?mun():t==="hi"?gun():fun()}),bun=()=>"Skills",yun=()=>"技能",xun=()=>"مهارت‌ها",wun=()=>"المهارات",kun=()=>"Skills",Sun=()=>"स्किल",Cun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yun():t==="fa"?xun():t==="ar"?wun():t==="es"?kun():t==="hi"?Sun():bun()}),Eun=()=>"Uploading…",Nun=()=>"正在上传…",zun=()=>"در حال بارگذاری…",jun=()=>"جارٍ الرفع…",Aun=()=>"Subiendo…",Tun=()=>"अपलोड हो रहा है…",Run=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nun():t==="fa"?zun():t==="ar"?jun():t==="es"?Aun():t==="hi"?Tun():Eun()}),Mun=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. Alternatively, tell your OpenResearch agent to create and add a LaTeX template for you. With exactly one template available, the agent uses it without asking.",Oun=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",Dun=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",Lun=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",Iun=()=>"Un estilo de congreso o de la casa en el que el agente escribe los papers en lugar de usar su preámbulo predeterminado. Sube un archivo .tex o un .zip con sus archivos .cls y .sty. También puedes pedirle a tu agente de OpenResearch que cree y añada una plantilla de LaTeX por ti. Si solo hay una plantilla disponible, el agente la usa sin preguntar.",$un=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",Bun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oun():t==="fa"?Dun():t==="ar"?Lun():t==="es"?Iun():t==="hi"?$un():Mun()}),Pun=()=>"Upload a SKILL.md file or a .zip of a skill folder.",Fun=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",Hun=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",qun=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",Uun=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",Gun=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",Vun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fun():t==="fa"?Hun():t==="ar"?qun():t==="es"?Uun():t==="hi"?Gun():Pun()}),Kun=()=>"Upload a .tex file or a .zip of a template folder.",Wun=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Qun=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",Xun=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",Yun=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",Zun=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",Jun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wun():t==="fa"?Qun():t==="ar"?Xun():t==="es"?Yun():t==="hi"?Zun():Kun()}),e_n=()=>"Close SSH config",t_n=()=>"关闭 SSH 配置",n_n=()=>"بستن پیکربندی SSH",r_n=()=>"إغلاق إعداد SSH",s_n=()=>"Cerrar la configuración SSH",i_n=()=>"SSH कॉन्फ़िग बंद करें",a_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t_n():t==="fa"?n_n():t==="ar"?r_n():t==="es"?s_n():t==="hi"?i_n():e_n()}),o_n=()=>"Discard your unsaved SSH config changes?",c_n=()=>"要放弃未保存的 SSH 配置更改吗?",l_n=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",u_n=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",__n=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",f_n=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",d_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c_n():t==="fa"?l_n():t==="ar"?u_n():t==="es"?__n():t==="hi"?f_n():o_n()}),h_n=()=>"Loading SSH config…",p_n=()=>"正在加载 SSH 配置…",m_n=()=>"در حال بارگیری پیکربندی SSH…",g_n=()=>"جارٍ تحميل إعداد SSH…",v_n=()=>"Cargando la configuración SSH…",b_n=()=>"SSH कॉन्फ़िग लोड हो रहा है…",y_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p_n():t==="fa"?m_n():t==="ar"?g_n():t==="es"?v_n():t==="hi"?b_n():h_n()}),x_n=()=>"SSH config saved",w_n=()=>"SSH 配置已保存",k_n=()=>"پیکربندی SSH ذخیره شد",S_n=()=>"تم حفظ إعداد SSH",C_n=()=>"Configuración SSH guardada",E_n=()=>"SSH कॉन्फ़िग सेव हो गया",N_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w_n():t==="fa"?k_n():t==="ar"?S_n():t==="es"?C_n():t==="hi"?E_n():x_n()}),z_n=()=>"SSH config",j_n=()=>"SSH 配置",A_n=()=>"پیکربندی SSH",T_n=()=>"إعداد SSH",R_n=()=>"Configuración SSH",M_n=()=>"SSH कॉन्फ़िग",O_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j_n():t==="fa"?A_n():t==="ar"?T_n():t==="es"?R_n():t==="hi"?M_n():z_n()}),D_n=()=>"Configure SSH hosts…",L_n=()=>"配置 SSH 主机…",I_n=()=>"پیکربندی میزبان‌های SSH…",$_n=()=>"إعداد مضيفات SSH…",B_n=()=>"Configurar hosts SSH…",P_n=()=>"SSH होस्ट कॉन्फ़िगर करें…",pI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L_n():t==="fa"?I_n():t==="ar"?$_n():t==="es"?B_n():t==="hi"?P_n():D_n()}),F_n=()=>"Container name or ID",H_n=()=>"容器名称或 ID",q_n=()=>"نام یا شناسهٔ کانتینر",U_n=()=>"اسم الحاوية أو معرّفها",G_n=()=>"Nombre o ID del contenedor",V_n=()=>"कंटेनर का नाम या ID",K_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H_n():t==="fa"?q_n():t==="ar"?U_n():t==="es"?G_n():t==="hi"?V_n():F_n()}),W_n=()=>"Default SSH host",Q_n=()=>"默认 SSH 主机",X_n=()=>"میزبان پیش‌فرض SSH",Y_n=()=>"مضيف SSH الافتراضي",Z_n=()=>"Servidor SSH predeterminado",J_n=()=>"डिफ़ॉल्ट SSH होस्ट",efn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q_n():t==="fa"?X_n():t==="ar"?Y_n():t==="es"?Z_n():t==="hi"?J_n():W_n()}),tfn=()=>"Direct host",nfn=()=>"直接在主机上",rfn=()=>"مستقیماً روی میزبان",sfn=()=>"المضيف مباشرة",ifn=()=>"Servidor directamente",afn=()=>"सीधे होस्ट पर",ofn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nfn():t==="fa"?rfn():t==="ar"?sfn():t==="es"?ifn():t==="hi"?afn():tfn()}),cfn=()=>"Existing container",lfn=()=>"现有容器",ufn=()=>"کانتینر موجود",_fn=()=>"حاوية موجودة",ffn=()=>"Contenedor existente",dfn=()=>"मौजूदा कंटेनर",hfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lfn():t==="fa"?ufn():t==="ar"?_fn():t==="es"?ffn():t==="hi"?dfn():cfn()}),pfn=()=>"Run in",mfn=()=>"运行位置",gfn=()=>"اجرا در",vfn=()=>"التشغيل في",bfn=()=>"Ejecutar en",yfn=()=>"यहाँ चलाएँ",xfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mfn():t==="fa"?gfn():t==="ar"?vfn():t==="es"?bfn():t==="hi"?yfn():pfn()}),wfn=()=>"Cancelled",kfn=()=>"已取消",Sfn=()=>"لغوشده",Cfn=()=>"ملغى",Efn=()=>"Cancelado",Nfn=()=>"रद्द किया गया",zfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kfn():t==="fa"?Sfn():t==="ar"?Cfn():t==="es"?Efn():t==="hi"?Nfn():wfn()}),jfn=()=>"Cancelling",Afn=()=>"正在取消",Tfn=()=>"در حال لغو",Rfn=()=>"جارٍ الإلغاء",Mfn=()=>"Cancelando",Ofn=()=>"रद्द हो रहा है",Dfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Afn():t==="fa"?Tfn():t==="ar"?Rfn():t==="es"?Mfn():t==="hi"?Ofn():jfn()}),Lfn=()=>"Done",Ifn=()=>"已完成",$fn=()=>"انجام‌شده",Bfn=()=>"تم",Pfn=()=>"Completado",Ffn=()=>"पूरा हुआ",mI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ifn():t==="fa"?$fn():t==="ar"?Bfn():t==="es"?Pfn():t==="hi"?Ffn():Lfn()}),Hfn=()=>"Editing",qfn=()=>"正在编辑",Ufn=()=>"در حال ویرایش",Gfn=()=>"قيد التعديل",Vfn=()=>"Editando",Kfn=()=>"संपादित हो रहा है",Wfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qfn():t==="fa"?Ufn():t==="ar"?Gfn():t==="es"?Vfn():t==="hi"?Kfn():Hfn()}),Qfn=()=>"Failed",Xfn=()=>"失败",Yfn=()=>"ناموفق",Zfn=()=>"فشل",Jfn=()=>"Error",edn=()=>"विफल",tdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xfn():t==="fa"?Yfn():t==="ar"?Zfn():t==="es"?Jfn():t==="hi"?edn():Qfn()}),ndn=()=>"Idle",rdn=()=>"空闲",sdn=()=>"بی‌کار",idn=()=>"خامل",adn=()=>"Inactivo",odn=()=>"निष्क्रिय",cdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rdn():t==="fa"?sdn():t==="ar"?idn():t==="es"?adn():t==="hi"?odn():ndn()}),ldn=()=>"Running",udn=()=>"运行中",_dn=()=>"در حال اجرا",fdn=()=>"قيد التشغيل",ddn=()=>"En ejecución",hdn=()=>"चल रहा है",pdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?udn():t==="fa"?_dn():t==="ar"?fdn():t==="es"?ddn():t==="hi"?hdn():ldn()}),mdn=()=>"Starting",gdn=()=>"正在启动",vdn=()=>"در حال آغاز",bdn=()=>"جارٍ البدء",ydn=()=>"Iniciando",xdn=()=>"शुरू हो रहा है",wdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gdn():t==="fa"?vdn():t==="ar"?bdn():t==="es"?ydn():t==="hi"?xdn():mdn()}),kdn=()=>"Copying…",Sdn=()=>"正在复制…",Cdn=()=>"در حال کپی…",Edn=()=>"جارٍ النسخ…",Ndn=()=>"Copiando…",zdn=()=>"कॉपी हो रहा है…",jdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sdn():t==="fa"?Cdn():t==="ar"?Edn():t==="es"?Ndn():t==="hi"?zdn():kdn()}),Adn=()=>"Finalizing…",Tdn=()=>"正在完成…",Rdn=()=>"در حال نهایی‌سازی…",Mdn=()=>"جارٍ الإنهاء…",Odn=()=>"Finalizando…",Ddn=()=>"अंतिम रूप दिया जा रहा है…",Ldn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tdn():t==="fa"?Rdn():t==="ar"?Mdn():t==="es"?Odn():t==="hi"?Ddn():Adn()}),Idn=e=>`${e==null?void 0:e.size} free at target`,$dn=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,Bdn=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,Pdn=e=>`${e==null?void 0:e.size} متاح في الوجهة`,Fdn=e=>`${e==null?void 0:e.size} libres en el destino`,Hdn=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,qdn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$dn(e):t==="fa"?Bdn(e):t==="ar"?Pdn(e):t==="es"?Fdn(e):t==="hi"?Hdn(e):Idn(e)}),Udn=e=>`Move all orx data to: ${e==null?void 0:e.path} -The store is copied to the new location and activated there. Active runs or chats will block the move.`,Sdn=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,Gdn=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,Cdn=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,Vdn=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,Edn=e=>`نقل كل بيانات orx إلى: +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,Kdn=e=>`نقل كل بيانات orx إلى: ${e==null?void 0:e.path} -يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,Ndn=e=>`¿Mover todos los datos de orx a esta ubicación? +يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,Wdn=e=>`¿Mover todos los datos de orx a esta ubicación? ${e==null?void 0:e.path} -El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,zdn=e=>`सारा orx डेटा यहाँ ले जाएं: +El almacén se copia a la nueva ubicación y se activa allí. Si hay ejecuciones o chats activos, no se podrá mover.`,Qdn=e=>`सारा orx डेटा यहाँ ले जाएं: ${e==null?void 0:e.path} -स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,jdn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sdn(e):t==="fa"?Cdn(e):t==="ar"?Edn(e):t==="es"?Ndn(e):t==="hi"?zdn(e):kdn(e)}),Adn=()=>"Move data here",Tdn=()=>"将数据移动到此处",Rdn=()=>"انتقال داده به اینجا",Mdn=()=>"نقل البيانات إلى هنا",Odn=()=>"Mover los datos aquí",Ddn=()=>"डेटा यहाँ ले जाएं",Ldn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tdn():t==="fa"?Rdn():t==="ar"?Mdn():t==="es"?Odn():t==="hi"?Ddn():Adn()}),Idn=()=>"Moving…",$dn=()=>"正在移动…",Bdn=()=>"در حال جابه‌جایی…",Pdn=()=>"جارٍ النقل…",Fdn=()=>"Moviendo…",Hdn=()=>"स्थानांतरित हो रहा है…",qdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$dn():t==="fa"?Bdn():t==="ar"?Pdn():t==="es"?Fdn():t==="hi"?Hdn():Idn()}),Udn=()=>"Preparing…",Gdn=()=>"正在准备…",Vdn=()=>"در حال آماده‌سازی…",Kdn=()=>"جارٍ التحضير…",Wdn=()=>"Preparando…",Qdn=()=>"तैयार हो रहा है…",Xdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gdn():t==="fa"?Vdn():t==="ar"?Kdn():t==="es"?Wdn():t==="hi"?Qdn():Udn()}),Ydn=()=>" (same disk, instant)",Zdn=()=>"(同一磁盘,可立即完成)",Jdn=()=>" (روی همان دیسک، فوری)",ehn=()=>" (القرص نفسه، فوري)",thn=()=>" (mismo disco, instantáneo)",nhn=()=>" (उसी डिस्क पर, तुरंत)",rhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zdn():t==="fa"?Jdn():t==="ar"?ehn():t==="es"?thn():t==="hi"?nhn():Ydn()}),shn=()=>"default location",ihn=()=>"默认位置",ahn=()=>"محل پیش‌فرض",ohn=()=>"الموقع الافتراضي",chn=()=>"ubicación predeterminada",lhn=()=>"डिफ़ॉल्ट स्थान",uhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ihn():t==="fa"?ahn():t==="ar"?ohn():t==="es"?chn():t==="hi"?lhn():shn()}),_hn=()=>"ORX_DATA_DIR environment variable",fhn=()=>"ORX_DATA_DIR 环境变量",dhn=()=>"متغیر محیطی ORX_DATA_DIR",hhn=()=>"متغيّر البيئة ORX_DATA_DIR",phn=()=>"variable de entorno ORX_DATA_DIR",mhn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",ghn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fhn():t==="fa"?dhn():t==="ar"?hhn():t==="es"?phn():t==="hi"?mhn():_hn()}),vhn=()=>"your saved setting",bhn=()=>"已保存的设置",yhn=()=>"تنظیم ذخیره‌شدهٔ شما",xhn=()=>"إعدادك المحفوظ",whn=()=>"tu ajuste guardado",khn=()=>"आपकी सेव की गई सेटिंग",Shn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bhn():t==="fa"?yhn():t==="ar"?xhn():t==="es"?whn():t==="hi"?khn():vhn()}),Chn=()=>"XDG_DATA_HOME",Ehn=()=>"XDG_DATA_HOME",Nhn=()=>"XDG_DATA_HOME",zhn=()=>"XDG_DATA_HOME",jhn=()=>"XDG_DATA_HOME",Ahn=()=>"XDG_DATA_HOME",Thn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ehn():t==="fa"?Nhn():t==="ar"?zhn():t==="es"?jhn():t==="hi"?Ahn():Chn()}),Rhn=()=>"Verifying…",Mhn=()=>"正在验证…",Ohn=()=>"در حال بررسی…",Dhn=()=>"جارٍ التحقق…",Lhn=()=>"Verificando…",Ihn=()=>"सत्यापित हो रहा है…",$hn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mhn():t==="fa"?Ohn():t==="ar"?Dhn():t==="es"?Lhn():t==="hi"?Ihn():Rhn()}),Bhn=()=>"Loading…",Phn=()=>"正在加载…",Fhn=()=>"در حال بارگیری…",Hhn=()=>"جارٍ التحميل…",qhn=()=>"Cargando…",Uhn=()=>"लोड हो रहा है…",gI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Phn():t==="fa"?Fhn():t==="ar"?Hhn():t==="es"?qhn():t==="hi"?Uhn():Bhn()}),Ghn=()=>"This sub-agent is no longer available.",Vhn=()=>"此子智能体已不可用。",Khn=()=>"این عامل فرعی دیگر در دسترس نیست.",Whn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",Qhn=()=>"Este subagente ya no está disponible.",Xhn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",Yhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vhn():t==="fa"?Khn():t==="ar"?Whn():t==="es"?Qhn():t==="hi"?Xhn():Ghn()}),Zhn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Jhn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,epn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,tpn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,npn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,rpn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,spn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jhn(e):t==="fa"?epn(e):t==="ar"?tpn(e):t==="es"?npn(e):t==="hi"?rpn(e):Zhn(e)}),ipn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,apn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,opn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,cpn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,lpn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,upn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,_pn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?apn(e):t==="fa"?opn(e):t==="ar"?cpn(e):t==="es"?lpn(e):t==="hi"?upn(e):ipn(e)}),fpn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",dpn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",hpn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",ppn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",mpn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",gpn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",vpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpn():t==="fa"?hpn():t==="ar"?ppn():t==="es"?mpn():t==="hi"?gpn():fpn()}),bpn=()=>", a repo for training a mini-GPT from scratch.",ypn=()=>",一个从零训练迷你 GPT 的仓库。",xpn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",wpn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",kpn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",Spn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",Cpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ypn():t==="fa"?xpn():t==="ar"?wpn():t==="es"?kpn():t==="hi"?Spn():bpn()}),Epn=()=>"Close",Npn=()=>"关闭",zpn=()=>"بستن",jpn=()=>"إغلاق",Apn=()=>"Cerrar",Tpn=()=>"बंद करें",sb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Npn():t==="fa"?zpn():t==="ar"?jpn():t==="es"?Apn():t==="hi"?Tpn():Epn()}),Rpn=()=>"Create a new project",Mpn=()=>"新建项目",Opn=()=>"ایجاد پروژهٔ جدید",Dpn=()=>"إنشاء مشروع جديد",Lpn=()=>"Crear un proyecto nuevo",Ipn=()=>"नया प्रोजेक्ट बनाएं",$pn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mpn():t==="fa"?Opn():t==="ar"?Dpn():t==="es"?Lpn():t==="hi"?Ipn():Rpn()}),Bpn=()=>"Demo project",Ppn=()=>"演示项目",Fpn=()=>"پروژهٔ نمایشی",Hpn=()=>"مشروع توضيحي",qpn=()=>"Proyecto de demostración",Upn=()=>"डेमो प्रोजेक्ट",Gpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ppn():t==="fa"?Fpn():t==="ar"?Hpn():t==="es"?qpn():t==="hi"?Upn():Bpn()}),Vpn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Kpn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Wpn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Qpn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Xpn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Ypn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Zpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kpn():t==="fa"?Wpn():t==="ar"?Qpn():t==="es"?Xpn():t==="hi"?Ypn():Vpn()}),Jpn=()=>"nanochat",e0n=()=>"nanochat",t0n=()=>"nanochat",n0n=()=>"nanochat",r0n=()=>"nanochat",s0n=()=>"nanochat",i0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e0n():t==="fa"?t0n():t==="ar"?n0n():t==="es"?r0n():t==="hi"?s0n():Jpn()}),a0n=()=>"Try the demo experiment",o0n=()=>"试试演示实验",c0n=()=>"آزمایش نمایشی را امتحان کنید",l0n=()=>"جرّب التجربة التوضيحية",u0n=()=>"Probar el experimento de demostración",_0n=()=>"डेमो प्रयोग आज़माएं",f0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o0n():t==="fa"?c0n():t==="ar"?l0n():t==="es"?u0n():t==="hi"?_0n():a0n()}),d0n=()=>"Couldn’t save your progress. Try again.",h0n=()=>"无法保存进度。请重试。",p0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",m0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",g0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",v0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",b0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h0n():t==="fa"?p0n():t==="ar"?m0n():t==="es"?g0n():t==="hi"?v0n():d0n()}),y0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",x0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",w0n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",k0n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",S0n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",C0n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",E0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x0n():t==="fa"?w0n():t==="ar"?k0n():t==="es"?S0n():t==="hi"?C0n():y0n()}),N0n=()=>"Welcome to OpenResearch",z0n=()=>"欢迎使用 OpenResearch",j0n=()=>"به OpenResearch خوش آمدید",A0n=()=>"مرحبًا بك في OpenResearch",T0n=()=>"Te damos la bienvenida a OpenResearch",R0n=()=>"OpenResearch में आपका स्वागत है",M0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z0n():t==="fa"?j0n():t==="ar"?A0n():t==="es"?T0n():t==="hi"?R0n():N0n()}),O0n=()=>"All experiments are archived. Turn on Show archived to view them.",D0n=()=>"所有实验均已归档。开启“显示已归档”即可查看。",L0n=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",I0n=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",$0n=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",B0n=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",P0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D0n():t==="fa"?L0n():t==="ar"?I0n():t==="es"?$0n():t==="hi"?B0n():O0n()}),F0n=()=>"Archive ancestors",H0n=()=>"归档祖先节点",q0n=()=>"بایگانی نیاکان",U0n=()=>"أرشفة الأسلاف",G0n=()=>"Archivar antepasados",V0n=()=>"पूर्वजों को संग्रहीत करें",K0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H0n():t==="fa"?q0n():t==="ar"?U0n():t==="es"?G0n():t==="hi"?V0n():F0n()}),W0n=()=>"Archive descendants",Q0n=()=>"归档后代节点",X0n=()=>"بایگانی نوادگان",Y0n=()=>"أرشفة الفروع التابعة",Z0n=()=>"Archivar descendientes",J0n=()=>"वंशजों को संग्रहीत करें",emn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q0n():t==="fa"?X0n():t==="ar"?Y0n():t==="es"?Z0n():t==="hi"?J0n():W0n()}),tmn=()=>"Manage",nmn=()=>"管理",rmn=()=>"مدیریت",smn=()=>"إدارة",imn=()=>"Gestionar",amn=()=>"प्रबंधित करें",omn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nmn():t==="fa"?rmn():t==="ar"?smn():t==="es"?imn():t==="hi"?amn():tmn()}),cmn=e=>`Manage ${e==null?void 0:e.name}`,lmn=e=>`管理 ${e==null?void 0:e.name}`,umn=e=>`مدیریت ${e==null?void 0:e.name}`,_mn=e=>`إدارة ${e==null?void 0:e.name}`,fmn=e=>`Gestionar ${e==null?void 0:e.name}`,dmn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,oj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lmn(e):t==="fa"?umn(e):t==="ar"?_mn(e):t==="es"?fmn(e):t==="hi"?dmn(e):cmn(e)}),hmn=()=>"Archive this experiment",pmn=()=>"归档此实验",mmn=()=>"بایگانی این آزمایش",gmn=()=>"أرشفة هذه التجربة",vmn=()=>"Archivar este experimento",bmn=()=>"इस प्रयोग को संग्रहीत करें",ymn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pmn():t==="fa"?mmn():t==="ar"?gmn():t==="es"?vmn():t==="hi"?bmn():hmn()}),xmn=()=>"Archived",wmn=()=>"已归档",kmn=()=>"بایگانی‌شده",Smn=()=>"مؤرشف",Cmn=()=>"Archivado",Emn=()=>"संग्रहीत",vI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wmn():t==="fa"?kmn():t==="ar"?Smn():t==="es"?Cmn():t==="hi"?Emn():xmn()}),Nmn=e=>`${e==null?void 0:e.count} archived`,zmn=e=>`${e==null?void 0:e.count} 个已归档`,jmn=e=>`${e==null?void 0:e.count} بایگانی‌شده`,Amn=e=>`${e==null?void 0:e.count} مؤرشفة`,Tmn=e=>`${e==null?void 0:e.count} archivados`,Rmn=e=>`${e==null?void 0:e.count} संग्रहीत`,Mmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zmn(e):t==="fa"?jmn(e):t==="ar"?Amn(e):t==="es"?Tmn(e):t==="hi"?Rmn(e):Nmn(e)}),Omn=()=>"Baseline",Dmn=()=>"基线",Lmn=()=>"مبنا",Imn=()=>"الأساس",$mn=()=>"Base",Bmn=()=>"बेसलाइन",Pmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dmn():t==="fa"?Lmn():t==="ar"?Imn():t==="es"?$mn():t==="hi"?Bmn():Omn()}),Fmn=()=>"Experiment",Hmn=()=>"实验",qmn=()=>"آزمایش",Umn=()=>"تجربة",Gmn=()=>"Experimento",Vmn=()=>"प्रयोग",El=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hmn():t==="fa"?qmn():t==="ar"?Umn():t==="es"?Gmn():t==="hi"?Vmn():Fmn()}),Kmn=e=>`${e==null?void 0:e.count} experiments`,Wmn=e=>`${e==null?void 0:e.count} 个实验`,Qmn=e=>`${e==null?void 0:e.count} آزمایش`,Xmn=e=>`التجارب: ${e==null?void 0:e.count}`,Ymn=e=>`${e==null?void 0:e.count} experimentos`,Zmn=e=>`${e==null?void 0:e.count} प्रयोग`,Jmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wmn(e):t==="fa"?Qmn(e):t==="ar"?Xmn(e):t==="es"?Ymn(e):t==="hi"?Zmn(e):Kmn(e)}),egn=()=>"hidden",tgn=()=>"已隐藏",ngn=()=>"پنهان",rgn=()=>"مخفية",sgn=()=>"ocultos",ign=()=>"छिपे हुए",agn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tgn():t==="fa"?ngn():t==="ar"?rgn():t==="es"?sgn():t==="hi"?ign():egn()}),ogn=()=>"1 experiment",cgn=()=>"1 个实验",lgn=()=>"۱ آزمایش",ugn=()=>"تجربة واحدة",_gn=()=>"1 experimento",fgn=()=>"1 प्रयोग",dgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cgn():t==="fa"?lgn():t==="ar"?ugn():t==="es"?_gn():t==="hi"?fgn():ogn()}),hgn=()=>"Restore archived ancestors",pgn=()=>"恢复已归档的祖先节点",mgn=()=>"بازیابی نیاکان بایگانی‌شده",ggn=()=>"استعادة الأسلاف المؤرشفين",vgn=()=>"Restaurar antepasados archivados",bgn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",ygn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pgn():t==="fa"?mgn():t==="ar"?ggn():t==="es"?vgn():t==="hi"?bgn():hgn()}),xgn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,wgn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,kgn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,Sgn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,Cgn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,Egn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,Ngn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wgn(e):t==="fa"?kgn(e):t==="ar"?Sgn(e):t==="es"?Cgn(e):t==="hi"?Egn(e):xgn(e)}),zgn=()=>"Restore descendants",jgn=()=>"恢复后代节点",Agn=()=>"بازیابی نوادگان",Tgn=()=>"استعادة الفروع التابعة",Rgn=()=>"Restaurar descendientes",Mgn=()=>"वंशजों को पुनर्स्थापित करें",Ogn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jgn():t==="fa"?Agn():t==="ar"?Tgn():t==="es"?Rgn():t==="hi"?Mgn():zgn()}),Dgn=()=>"Restore this experiment",Lgn=()=>"恢复此实验",Ign=()=>"بازیابی این آزمایش",$gn=()=>"استعادة هذه التجربة",Bgn=()=>"Restaurar este experimento",Pgn=()=>"इस प्रयोग को पुनर्स्थापित करें",bI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lgn():t==="fa"?Ign():t==="ar"?$gn():t==="es"?Bgn():t==="hi"?Pgn():Dgn()}),Fgn=()=>"Running",Hgn=()=>"运行中",qgn=()=>"در حال اجرا",Ugn=()=>"قيد التشغيل",Ggn=()=>"En ejecución",Vgn=()=>"चल रहा है",Kgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hgn():t==="fa"?qgn():t==="ar"?Ugn():t==="es"?Ggn():t==="hi"?Vgn():Fgn()}),Wgn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Qgn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Xgn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Ygn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Zgn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",Jgn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",e1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qgn():t==="fa"?Xgn():t==="ar"?Ygn():t==="es"?Zgn():t==="hi"?Jgn():Wgn()}),t1n=()=>"Ask the agent in chat to create and run your first experiment.",n1n=()=>"在聊天中让智能体创建并运行你的第一个实验。",r1n=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",s1n=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",i1n=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",a1n=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",o1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n1n():t==="fa"?r1n():t==="ar"?s1n():t==="es"?i1n():t==="hi"?a1n():t1n()}),c1n=()=>"Code",l1n=()=>"代码",u1n=()=>"کد",_1n=()=>"الشيفرة",f1n=()=>"Código",d1n=()=>"कोड",h1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l1n():t==="fa"?u1n():t==="ar"?_1n():t==="es"?f1n():t==="hi"?d1n():c1n()}),p1n=()=>"Logs",m1n=()=>"日志",g1n=()=>"گزارش‌ها",v1n=()=>"السجلات",b1n=()=>"Logs",y1n=()=>"लॉग",yI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m1n():t==="fa"?g1n():t==="ar"?v1n():t==="es"?b1n():t==="hi"?y1n():p1n()}),x1n=()=>"No experiments from the current task yet",w1n=()=>"当前任务尚无实验",k1n=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",S1n=()=>"لا توجد تجارب من المهمة الحالية بعد",C1n=()=>"Aún no hay experimentos de la tarea actual",E1n=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",N1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w1n():t==="fa"?k1n():t==="ar"?S1n():t==="es"?C1n():t==="hi"?E1n():x1n()}),z1n=()=>"No experiments yet",j1n=()=>"尚无实验",A1n=()=>"هنوز آزمایشی وجود ندارد",T1n=()=>"لا توجد تجارب بعد",R1n=()=>"Aún no hay experimentos",M1n=()=>"अभी तक कोई प्रयोग नहीं",O1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j1n():t==="fa"?A1n():t==="ar"?T1n():t==="es"?R1n():t==="hi"?M1n():z1n()}),D1n=()=>"no runs",L1n=()=>"无运行",I1n=()=>"بدون اجرا",$1n=()=>"لا عمليات تشغيل",B1n=()=>"sin ejecuciones",P1n=()=>"कोई रन नहीं",F1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L1n():t==="fa"?I1n():t==="ar"?$1n():t==="es"?B1n():t==="hi"?P1n():D1n()}),H1n=()=>"Open logs",q1n=()=>"打开日志",U1n=()=>"باز کردن گزارش‌ها",G1n=()=>"فتح السجلات",V1n=()=>"Abrir logs",K1n=()=>"लॉग खोलें",W1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q1n():t==="fa"?U1n():t==="ar"?G1n():t==="es"?V1n():t==="hi"?K1n():H1n()}),Q1n=()=>"Runs",X1n=()=>"运行",Y1n=()=>"اجراها",Z1n=()=>"عمليات التشغيل",J1n=()=>"Ejecuciones",evn=()=>"रन",tvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X1n():t==="fa"?Y1n():t==="ar"?Z1n():t==="es"?J1n():t==="hi"?evn():Q1n()}),nvn=()=>"Switch to Entire project to see all experiments",rvn=()=>"切换到“整个项目”以查看所有实验",svn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",ivn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",avn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",ovn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",cvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rvn():t==="fa"?svn():t==="ar"?ivn():t==="es"?avn():t==="hi"?ovn():nvn()}),lvn=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,uvn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,_vn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,fvn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,dvn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,hvn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,pvn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uvn(e):t==="fa"?_vn(e):t==="ar"?fvn(e):t==="es"?dvn(e):t==="hi"?hvn(e):lvn(e)}),mvn=()=>"Dismiss",gvn=()=>"关闭",vvn=()=>"بستن",bvn=()=>"تجاهل",yvn=()=>"Descartar",xvn=()=>"खारिज करें",wvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gvn():t==="fa"?vvn():t==="ar"?bvn():t==="es"?yvn():t==="hi"?xvn():mvn()}),kvn=()=>"Restart now",Svn=()=>"立即重新启动",Cvn=()=>"هم‌اکنون دوباره راه‌اندازی کن",Evn=()=>"أعد التشغيل الآن",Nvn=()=>"Reiniciar ahora",zvn=()=>"अभी फिर से शुरू करें",xI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Svn():t==="fa"?Cvn():t==="ar"?Evn():t==="es"?Nvn():t==="hi"?zvn():kvn()}),jvn=e=>`Could not restart: ${e==null?void 0:e.error}`,Avn=e=>`无法重新启动:${e==null?void 0:e.error}`,Tvn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,Rvn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Mvn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Ovn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,wI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Avn(e):t==="fa"?Tvn(e):t==="ar"?Rvn(e):t==="es"?Mvn(e):t==="hi"?Ovn(e):jvn(e)}),Dvn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Lvn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Ivn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",$vn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Bvn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",Pvn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",Fvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lvn():t==="fa"?Ivn():t==="ar"?$vn():t==="es"?Bvn():t==="hi"?Pvn():Dvn()}),Hvn=()=>"Restarting…",qvn=()=>"正在重新启动…",Uvn=()=>"در حال راه‌اندازی مجدد…",Gvn=()=>"جارٍ إعادة التشغيل…",Vvn=()=>"Reiniciando…",Kvn=()=>"फिर से शुरू हो रहा है…",kI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qvn():t==="fa"?Uvn():t==="ar"?Gvn():t==="es"?Vvn():t==="hi"?Kvn():Hvn()}),Wvn=()=>"macOS app",Qvn=()=>"macOS 应用",Xvn=()=>"برنامهٔ macOS",Yvn=()=>"تطبيق macOS",Zvn=()=>"App de macOS",Jvn=()=>"macOS ऐप",ebn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qvn():t==="fa"?Xvn():t==="ar"?Yvn():t==="es"?Zvn():t==="hi"?Jvn():Wvn()}),tbn=()=>"Linux app (AppImage)",nbn=()=>"Linux 应用(AppImage)",rbn=()=>"برنامه لینوکس (AppImage)",sbn=()=>"تطبيق Linux ‏(AppImage)",ibn=()=>"Aplicación para Linux (AppImage)",abn=()=>"Linux ऐप (AppImage)",obn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nbn():t==="fa"?rbn():t==="ar"?sbn():t==="es"?ibn():t==="hi"?abn():tbn()}),cbn=()=>"Installed with cargo",lbn=()=>"通过 cargo 安装",ubn=()=>"نصب‌شده با cargo",_bn=()=>"مثبّت عبر cargo",fbn=()=>"Instalado con cargo",dbn=()=>"cargo से इंस्टॉल किया गया",hbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lbn():t==="fa"?ubn():t==="ar"?_bn():t==="es"?fbn():t==="hi"?dbn():cbn()}),pbn=()=>"Installed with Homebrew",mbn=()=>"通过 Homebrew 安装",gbn=()=>"نصب‌شده با Homebrew",vbn=()=>"مثبّت عبر Homebrew",bbn=()=>"Instalado con Homebrew",ybn=()=>"Homebrew से इंस्टॉल किया गया",xbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mbn():t==="fa"?gbn():t==="ar"?vbn():t==="es"?bbn():t==="hi"?ybn():pbn()}),wbn=()=>"Installed with the orx installer",kbn=()=>"通过 orx 安装程序安装",Sbn=()=>"نصب‌شده با نصب‌کنندهٔ orx",Cbn=()=>"مثبّت عبر مُثبّت orx",Ebn=()=>"Instalado con el instalador de orx",Nbn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",zbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kbn():t==="fa"?Sbn():t==="ar"?Cbn():t==="es"?Ebn():t==="hi"?Nbn():wbn()}),jbn=()=>"Managed by Nix",Abn=()=>"由 Nix 管理",Tbn=()=>"مدیریت‌شده با Nix",Rbn=()=>"مُدار بواسطة Nix",Mbn=()=>"Gestionado por Nix",Obn=()=>"Nix द्वारा प्रबंधित",Dbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abn():t==="fa"?Tbn():t==="ar"?Rbn():t==="es"?Mbn():t==="hi"?Obn():jbn()}),Lbn=()=>"Portable orx.exe",Ibn=()=>"便携版 orx.exe",$bn=()=>"orx.exe قابل‌حمل",Bbn=()=>"‏orx.exe المحمول",Pbn=()=>"orx.exe portable",Fbn=()=>"पोर्टेबल orx.exe",Hbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ibn():t==="fa"?$bn():t==="ar"?Bbn():t==="es"?Pbn():t==="hi"?Fbn():Lbn()}),qbn=()=>"Unknown install",Ubn=()=>"未知安装方式",Gbn=()=>"روش نصب نامشخص",Vbn=()=>"تثبيت غير معروف",Kbn=()=>"Instalación desconocida",Wbn=()=>"अज्ञात इंस्टॉल",Qbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ubn():t==="fa"?Gbn():t==="ar"?Vbn():t==="es"?Kbn():t==="hi"?Wbn():qbn()}),Xbn=()=>"Re-run your cargo install to update.",Ybn=()=>"重新运行 cargo 安装命令以更新。",Zbn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",Jbn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",eyn=()=>"Vuelve a ejecutar cargo install para actualizar.",tyn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",nyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ybn():t==="fa"?Zbn():t==="ar"?Jbn():t==="es"?eyn():t==="hi"?tyn():Xbn()}),ryn=()=>"Run brew upgrade to update.",syn=()=>"运行 brew upgrade 以更新。",iyn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",ayn=()=>"نفّذ brew upgrade للتحديث.",oyn=()=>"Ejecuta brew upgrade para actualizar.",cyn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",lyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?syn():t==="fa"?iyn():t==="ar"?ayn():t==="es"?oyn():t==="hi"?cyn():ryn()}),uyn=()=>"Update it through your Nix configuration.",_yn=()=>"通过 Nix 配置进行更新。",fyn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",dyn=()=>"حدّثه عبر إعداد Nix الخاص بك.",hyn=()=>"Actualízalo desde tu configuración de Nix.",pyn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",myn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_yn():t==="fa"?fyn():t==="ar"?dyn():t==="es"?hyn():t==="hi"?pyn():uyn()}),gyn=()=>"Close",vyn=()=>"关闭",byn=()=>"بستن",yyn=()=>"إغلاق",xyn=()=>"Cerrar",wyn=()=>"बंद करें",kyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vyn():t==="fa"?byn():t==="ar"?yyn():t==="es"?xyn():t==="hi"?wyn():gyn()}),Syn=()=>"Maximize",Cyn=()=>"最大化",Eyn=()=>"بزرگ کردن",Nyn=()=>"تكبير",zyn=()=>"Maximizar",jyn=()=>"बड़ा करें",Ayn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cyn():t==="fa"?Eyn():t==="ar"?Nyn():t==="es"?zyn():t==="hi"?jyn():Syn()}),Tyn=()=>"Minimize",Ryn=()=>"最小化",Myn=()=>"کوچک کردن",Oyn=()=>"تصغير",Dyn=()=>"Minimizar",Lyn=()=>"छोटा करें",Iyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ryn():t==="fa"?Myn():t==="ar"?Oyn():t==="es"?Dyn():t==="hi"?Lyn():Tyn()}),$yn=()=>"Restore",Byn=()=>"还原",Pyn=()=>"بازیابی",Fyn=()=>"استعادة",Hyn=()=>"Restaurar",qyn=()=>"पुनर्स्थापित करें",Uyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Byn():t==="fa"?Pyn():t==="ar"?Fyn():t==="es"?Hyn():t==="hi"?qyn():$yn()}),Gyn=()=>"Active Experiments",Vyn=()=>"活跃实验",Kyn=()=>"آزمایش‌های فعال",Wyn=()=>"التجارب النشطة",Qyn=()=>"Experimentos activos",Xyn=()=>"सक्रिय प्रयोग",Yyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vyn():t==="fa"?Kyn():t==="ar"?Wyn():t==="es"?Qyn():t==="hi"?Xyn():Gyn()}),Zyn=()=>"Default compute",Jyn=()=>"默认计算目标",exn=()=>"محاسبات پیش‌فرض",txn=()=>"الحوسبة الافتراضية",nxn=()=>"Cómputo predeterminado",rxn=()=>"डिफ़ॉल्ट कंप्यूट",sxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jyn():t==="fa"?exn():t==="ar"?txn():t==="es"?nxn():t==="hi"?rxn():Zyn()}),ixn=()=>"More tools",axn=()=>"更多工具",oxn=()=>"ابزارهای بیشتر",cxn=()=>"مزيد من الأدوات",lxn=()=>"Más herramientas",uxn=()=>"और टूल",cj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?axn():t==="fa"?oxn():t==="ar"?cxn():t==="es"?lxn():t==="hi"?uxn():ixn()}),_xn=()=>"Terminal",fxn=()=>"终端",dxn=()=>"ترمینال",hxn=()=>"الطرفية",pxn=()=>"Terminal",mxn=()=>"टर्मिनल",ib=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fxn():t==="fa"?dxn():t==="ar"?hxn():t==="es"?pxn():t==="hi"?mxn():_xn()}),gxn=()=>"The terminal disconnected.",vxn=()=>"终端连接已断开。",bxn=()=>"ارتباط ترمینال قطع شد.",yxn=()=>"انقطعت الطرفية.",xxn=()=>"La terminal se desconectó.",wxn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",lj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vxn():t==="fa"?bxn():t==="ar"?yxn():t==="es"?xxn():t==="hi"?wxn():gxn()}),kxn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,Sxn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,Cxn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,Exn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,Nxn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,zxn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,jxn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxn(e):t==="fa"?Cxn(e):t==="ar"?Exn(e):t==="es"?Nxn(e):t==="hi"?zxn(e):kxn(e)}),Axn=()=>"Restart shell",Txn=()=>"重新启动 Shell",Rxn=()=>"راه‌اندازی دوباره پوسته",Mxn=()=>"إعادة تشغيل Shell",Oxn=()=>"Reiniciar shell",Dxn=()=>"शेल फिर से शुरू करें",Lxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Txn():t==="fa"?Rxn():t==="ar"?Mxn():t==="es"?Oxn():t==="hi"?Dxn():Axn()}),Ixn=()=>"This worktree",$xn=()=>"当前工作树",Bxn=()=>"این درخت کاری",Pxn=()=>"شجرة العمل هذه",Fxn=()=>"Este árbol de trabajo",Hxn=()=>"यह वर्कट्री",qxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$xn():t==="fa"?Bxn():t==="ar"?Pxn():t==="es"?Fxn():t==="hi"?Hxn():Ixn()}),Uxn=()=>"Workspace",Gxn=()=>"工作区",Vxn=()=>"فضای کاری",Kxn=()=>"مساحة العمل",Wxn=()=>"Espacio de trabajo",Qxn=()=>"वर्कस्पेस",Cw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gxn():t==="fa"?Vxn():t==="ar"?Kxn():t==="es"?Wxn():t==="hi"?Qxn():Uxn()}),Xxn=e=>`Current worktree · ${e==null?void 0:e.branch}`,Yxn=e=>`当前工作树 · ${e==null?void 0:e.branch}`,Zxn=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,Jxn=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,e2n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,t2n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,n2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yxn(e):t==="fa"?Zxn(e):t==="ar"?Jxn(e):t==="es"?e2n(e):t==="hi"?t2n(e):Xxn(e)}),r2n=e=>`Default branch · ${e==null?void 0:e.branch}`,s2n=e=>`默认分支 · ${e==null?void 0:e.branch}`,i2n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,a2n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,o2n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,c2n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,l2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?s2n(e):t==="fa"?i2n(e):t==="ar"?a2n(e):t==="es"?o2n(e):t==="hi"?c2n(e):r2n(e)}),u2n=e=>`detached at ${e==null?void 0:e.branch}`,_2n=e=>`分离于 ${e==null?void 0:e.branch}`,f2n=e=>`جدا در ${e==null?void 0:e.branch}`,d2n=e=>`منفصل عند ${e==null?void 0:e.branch}`,h2n=e=>`desacoplado en ${e==null?void 0:e.branch}`,p2n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,m2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_2n(e):t==="fa"?f2n(e):t==="ar"?d2n(e):t==="es"?h2n(e):t==="hi"?p2n(e):u2n(e)}),g2n=()=>"Listing truncated.",v2n=()=>"列表已截断。",b2n=()=>"فهرست کوتاه شده است.",y2n=()=>"القائمة مقتطعة.",x2n=()=>"Listado truncado.",w2n=()=>"सूची छोटी की गई।",k2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v2n():t==="fa"?b2n():t==="ar"?y2n():t==="es"?x2n():t==="hi"?w2n():g2n()}),S2n=()=>"Loading…",C2n=()=>"正在加载…",E2n=()=>"در حال بارگیری…",N2n=()=>"جارٍ التحميل…",z2n=()=>"Cargando…",j2n=()=>"लोड हो रहा है…",A2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C2n():t==="fa"?E2n():t==="ar"?N2n():t==="es"?z2n():t==="hi"?j2n():S2n()}),T2n=()=>"No changes yet.",R2n=()=>"尚无更改。",M2n=()=>"هنوز تغییری وجود ندارد.",O2n=()=>"لا توجد تغييرات بعد.",D2n=()=>"Aún no hay cambios.",L2n=()=>"अभी तक कोई बदलाव नहीं।",I2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R2n():t==="fa"?M2n():t==="ar"?O2n():t==="es"?D2n():t==="hi"?L2n():T2n()}),$2n=()=>"No files.",B2n=()=>"没有文件。",P2n=()=>"فایلی وجود ندارد.",F2n=()=>"لا توجد ملفات.",H2n=()=>"No hay archivos.",q2n=()=>"कोई फ़ाइल नहीं।",U2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B2n():t==="fa"?P2n():t==="ar"?F2n():t==="es"?H2n():t==="hi"?q2n():$2n()}),G2n=()=>"Refresh failed:",V2n=()=>"刷新失败:",K2n=()=>"تازه‌سازی ناموفق بود:",W2n=()=>"فشل التحديث:",Q2n=()=>"Error al actualizar:",X2n=()=>"रीफ़्रेश विफल:",Y2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V2n():t==="fa"?K2n():t==="ar"?W2n():t==="es"?Q2n():t==="hi"?X2n():G2n()}),Ae=e=>`⁦${e}⁩`,Ml=e=>`⁨${e}⁩`,ln=e=>new Intl.NumberFormat(E()).format(e),c0="demo_nanochat_v1",Do=e=>e.startsWith("demo_"),ef="chat_demo_nanochat_v1",ay="chat_demo_nanochat_figures_v1",oy="chat_demo_nanochat_literature_v1",Z2n={[ef]:"cpu_end_to_end",[ay]:"figures",[oy]:"literature"},Ew="cpu-apple-silicon-pipeline-results.md",J2n={[ef]:"msg_demo_nanochat_assistant_v1",[ay]:"msg_demo_nanochat_figures_assistant_v1",[oy]:"msg_demo_nanochat_literature_assistant_v1"},uj="Run the Muon matrix LR 2× probe experiment. When it finishes, compare its step-100 and step-200 val_bpb against the baseline and tell me whether doubling the matrix learning rate helps early training.";class Y3 extends Error{constructor(t,r,s){super(t);li(this,"currentVersion");li(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Aa(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function ewn(e){var t;if(e.status!=="running"&&e.status!=="starting")return null;const n=(t=e.backend)==null?void 0:t.monitoringError;return typeof n=="string"&&n?n:null}function SI(e){return[...e].sort((t,r)=>r.createdAt-t.createdAt).map(ewn).find(t=>t!==null)??null}const CI=new WeakMap;async function Di(e){if(!e.ok){const r=await e.text().catch(()=>"");let s=r;try{const i=JSON.parse(r);if(typeof i=="object"&&i!==null&&("error"in i&&typeof i.error=="string"&&(s=i.error),e.status===409&&"code"in i&&i.code==="fileChanged"&&"exists"in i&&typeof i.exists=="boolean")){const a="currentVersion"in i&&typeof i.currentVersion=="string"?i.currentVersion:null;throw new Y3(s,a,i.exists)}}catch(i){if(i instanceof Y3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=CI.get(e);if(t&&!Un(t))throw new DOMException("Workspace changed","AbortError");return n}const Lt=(e,n)=>fetch(e,{signal:n}).then(t=>Di(t));async function Pa(e,n){const t=go(),r=await fetch(e,n);if(!Un(t))throw new DOMException("Workspace changed","AbortError");return CI.set(r,t),r.ok&&fX(e,t),r}const bt=(e,n,t=!1)=>Pa(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>Di(r)),Hc=(e,n)=>Pa(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Di(t)),EI=(e,n)=>Pa(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Di(t)),twn=e=>Lt("/api/projects",e).then(n=>n.projects),nwn=e=>Lt("/api/projects/activity",e).then(n=>n.activity),Z3="agentic",rwn=e=>Lt("/api/settings/ui-state",e),swn=(e,n)=>Lt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),iwn=(e,n,t=!1)=>bt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),awn=(e,n=!1)=>bt("/api/settings/ui-state",{workspace:e},n),own=e=>bt("/api/settings/ui-state",e),cwn=(e,n)=>bt("/api/onboarding/complete",{...e,...n}),lwn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return Lt(`/api/project-path/status${t}`,n)},uwn=()=>bt("/api/project-path/pick").then(e=>e.path),_wn=e=>bt("/api/projects",e),fwn=(e,n)=>Lt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),dwn=e=>Lt("/api/github/account",e),hwn=(e,n)=>Lt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),pwn=(e,n,t)=>Lt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),mwn=(e,n)=>Lt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),gwn=(e,n)=>Hc(`/api/projects/${e}`,n).then(t=>t.project),vwn=e=>bt("/api/projects/starter-prompts/prewarm",e),bwn=(e,n,t,r,s)=>Lt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),ywn=e=>bt(`/api/projects/${e}/open`).then(n=>n.project),NI=e=>Pa(`/api/projects/${e}`,{method:"DELETE"}).then(async n=>{if(!n.ok){const t=await n.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${n.status})`)}uX(e)}),xwn=(e,n)=>Lt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),wwn=(e,n,t)=>Hc(`/api/experiments/${e}/archive`,{direction:n,archived:t}),kwn=(e,n)=>Lt(`/api/projects/${e}/runs`,n).then(t=>t.runs),zI=e=>bt(`/api/runs/${e}/cancel`).then(()=>{}),Swn=(e,n)=>Lt(`/api/runs/${e}/log?offset=${n}`),Cwn=(e,n)=>Lt(`/api/runs/${e}/diff`,n),Ewn=(e,n)=>Lt(`/api/experiments/${e}/diff`,n),f_=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),Nwn=(e,n,t={},r)=>Lt(`/api/projects/${e}/file?${f_(t,new URLSearchParams({path:n}))}`,r),J3=(e,n,t={})=>`/api/projects/${e}/file/raw?${f_(t,new URLSearchParams({path:n}))}`,zwn=(e,n)=>Lt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),jI=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,jwn=(e,n,t,r)=>EI(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),Awn=(e,n,t,r={})=>Hc(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),Twn=(e,n,t={})=>bt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),AI=(e,n,t={})=>bt(`/api/projects/${e}/file/reveal`,{path:n,sessionId:t.sessionId}),Rwn=e=>Lt("/api/latex/engine",e),Mwn=(e,n,t={})=>bt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),Own=e=>Lt("/api/overleaf/settings",e),TI=e=>bt("/api/overleaf/token",{token:e}),Dwn=()=>Pa("/api/overleaf/token",{method:"DELETE"}).then(e=>Di(e)),RI=(e,n={})=>bt("/api/overleaf/session",{session:e,host:n.host}),Lwn=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Di(e)),Iwn=(e={})=>bt("/api/overleaf/session/import",{host:e.host}),$wn=(e,n,t={})=>bt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),Bwn=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${f_(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Di(r)),Pwn=(e,n,t={},r)=>Lt(`/api/projects/${e}/file/overleaf?${f_(t,new URLSearchParams({path:n}))}`,r),Fwn=(e,n,t)=>bt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),Hwn=(e,n,t={})=>Pa(`/api/projects/${e}/file/overleaf?${f_(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Di(r)),qwn=(e,n,t={})=>bt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),Uwn=(e,n,t={},r)=>Lt(`/api/projects/${e}/file/overleaf/status?${f_(t,new URLSearchParams({path:n}))}`,r),Gwn=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${f_(t,new URLSearchParams({path:n}))}`,Vwn=(e,n={},t)=>{const r=f_(n).toString();return Lt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},Kwn=(e,n)=>Lt(`/api/chat/sessions/${e}/worktree`,n),cy=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,Wwn=e=>Lt("/api/settings/hf",e),Qwn=e=>bt("/api/settings/hf",{token:e}),Xwn=e=>Lt("/api/settings/tinker",e),Ywn=e=>bt("/api/settings/tinker",{key:e}),Zwn=e=>Lt("/api/update",e),Jwn=()=>bt("/api/update/apply"),e4n=()=>bt("/api/update/restart"),t4n=e=>bt("/api/update/auto",{enabled:e}),n4n=(e=!1)=>bt("/api/update/install-cli",{force:e}),r4n=e=>Lt("/api/settings/k8s",e),s4n=e=>bt("/api/settings/k8s",e),i4n=e=>Lt("/api/settings/modal",e),a4n=(e,n)=>bt("/api/settings/modal",{tokenId:e,tokenSecret:n}),o4n=e=>Lt("/api/settings/env",e).then(n=>n.vars),MI=(e,n)=>bt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),c4n=e=>Pa(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n)).then(n=>n.vars),l4n=e=>Lt("/api/settings/data-dir",e),u4n=e=>bt("/api/settings/data-dir/validate",{path:e}),_4n=e=>bt("/api/settings/data-dir/move",{path:e}),f4n=e=>Lt("/api/settings/ssh",e),d4n=e=>bt("/api/settings/ssh",e),h4n=e=>bt("/api/settings/ssh/default",{host:e}),p4n=(e,n)=>bt("/api/settings/ssh/preflight",{host:e,container:n}),m4n=e=>Lt("/api/settings/ssh/config",e),g4n=(e,n)=>EI("/api/settings/ssh/config",{content:e,previousContent:n}),v4n=(e,n)=>Lt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),b4n=e=>Lt("/_orx/runtime",e),y4n=e=>Lt("/api/remote/sessions",e).then(n=>n.sessions),x4n=(e,n)=>bt("/api/remote/sessions",{host:e,uiPreferences:n}),w4n=e=>bt("/_orx/install",e),k4n=()=>bt("/_orx/reconnect"),OI=()=>bt("/_orx/disconnect"),S4n=()=>bt("/_orx/start-host"),DI=()=>Lt("/_orx/stop-host"),LI=e=>bt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),C4n=e=>Lt("/api/settings/slurm",e),E4n=e=>bt("/api/settings/slurm",e),N4n=e=>Lt("/api/settings/ray",e),z4n=e=>bt("/api/settings/ray",e),j4n=e=>bt("/api/settings/ray/preflight",{address:e??null}),A4n=(e,n)=>Lt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),T4n=e=>bt("/api/settings/compute/default",e),R4n=e=>Lt("/api/settings/local",e),M4n=e=>Lt("/api/settings/openresearch",e),O4n=(e,n)=>Lt(`/api/projects/${e}/files`,n),D4n=(e,n)=>Pa(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Di(t)),L4n=(e,n,t)=>Hc(`/api/projects/${e}/files`,{path:n,...t}),zf=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,II=512e3,I4n=(e,n)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:n};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:n}),binary:!1,truncated:n}}catch{return{content:"",binary:!0,truncated:n}}},$4n=(e,n,t)=>fetch(zf(e,n),{signal:t,headers:{Range:`bytes=0-${II-1}`}}).then(r=>{var i;if(r.status===404)return null;if(r.status===416&&r.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=Number((i=r.headers.get("content-range"))==null?void 0:i.split("/").pop());return r.arrayBuffer().then(a=>I4n(a,Number.isFinite(s)&&s>a.byteLength))}),B4n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",P4n=(e,n,t)=>fetch(zf(e,n),{signal:t,method:"HEAD"}).then(r=>{if(r.status===404)return null;if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=r.headers.get("x-openresearch-presentation");return{size:Number(r.headers.get("content-length"))||0,presentation:B4n(s)?s:"download"}}),F4n=e=>Lt("/api/settings/profile",e),H4n=e=>Lt("/api/settings/lit-sources",e),q4n=e=>bt("/api/settings/lit-sources",e),U4n=e=>Lt("/api/settings/projects",e),$I=(e,n)=>bt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),G4n=(e,n)=>Lt(`/api/projects/${e}/git`,n),V4n=e=>bt(`/api/projects/${e}/git/init`),K4n=e=>bt(`/api/projects/${e}/github`),W4n=e=>bt(`/api/projects/${e}/github/disable`),Q4n=e=>Lt("/api/settings/telemetry",e),X4n=e=>bt("/api/settings/telemetry",{enabled:e}),Lu=e=>{bt("/api/telemetry/event",e).catch(()=>{})},BI=e=>{bt("/api/telemetry/locale",{locale:e}).catch(()=>{})};function xv(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??t5(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?jS():n,r=t5(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const ab="default";function ly(e,n){var a,o,c;const t=e==null?void 0:e.models.find(u=>u.id===n),r=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,i=s&&r.some(u=>u.id===s)?s:r.some(u=>u.id===ab)?ab:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:i}}const e5="default";function PI(e,n){var r;if((e==null?void 0:e.id)!=="codex")return[];const t=(r=e.models.find(s=>s.id===n))==null?void 0:r.serviceTiers;return t!=null&&t.length?[{id:e5,label:hEt(),description:oEt()},...t]:[]}function ob(e,n,t){var i;if(!e)return t??null;if(e.id!=="codex"||((i=e.models.find(a=>a.id===n))==null?void 0:i.serviceTiers)===void 0)return null;const s=PI(e,n);return s.length===0?e5:t!=null&&s.some(a=>a.id===t)?t:e5}function FI(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=ly(e,n);return r.length===0?ab:t&&r.some(i=>i.id===t)?t:s}const Y4n=e=>Lt("/api/harnesses/setup/commands",e),HI=(e=!1,n=!1,t)=>{const r=new URLSearchParams;e&&r.set("refresh","1"),n&&r.set("retry","1");const s=r.size>0?`?${r.toString()}`:"";return Lt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},Z4n=(e,n,t)=>{const r=new URLSearchParams({...n?{harness:n}:{},...t?{project:t}:{}});return Lt(`/api/skills${r.size?`?${r}`:""}`,e)},J4n=(e,n,t,r)=>Lt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),e3n=e=>Lt("/api/latex-templates",e).then(n=>n.templates),t3n=e=>bt("/api/latex-templates",e).then(n=>n.template),n3n=e=>Pa(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n)),r3n=e=>Lt("/api/user-skills",e),s3n=e=>bt("/api/user-skills",e).then(n=>n.skill),i3n=e=>Pa(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n));function t5(e){const n=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],r=[];for(const s of n.split("-"))/^\d+(\.\d+)?$/.test(s)?r.push(s):(r.length&&t.push(r.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return r.length&&t.push(r.join(".")),t.join(" ")}const a3n=(e,n)=>Lt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),o3n=e=>Lt("/api/chat/native-sessions",e).then(n=>n.chats),c3n=(e,n)=>bt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),l3n=e=>Lt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),u3n=(e,n,t)=>{const r=new URLSearchParams({scope:"sidebar"});return e!=="all"&&r.set("archived",String(e==="archived")),n&&(r.set("beforeUpdatedAt",String(n.updatedAt)),r.set("beforeId",n.id)),Lt(`/api/chat/sessions?${r}`,t)},_3n=(e,n,t={})=>bt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),n5=e=>Pa(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Di(n).then(t=>(sy(e),t))),f3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),d3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),h3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),p3n=e=>bt(`/api/chat/sessions/${e}/side`,{}).then(n=>n.session),m3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),g3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{autonomy:n}).then(t=>t.session),v3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),b3n=(e,n)=>Lt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),y3n=(e,n)=>Pa(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Di(t)),x3n=(e,n)=>bt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),w3n=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,r5=(e,n,t={},r,s,i,a)=>bt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:i,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:a}),k3n=e=>bt(`/api/chat/sessions/${e}/compact`,{}),S3n=(e,n)=>bt(`/api/chat/sessions/${e}/shell`,{command:n}),C3n=(e,n,t,r={})=>bt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),E3n=(e,n,t)=>bt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),N3n=(e,n)=>bt(`/api/chat/sessions/${e}/branch`,{leafId:n}),z3n=e=>bt(`/api/chat/sessions/${e}/interrupt`),j3n=(e,n)=>bt(`/api/chat/sessions/${e}/respond`,n);function Dc(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(E(),{numeric:"always",style:"narrow"});if(n<60)return t.format(-n,"second");const r=Math.floor(n/60);if(r<60)return t.format(-r,"minute");const s=Math.floor(r/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function J0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return MDe({value:ln(n)});const t=Math.floor(n/60);if(t<60)return EDe({value:ln(t)});const r=Math.floor(t/60);return r<24?bDe({hours:ln(r),minutes:ln(t%60)}):fDe({days:ln(Math.floor(r/24)),hours:ln(r%24)})}function Dl(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rLt("/api/local-models",e),R3n=e=>bt("/api/local-models/discover",e),M3n=e=>bt("/api/local-models",e),O3n=e=>bt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),D3n=e=>Pa(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n)),_j=()=>({queryKey:Nt("getHfSettings"),queryFn:({signal:e})=>Wwn(e),staleTime:3e5}),fj=()=>({queryKey:Nt("getTinkerSettings"),queryFn:({signal:e})=>Xwn(e),staleTime:3e5}),dj=()=>({queryKey:Nt("getK8sSettings"),queryFn:({signal:e})=>r4n(e),staleTime:3e4}),hj=()=>({queryKey:Nt("getModalSettings"),queryFn:({signal:e})=>i4n(e),staleTime:3e5}),L3n=()=>({queryKey:Nt("getSlurmSettings"),queryFn:({signal:e})=>C4n(e),staleTime:3e5}),I3n=()=>({queryKey:Nt("getRaySettings"),queryFn:({signal:e})=>N4n(e),staleTime:3e5}),qI=e=>({queryKey:Nt("getComputeSettings",e??null),queryFn:({signal:n})=>A4n(e,n),staleTime:3e4}),$3n=()=>({queryKey:Nt("getLocalMachine"),queryFn:({signal:e})=>R4n(e),staleTime:3e5}),B3n=()=>({queryKey:Nt("getOpenResearchSettings"),queryFn:({signal:e})=>M4n(e),staleTime:3e4}),P3n=()=>({queryKey:Nt("getEnvVars"),queryFn:({signal:e})=>o4n(e),staleTime:3e5}),F3n=()=>({queryKey:Nt("getDataDir"),queryFn:({signal:e})=>l4n(e),staleTime:3e5}),UI=()=>({queryKey:Nt("getSshSettings"),queryFn:({signal:e})=>f4n(e),staleTime:3e4}),H3n=()=>({queryKey:Nt("getSshConfig"),queryFn:({signal:e})=>m4n(e),staleTime:3e5}),pj=e=>({queryKey:Nt("getSshMasterStatus",e),queryFn:({signal:n})=>v4n(e,n),staleTime:5e3}),q3n=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>b4n(e),staleTime:2e3}),U3n=()=>({queryKey:Nt("listRemoteSessions"),queryFn:({signal:e})=>y4n(e),staleTime:3e4}),cb=()=>({queryKey:Nt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>tp(n,t,()=>Zwn(e)),staleTime:3e4}),G3n=()=>({queryKey:Nt("getProfile"),queryFn:({signal:e})=>F4n(e),staleTime:3e5}),V3n=()=>({queryKey:Nt("getLitSources"),queryFn:({signal:e})=>H4n(e),staleTime:3e5}),PS=()=>({queryKey:Nt("getProjectDefaults"),queryFn:({signal:e})=>U4n(e),staleTime:3e5}),K3n=e=>({queryKey:Nt("getProjectGitStatus",e),queryFn:({signal:n})=>G4n(e,n),staleTime:3e4}),W3n=()=>({queryKey:Nt("getTelemetry"),queryFn:({signal:e})=>Q4n(e),staleTime:3e5}),GI=()=>({queryKey:Nt("getHarnessSetupCommands"),queryFn:({signal:e})=>Y4n(e),staleTime:1/0}),r_=()=>({queryKey:Nt("getHarnesses"),queryFn:({signal:e})=>HI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),Q3n=(e,n)=>({queryKey:Nt("getSkills",e??null,n??null),queryFn:({signal:t})=>Z4n(t,e,n),select:t=>t.skills,refetchInterval:t=>{var r;return(r=t.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5}),X3n=(e,n,t)=>({queryKey:Nt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>J4n(e,n,r,t),staleTime:3e5}),Y3n=()=>({queryKey:Nt("listLatexTemplates"),queryFn:({signal:e})=>e3n(e),refetchInterval:3e4,staleTime:3e5}),Z3n=()=>({queryKey:Nt("listUserSkills"),queryFn:({signal:e})=>r3n(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function jf(e=!1,n=!1){const t=r_();if(!e&&!n)return Ze.fetchQuery(t);await Ze.cancelQueries(t);const r=await HI(e,n);return Un(t.queryKey)&&Ze.setQueryData(t.queryKey,r),r}const J3n=()=>({queryKey:Nt("getLocalModels"),queryFn:({signal:e})=>T3n(e),staleTime:3e4}),wv=new Map;function e5n(e,n){let t=wv.get(e);return t||(t=new Set,wv.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&wv.delete(e)}}function t5n(e){var n;(n=wv.get(e.runId))==null||n.forEach(t=>t(e))}const s5=new Set;function em(e){return s5.add(e),()=>{s5.delete(e)}}function bl(e){s5.forEach(n=>n(e))}const i5=new Set;function n5n(e){return i5.add(e),()=>{i5.delete(e)}}function yl(){i5.forEach(e=>e())}const a5=new Set;function r5n(e){return a5.add(e),()=>{a5.delete(e)}}const o5=new Set;function s5n(e){return o5.add(e),()=>{o5.delete(e)}}function i5n(){o5.forEach(e=>e())}function mj(e){a5.forEach(n=>n(e))}const c5=new Set;function VI(e){return c5.add(e),()=>{c5.delete(e)}}function Nw(e){c5.forEach(n=>n(e))}const l5=new Set;function a5n(e){return l5.add(e),()=>{l5.delete(e)}}function gj(e){l5.forEach(n=>n(e))}const u5=new Set;function o5n(e){return u5.add(e),()=>{u5.delete(e)}}function c5n(e){u5.forEach(n=>n(e))}let _5=!0;const f5=new Set;function l5n(e){return f5.add(e),()=>{f5.delete(e)}}function vj(){return _5}function bj(e){e!==_5&&(_5=e,f5.forEach(n=>n()))}const u5n=8e3,_5n=3e3;function f5n(e){const n=T.useRef(e);n.current=e,T.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>bj(!1),u5n)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},_5n)))},c.onopen=()=>{var d,_;r||(window.clearTimeout(s),s=void 0,bj(!0),a&&(bl({type:"reconnected"}),yl(),mj({harness:"*",authState:"unknown"}),(_=(d=n.current).onReconnect)==null||_.call(d)),a=!0)};const u=d=>{try{return JSON.parse(d.data)}catch{return null}};c.addEventListener("resync.required",()=>{var d,_;bl({type:"reconnected"}),yl(),(_=(d=n.current).onReconnect)==null||_.call(d)}),c.addEventListener("run.updated",d=>{const _=u(d);_!=null&&_.run&&(yl(),n.current.onRun(_.run))}),c.addEventListener("experiment.updated",d=>{var p,m;const _=u(d);_!=null&&_.experiment&&(yl(),(m=(p=n.current).onExperiment)==null||m.call(p,_.experiment))}),c.addEventListener("project.updated",d=>{var p,m;const _=u(d);_!=null&&_.project&&(yl(),(m=(p=n.current).onProject)==null||m.call(p,_.project))}),c.addEventListener("files.updated",d=>{var p,m;const _=u(d);_!=null&&_.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,_.projectId))}),c.addEventListener("run.log",d=>{const _=u(d);_!=null&&_.runId&&t5n(_)}),c.addEventListener("chat.session",d=>{const _=u(d);_!=null&&_.session&&(yl(),bl({type:"session",session:_.session}))}),c.addEventListener("chat.session.deleted",d=>{const _=u(d);_!=null&&_.sessionId&&(yl(),bl({type:"sessionDeleted",sessionId:_.sessionId}))}),c.addEventListener("chat.message",d=>{const _=u(d);_!=null&&_.message&&(yl(),bl({type:"message",sessionId:_.sessionId,message:_.message}))}),c.addEventListener("chat.busy",d=>{const _=u(d);_!=null&&_.sessionId&&(yl(),bl({type:"busy",sessionId:_.sessionId,busy:_.busy}))}),c.addEventListener("chat.usage",d=>{const _=u(d);_!=null&&_.sessionId&&_.usage&&bl({type:"usage",sessionId:_.sessionId,usage:_.usage})}),c.addEventListener("chat.queued",d=>{const _=u(d);_!=null&&_.sessionId&&bl({type:"queued",sessionId:_.sessionId,items:_.items??[]})}),c.addEventListener("chat.branch",d=>{const _=u(d);_!=null&&_.sessionId&&bl({type:"branch",sessionId:_.sessionId,activeLeafId:_.activeLeafId??null})}),c.addEventListener("harness.auth",d=>{const _=u(d);_!=null&&_.harness&&_.authState&&mj(_)}),c.addEventListener("harness.catalog",()=>i5n()),c.addEventListener("datadir.move.progress",d=>{const _=u(d);_&&Nw({type:"progress",..._})}),c.addEventListener("datadir.move.done",d=>{const _=u(d);_&&Nw({type:"done",path:_.path,oldPathLeft:_.oldPathLeft})}),c.addEventListener("datadir.move.error",d=>{const _=u(d);_&&Nw({type:"error",error:_.error})}),c.addEventListener("update.status",d=>{const _=u(d);_&&c5n(_)}),c.addEventListener("overleaf.live",d=>{const _=u(d);_!=null&&_.key&&_.status&&gj({type:"live",key:_.key,status:_.status})}),c.addEventListener("overleaf.pulled",d=>{const _=u(d);_!=null&&_.key&&Array.isArray(_.paths)&&gj({type:"pulled",key:_.key,paths:_.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const lb=new Set;function d5n(e){const n=T.useRef(e);n.current=e,T.useEffect(()=>{const t={onRun:r=>n.current.onRun(r),onReconnect:()=>{var r,s;return(s=(r=n.current).onReconnect)==null?void 0:s.call(r)}};return lb.add(t),()=>{lb.delete(t)}},[])}const yj={onRun:e=>lb.forEach(n=>n.onRun(e)),onReconnect:()=>lb.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},pi=e=>({queryKey:Nt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>tp(t,r,async()=>{const s=await a3n(e,n),i=t.getQueryData(r);return s.filter(a=>!Ac.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(c=>c.id===a.id))==null?void 0:o.contextUsage)}})},Km),staleTime:3e4}),KI=()=>({queryKey:Nt("listNativeChats"),queryFn:({signal:e})=>o3n(e),staleTime:0}),h5n=()=>({queryKey:Nt("listAllChatSessions"),queryFn:async({signal:e})=>(await l3n(e)).filter(n=>!Ac.has(n.id)),staleTime:0}),Rc=e=>({queryKey:Nt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var d;const s=t.getQueryData(r),i=await tp(t,r,()=>b3n(e,n),(_,p,m)=>{if(!p)return _;const w=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:Km(_.messages,p.messages,w,!1),queued:m.has("queued")?p.queued:_.queued,activeLeafId:m.has("branch")||w.size?p.activeLeafId:_.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),c=s!==void 0&&i.messages.some(_=>_.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===_.id)))?[]:(a==null?void 0:a.messages.filter(_=>_.id.startsWith("local-")))??[],u=c.some(_=>_.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...c.filter(_=>!i.messages.some(p=>p.id===_.id))],activeLeafId:a&&(u||!((d=a.activeLeafId)!=null&&d.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"});async function p5n(e,n,t){const r=new Map,s=em(i=>{(i.type==="busy"||i.type==="usage")&&r.set(i.sessionId,{...r.get(i.sessionId),...i.type==="busy"?{busy:i.busy}:{contextUsage:i.usage}})});try{const i=await u3n(e,n,t);return t.throwIfAborted(),{...i,sessions:i.sessions.map(a=>({...a,...r.get(a.id)}))}}finally{s()}}const bf="local-",WI="bash";function xj(e,n){const t=e.findIndex(r=>r.id===n.id);if(t>=0){const r=e.slice();return r[t]=n,r}return n.role!=="user"?[...e,n]:[...e.filter(r=>!r.id.startsWith(bf)),n]}function m5n(e,n){switch(n.type){case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,i=n.message.role==="user"&&s!==null&&s.startsWith(bf),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:xj(t,n.message)},activeLeafBySession:r&&!i&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${bf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:n.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,r]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:r.id}}}case"localShell":{const t=e.messagesBySession[n.sessionId]??[],r=t.find(i=>i.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:WI,state:{status:n.error===void 0?"running":"error",input:{command:n.command},error:n.error}}],createdAt:(r==null?void 0:r.createdAt)??Date.now(),parentId:r?r.parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:r?xj(t,s):[...t,s]},activeLeafBySession:r?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.leafId}};case"optimisticUser":{const t=e.messagesBySession[n.sessionId]??[],r=n.text?[{id:"p0",type:"text",text:n.text}]:[];n.attachments.forEach((i,a)=>r.push({id:`img${a}`,type:"image",text:i.url,name:i.name})),n.annotations.forEach((i,a)=>r.push({id:`annotation${a}`,type:"annotation",text:i.text}));const s={id:`${bf}${Date.now()}`,role:"user",parts:r,createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}}}}let QI=0;function XI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Ze.getQueryCache().subscribe(e=>{XI(e)&&QI++});const g5n=e=>Ze.getQueryCache().subscribe(n=>{XI(n)&&e()}),v5n=()=>QI;function b5n(e,n){const t=Ze.getQueryData(pi(e).queryKey)??[],r=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:r},i=new Set(r);n&&i.add(n);for(const a of i){const o=Ze.getQueryData(Rc(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function YI(e,n,t=!1){if(n.type==="busy"){_o(Ze,pi(e).queryKey,n.sessionId),Ze.setQueryData(pi(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=Rc(n.sessionId);if(Ac.has(n.sessionId))return;_o(Ze,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=Ze.getQueryData(r.queryKey);if(t&&!s)return;const i={messagesBySession:s?{[n.sessionId]:s.messages}:{},queuedBySession:s?{[n.sessionId]:s.queued}:{},activeLeafBySession:s?{[n.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=m5n(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};Ze.setQueryData(r.queryKey,o)}function y5n(e,n){const t=!!n&&!Ac.has(n??""),r=ft({...Rc(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(g5n,v5n),i=T.useMemo(()=>b5n(e,n),[e,n,s,r.data]),a=go()[1],o=T.useCallback(c=>{Un(["workspace",a])&&YI(e,c)},[e,a]);return[i,o,r]}const Af=()=>({queryKey:Nt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>tp(n,t,()=>twn(e),Km),staleTime:3e4}),wj=()=>({queryKey:Nt("listProjectActivity"),queryFn:({signal:e})=>nwn(e),staleTime:3e4}),Zm=()=>({queryKey:Nt("getUiState"),queryFn:({signal:e})=>rwn(e),staleTime:3e5}),FS=e=>({queryKey:Nt("getProjectUiState",e),queryFn:({signal:n})=>swn(e,n),staleTime:3e5}),O0=(e="")=>({queryKey:Nt("getProjectPathStatus",e),queryFn:({signal:n})=>lwn(e,n),staleTime:3e4}),ZI=e=>({queryKey:Nt("searchPapers",e),queryFn:({signal:n})=>fwn(e,n),staleTime:3e5}),x5n=()=>({queryKey:Nt("githubAccount"),queryFn:({signal:e})=>dwn(e),staleTime:3e5}),w5n=e=>({queryKey:Nt("githubProjectRepoPreview",e),queryFn:({signal:n})=>hwn(e,n),staleTime:3e4}),kj=(e,n)=>({queryKey:Nt("repoAccess",e,n),queryFn:({signal:t})=>pwn(e,n,t),staleTime:3e4}),d5=e=>({queryKey:Nt("resolvePaper",e),queryFn:({signal:n})=>mwn(e,n),staleTime:36e5}),k5n=(e,n,t,r)=>({queryKey:Nt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>bwn(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),ub=e=>({queryKey:Nt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>tp(t,r,()=>xwn(e,n),Km),staleTime:3e4}),Qu=e=>({queryKey:Nt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>tp(t,r,()=>kwn(e,n),Km),staleTime:3e4});function N1(e,n){if(!e)return;const t=e.find(r=>r.id===n.id);return t&&t.updatedAt>n.updatedAt?e:t?e.map(r=>r.id===n.id?n:r):[...e,n]}function Sj(){const e=go();return f5n({onRun(n){var r;if(!Un(e))return;const t=(r=Ze.getQueryData(Qu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);_o(Ze,Qu(n.projectId).queryKey,n.id),Ze.setQueryData(Qu(n.projectId).queryKey,s=>N1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Sa(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Sa(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),yj.onRun(n)},onExperiment(n){Un(e)&&(_o(Ze,ub(n.projectId).queryKey,n.id),Ze.setQueryData(ub(n.projectId).queryKey,t=>N1(t,n)),Sa(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Sa(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Sa(["getRunDiff"],e,t=>{var r;return((r=Ze.getQueryData(Qu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){Un(e)&&(_o(Ze,Af().queryKey,n.id),Ze.setQueryData(Af().queryKey,t=>N1(t,n)))},onArtifacts(n){Un(e)&&(Sa(yS,e,t=>t.queryKey[3]===n),Sa(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){Un(e)&&(Sa(cX,e),yj.onReconnect())}}),T.useEffect(()=>{let n,t;const r=()=>{t??(t=setTimeout(()=>{t=void 0,Sa(["listSidebarChatSessions"],e)},100))},i=n5n(()=>{n??(n=setTimeout(()=>{n=void 0,Sa(["listProjectActivity"],e)},100))}),a=VI(_=>{_.type==="done"&&Sa(["getDataDir"],e)}),o=em(_=>{if(Un(e)){if((_.type==="session"||_.type==="sessionDeleted")&&r(),_.type==="session"?_o(Ze,pi(_.session.projectId).queryKey,_.session.id):(_.type==="busy"||_.type==="usage")&&_o(Ze,[...e,"listChatSessions"],_.sessionId),(_.type==="message"||_.type==="queued"||_.type==="branch")&&YI("",_.type==="message"?{type:"upsertMessage",sessionId:_.sessionId,message:_.message}:_.type==="queued"?{type:"setQueued",sessionId:_.sessionId,items:_.items}:{type:"activeLeaf",sessionId:_.sessionId,leafId:_.activeLeafId},!0),_.type==="session"&&!Ac.has(_.session.id))Ze.setQueryData(pi(_.session.projectId).queryKey,p=>{if(!p)return;const m=p.find(w=>w.id===_.session.id);return m?N1(p,{..._.session,contextUsage:_.session.contextUsage??m.contextUsage}):[_.session,...p]});else if(_.type==="sessionDeleted")sy(_.sessionId);else if(_.type==="busy"||_.type==="usage"){const p=m=>m.id!==_.sessionId?m:_.type==="busy"?{...m,busy:_.busy}:{...m,contextUsage:_.usage};Ze.setQueriesData({queryKey:[...e,"listChatSessions"]},m=>m==null?void 0:m.map(p)),Ze.setQueriesData({queryKey:[...e,"listSidebarChatSessions"]},m=>m&&{...m,pages:m.pages.map(w=>({...w,sessions:w.sessions.map(p)}))})}}}),c=r5n(()=>{Un(e)&&jf(!0).catch(()=>{})}),u=s5n(()=>{Un(e)&&Ze.fetchQuery({...r_(),staleTime:0}).catch(()=>{})}),d=o5n(_=>{Un(e)&&(_o(Ze,cb().queryKey),Ze.setQueryData(cb().queryKey,_))});return()=>{clearTimeout(n),clearTimeout(t),i(),a(),o(),c(),u(),d()}},[e[1]]),null}const h5=new Set;function JI(e){if(e!==E()){WD(e,{reload:!1}),document.documentElement.lang=e,BI(e);for(const n of h5)n()}}function S5n(e){return h5.add(e),()=>h5.delete(e)}function d_(){return T.useSyncExternalStore(S5n,E,E)}const uy="__ORX_MAC_TITLEBAR__"in window,e$="__ORX_WIN_TITLEBAR__"in window;let Cj="system",Ej="",zw=!1;const Id=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function Nj(e){if(!Id)return null;Id.clearRect(0,0,1,1),Id.fillStyle="transparent",Id.fillStyle=e,Id.fillRect(0,0,1,1);const[n,t,r,s]=Id.getImageData(0,0,1,1).data;return s!==255?null:[n,t,r].map(i=>i.toString(16).padStart(2,"0")).join("")}function C5n(){const e=document.elementsFromPoint(window.innerWidth/2,0),n=e.findIndex(t=>t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY));for(const t of e.slice(Math.max(n,0))){const r=Nj(getComputedStyle(t).backgroundColor);if(r)return r}return Nj(getComputedStyle(document.documentElement).backgroundColor)}function p5(e){e&&(Cj=e),!(!uy||zw)&&(zw=!0,setTimeout(()=>{var r;zw=!1;const n=C5n(),t=`titlebar:${Cj}:${n}`;!n||t===Ej||(Ej=t,(r=window.ipc)==null||r.postMessage(t))},100))}uy&&(new MutationObserver(()=>p5()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>p5()));const E5n="a, button, input, select, textarea, label, summary, [role='button'], [role='tab'], [role='menuitem'], [role='option'], [role='switch'], [role='checkbox'], [contenteditable]:not([contenteditable='false']), [tabindex]:not([tabindex='-1'])",zj=uy?28:e$?32:0;if(zj){document.documentElement.classList.add(uy?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",n=>{var t;e=!1,!(n.button!==0||n.defaultPrevented||n.clientY>=zj)&&(n.target instanceof Element&&n.target.closest(E5n)||(n.detail===2?(t=window.ipc)==null||t.postMessage("titlebar:zoom"):e=!0))}),window.addEventListener("mousemove",n=>{var t;!e||n.buttons!==1||(e=!1,(t=window.ipc)==null||t.postMessage("titlebar:drag"))}),window.addEventListener("mouseup",()=>{e=!1})}const t$="orx:theme";function N5n(){try{const e=localStorage.getItem(t$);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Tf=N5n();const m5=new Set;function z5n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function HS(){document.documentElement.dataset.theme=z5n(Tf),p5(Tf)}function n$(e){Tf=e;try{localStorage.setItem(t$,e)}catch{}HS();for(const n of m5)n()}function j5n(){return Tf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Tf==="system"&&HS()});HS();function A5n(e){return m5.add(e),()=>m5.delete(e)}function r$(){return[T.useSyncExternalStore(A5n,()=>Tf,()=>Tf),n$]}const T5n=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),s$=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),_b="-",jj=[],M5n="arbitrary..",O5n=e=>{const n=L5n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return D5n(a);const o=a.split(_b),c=o[0]===""&&o.length>1?1:0;return i$(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?T5n(u,c):c:u||jj}return t[a]||jj}}},i$=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=i$(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(_b):e.slice(n).join(_b),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?M5n+r:void 0})(),L5n=e=>{const{theme:n,classGroups:t}=e;return I5n(t,n)},I5n=(e,n)=>{const t=s$();for(const r in e){const s=e[r];qS(s,t,r,n)}return t},qS=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){B5n(e,n,t);return}if(typeof e=="function"){P5n(e,n,t,r);return}F5n(e,n,t,r)},B5n=(e,n,t)=>{const r=e===""?n:a$(n,e);r.classGroupId=t},P5n=(e,n,t,r)=>{if(H5n(e)){qS(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(R5n(t,e))},F5n=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(_b),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,q5n=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(i,a)=>{t[i]=a,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(i){let a=t[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in t?t[i]=a:s(i,a)}}},g5="!",Aj=":",U5n=[],Tj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),G5n=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const d=s.length;for(let k=0;kc?u-c:void 0;return Tj(i,m,p,w)};if(n){const s=n+Aj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Tj(U5n,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},V5n=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let i=0;i0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},K5n=e=>({cache:q5n(e.cacheSize),parseClassName:G5n(e),sortModifiers:V5n(e),postfixLookupClassGroupIds:W5n(e),...O5n(e)}),W5n=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=n,o=[],c=e.trim().split(Q5n);let u="";for(let d=c.length-1;d>=0;d-=1){const _=c[d],{isExternal:p,modifiers:m,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:v}=t(_);if(p){u=_+(u.length>0?" "+u:u);continue}let y=!!v,x;if(y){const A=k.substring(0,v);x=r(A);const j=x&&a[x]?r(k):void 0;j&&j!==x&&(x=j,y=!1)}else x=r(k);if(!x){if(!y){u=_+(u.length>0?" "+u:u);continue}if(x=r(k),!x){u=_+(u.length>0?" "+u:u);continue}y=!1}const b=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=w?b+g5:b,N=C+x;if(o.indexOf(N)>-1)continue;o.push(N);const z=s(x,y);for(let A=0;A0?" "+u:u)}return u},Y5n=(...e)=>{let n=0,t,r,s="";for(;n{if(typeof e=="string")return e;let n,t="";for(let r=0;r{let t,r,s,i;const a=c=>{const u=n.reduce((d,_)=>_(d),e());return t=K5n(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const d=X5n(c,t);return s(c,d),d};return i=a,(...c)=>i(Y5n(...c))},Z5n=[],Ds=e=>{const n=t=>t[e]||Z5n;return n.isThemeGetter=!0,n},c$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,l$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,J5n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ekn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tkn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nkn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rkn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,skn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zu=e=>J5n.test(e),kn=e=>!!e&&!Number.isNaN(Number(e)),hc=e=>!!e&&Number.isInteger(Number(e)),jw=e=>e.endsWith("%")&&kn(e.slice(0,-1)),xl=e=>ekn.test(e),u$=()=>!0,ikn=e=>tkn.test(e)&&!nkn.test(e),US=()=>!1,akn=e=>rkn.test(e),okn=e=>skn.test(e),ckn=e=>!vt(e)&&!xt(e),lkn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),ukn=e=>h_(e,d$,US),vt=e=>c$.test(e),F_=e=>h_(e,h$,ikn),Mj=e=>h_(e,vkn,kn),_kn=e=>h_(e,m$,u$),fkn=e=>h_(e,p$,US),Oj=e=>h_(e,_$,US),dkn=e=>h_(e,f$,okn),z1=e=>h_(e,g$,akn),xt=e=>l$.test(e),l0=e=>Kf(e,h$),hkn=e=>Kf(e,p$),Dj=e=>Kf(e,_$),pkn=e=>Kf(e,d$),mkn=e=>Kf(e,f$),j1=e=>Kf(e,g$,!0),gkn=e=>Kf(e,m$,!0),h_=(e,n,t)=>{const r=c$.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Kf=(e,n,t=!1)=>{const r=l$.exec(e);return r?r[1]?n(r[1]):t:!1},_$=e=>e==="position"||e==="percentage",f$=e=>e==="image"||e==="url",d$=e=>e==="length"||e==="size"||e==="bg-size",h$=e=>e==="length",vkn=e=>e==="number",p$=e=>e==="family-name",m$=e=>e==="number"||e==="weight",g$=e=>e==="shadow",Lj=()=>{const e=Ds("color"),n=Ds("font"),t=Ds("text"),r=Ds("font-weight"),s=Ds("tracking"),i=Ds("leading"),a=Ds("breakpoint"),o=Ds("container"),c=Ds("spacing"),u=Ds("radius"),d=Ds("shadow"),_=Ds("inset-shadow"),p=Ds("text-shadow"),m=Ds("drop-shadow"),w=Ds("blur"),k=Ds("perspective"),v=Ds("aspect"),y=Ds("ease"),x=Ds("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),xt,vt],z=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],j=()=>[xt,vt,c],M=()=>[zu,"full","auto",...j()],D=()=>[hc,"none","subgrid",xt,vt],L=()=>["auto",{span:["full",hc,xt,vt]},hc,xt,vt],B=()=>[hc,"auto",xt,vt],U=()=>["auto","min","max","fr",xt,vt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...j()],Z=()=>[zu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],ee=()=>[zu,"screen","full","dvw","lvw","svw","min","max","fit",...j()],$=()=>[zu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],I=()=>[e,xt,vt],F=()=>[...C(),Dj,Oj,{position:[xt,vt]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",pkn,ukn,{size:[xt,vt]}],ie=()=>[jw,l0,F_],oe=()=>["","none","full",u,xt,vt],ce=()=>["",kn,l0,F_],ne=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[kn,jw,Dj,Oj],le=()=>["","none",w,xt,vt],ge=()=>["none",kn,xt,vt],be=()=>["none",kn,xt,vt],Ee=()=>[kn,xt,vt],Fe=()=>[zu,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xl],breakpoint:[xl],color:[u$],container:[xl],"drop-shadow":[xl],ease:["in","out","in-out"],font:[ckn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xl],shadow:[xl],spacing:["px",kn],text:[xl],"text-shadow":[xl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zu,vt,xt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",xt,vt]}],"container-named":[lkn],columns:[{columns:[kn,vt,xt,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[hc,"auto",xt,vt]}],basis:[{basis:[zu,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kn,zu,"auto","initial","none",vt]}],grow:[{grow:["",kn,xt,vt]}],shrink:[{shrink:["",kn,xt,vt]}],order:[{order:[hc,"first","last","none",xt,vt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[o,"screen",...Z()]}],"min-w":[{"min-w":[o,"screen","none",...Z()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",t,l0,F_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,gkn,_kn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jw,vt]}],"font-family":[{font:[hkn,fkn,n]}],"font-features":[{"font-features":[vt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,xt,vt]}],"line-clamp":[{"line-clamp":[kn,"none",xt,Mj]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",xt,vt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xt,vt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[kn,"from-font","auto",xt,F_]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[kn,"auto",xt,vt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[hc,xt,vt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xt,vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xt,vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hc,xt,vt],radial:["",xt,vt],conic:[hc,xt,vt]},mkn,dkn]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kn,xt,vt]}],"outline-w":[{outline:["",kn,l0,F_]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",d,j1,z1]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",_,j1,z1]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[kn,F_]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,j1,z1]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[kn,xt,vt]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[xt,vt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[kn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xt,vt]}],filter:[{filter:["","none",xt,vt]}],blur:[{blur:le()}],brightness:[{brightness:[kn,xt,vt]}],contrast:[{contrast:[kn,xt,vt]}],"drop-shadow":[{"drop-shadow":["","none",m,j1,z1]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",kn,xt,vt]}],"hue-rotate":[{"hue-rotate":[kn,xt,vt]}],invert:[{invert:["",kn,xt,vt]}],saturate:[{saturate:[kn,xt,vt]}],sepia:[{sepia:["",kn,xt,vt]}],"backdrop-filter":[{"backdrop-filter":["","none",xt,vt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[kn,xt,vt]}],"backdrop-contrast":[{"backdrop-contrast":[kn,xt,vt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kn,xt,vt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kn,xt,vt]}],"backdrop-invert":[{"backdrop-invert":["",kn,xt,vt]}],"backdrop-opacity":[{"backdrop-opacity":[kn,xt,vt]}],"backdrop-saturate":[{"backdrop-saturate":[kn,xt,vt]}],"backdrop-sepia":[{"backdrop-sepia":["",kn,xt,vt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xt,vt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kn,"initial",xt,vt]}],ease:[{ease:["linear","initial",y,xt,vt]}],delay:[{delay:[kn,xt,vt]}],animate:[{animate:["none",x,xt,vt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,xt,vt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[xt,vt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],zoom:[{zoom:[hc,xt,vt]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xt,vt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xt,vt]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[kn,l0,F_,Mj]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},bkn=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Vd(e,"cacheSize",n),Vd(e,"prefix",t),Vd(e,"experimentalParseClassName",r),A1(e.theme,i.theme),A1(e.classGroups,i.classGroups),A1(e.conflictingClassGroups,i.conflictingClassGroups),A1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Vd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Vd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),T1(e.theme,s.theme),T1(e.classGroups,s.classGroups),T1(e.conflictingClassGroups,s.conflictingClassGroups),T1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),v5(e,s,"postfixLookupClassGroups"),v5(e,s,"orderSensitiveModifiers"),e),Vd=(e,n,t)=>{t!==void 0&&(e[n]=t)},A1=(e,n)=>{if(n)for(const t in n)Vd(e,t,n[t])},T1=(e,n)=>{if(n)for(const t in n)v5(e,n,t)},v5=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},ykn=(e,...n)=>typeof e=="function"?Rj(Lj,e,...n):Rj(()=>bkn(Lj(),e),...n),xkn=ykn({extend:{theme:{text:["menu"]}}});function $s(...e){return xkn(...e)}const wkn={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Zt({variant:e="default",size:n="default",className:t,...r}){return f.jsx("span",{className:$s("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",wkn[e],t),...r})}const kkn=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Skn={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},Ckn={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function v$(e,n,t,r){return $s(kkn,Skn[e],Ckn[n],t&&"active",r)}function Oe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("button",{className:v$(n,t,e,r),...s})}function $h({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return f.jsx("a",{className:v$(n,t,e,r),...s})}const Ekn=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Nkn={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},zkn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function b$(e,n,t,r,s){return $s(Ekn,Nkn[e],zkn[n],r==="circle"&&"rounded-full",t&&"active",s)}const At=T.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return f.jsx("button",{ref:o,className:b$(s,r,n,t,i),...a})});function rp({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return f.jsx("a",{className:b$(r,t,e,n,s),...i})}const jkn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function qr({variant:e="default",className:n,...t}){return f.jsx("input",{className:$s("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",jkn[e],n),...t})}function on({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return f.jsx("button",{className:$s("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",r),...s})}function Ct({className:e,...n}){return f.jsx("span",{className:$s("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...n})}function Ur({className:e,...n}){return f.jsx("div",{className:$s("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const Akn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function ch({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return f.jsxs("span",{className:$s("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[f.jsx("span",{className:$s("h-[7px] w-[7px] shrink-0 rounded-full bg-current",Akn[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const Tkn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-surface","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function y$(e,n){return $s(Tkn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function GS({checked:e=!1,className:n,children:t,...r}){return f.jsx("button",{role:"switch","aria-checked":e,className:y$(e,n),...r,children:t??f.jsx("span",{})})}function Rkn({checked:e=!1,className:n,...t}){return f.jsx("span",{className:y$(e,n),...t,children:f.jsx("span",{})})}var ni=_D();const Mkn=qm(ni);function Okn(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Dkn=e=>{switch(e){case"success":return $kn;case"info":return Pkn;case"warning":return Bkn;case"error":return Fkn;default:return null}},Lkn=Array(12).fill(0),Ikn=({visible:e,className:n})=>rt.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},rt.createElement("div",{className:"sonner-spinner"},Lkn.map((t,r)=>rt.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),$kn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Bkn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Pkn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Fkn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Hkn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},rt.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),rt.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qkn=()=>{const[e,n]=rt.useState(document.hidden);return rt.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let Ukn=1;const Gkn=100,Ij=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:Ukn++};class Vkn{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-Gkn;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,s=Ij(n),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:t}),{...u,...n,id:s,dismissible:o,title:t}):u):this.addToast({title:t,...r,dismissible:o,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let i=r!==void 0,a;const o=s.then(async u=>{if(a=["resolve",u],rt.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(Wkn(u)&&!u.ok){i=!1;const _=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,w=typeof _=="object"&&!rt.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...w})}else if(u instanceof Error){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,w=typeof _=="object"&&!rt.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:p,...w})}else if(t.success!==void 0){i=!1;const _=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,w=typeof _=="object"&&!rt.isValidElement(_)?_:{message:_};this.create({id:r,type:"success",description:p,...w})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const d=typeof t.error=="function"?await t.error(u):t.error,_=typeof t.description=="function"?await t.description(u):t.description,m=typeof d=="object"&&!rt.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:_,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=Ij(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Ji=new Vkn,Kkn=(e,n)=>Ji.message(e,n),Wkn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Qkn=Kkn,Xkn=()=>Ji.toasts,Ykn=()=>Ji.getActiveToasts(),Zkn=Object.assign(Qkn,{success:Ji.success,info:Ji.info,warning:Ji.warning,error:Ji.error,custom:Ji.custom,message:Ji.message,promise:Ji.promise,dismiss:Ji.dismiss,loading:Ji.loading},{getHistory:Xkn,getToasts:Ykn});Okn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function R1(e){return e.label!==void 0}const Jkn=3,eSn="24px",tSn="16px",$j=4e3,nSn=356,rSn=14,sSn=45,iSn=200;function pc(...e){return e.filter(Boolean).join(" ")}function aSn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const oSn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:d,toast:_,unstyled:p,interacting:m,setHeights:w,visibleToasts:k,heights:v,index:y,toasts:x,expanded:b,removeToast:C,defaultRichColors:N,closeButton:z,style:A,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:L="",duration:B,position:U,gap:H,expandByDefault:Q,classNames:K,icons:Z,closeButtonAriaLabel:ee="Close toast"}=e,[$,I]=rt.useState(null),[F,q]=rt.useState(null),[V,ie]=rt.useState(!1),[oe,ce]=rt.useState(!1),[ne,G]=rt.useState(!1),[ae,le]=rt.useState(!1),[ge,be]=rt.useState(!1),[Ee,Fe]=rt.useState(0),[Ye,Me]=rt.useState(0),Ue=rt.useRef(_.duration||B||$j),dt=rt.useRef(null),wt=rt.useRef(null),Ft=y===0,Ht=y+1<=k,qt=_.type,$e=qt??"default",ot=_.dismissible!==!1,Ce=_.className||"",me=_.descriptionClassName||"",ze=rt.useMemo(()=>v.findIndex(ut=>ut.toastId===_.id)||0,[v,_.id]),He=rt.useMemo(()=>{var ut;return(ut=_.closeButton)!=null?ut:z},[_.closeButton,z]),We=rt.useMemo(()=>_.duration||B||$j,[_.duration,B]),ct=rt.useRef(0),St=rt.useRef(0),Be=rt.useRef(0),un=rt.useRef(null),[Vt,_n]=U.split("-"),Gt=rt.useMemo(()=>v.reduce((ut,fn,yn)=>yn>=ze?ut:ut+fn.height,0),[v,ze]),cn=qkn(),Tt=rt.useMemo(()=>{var ut;return(ut=e.swipeDirections)!=null?ut:aSn(U)},[e.swipeDirections,U]),$t=_.invert||d,Lr=qt==="loading";St.current=rt.useMemo(()=>ze*H+Gt,[ze,Gt]),rt.useEffect(()=>{Ue.current=We},[We]),rt.useEffect(()=>{ie(!0)},[]),rt.useEffect(()=>{const ut=wt.current;if(ut){const fn=ut.getBoundingClientRect().height;return Me(fn),w(yn=>[{toastId:_.id,height:fn,position:_.position},...yn]),()=>w(yn=>yn.filter(Tn=>Tn.toastId!==_.id))}},[w,_.id]),rt.useLayoutEffect(()=>{if(!V)return;const ut=wt.current,fn=ut.style.height;ut.style.height="auto";const yn=ut.getBoundingClientRect().height;ut.style.height=fn,Me(yn),w(Tn=>Tn.find(dn=>dn.toastId===_.id)?Tn.map(dn=>dn.toastId===_.id?{...dn,height:yn}:dn):[{toastId:_.id,height:yn,position:_.position},...Tn])},[V,_.title,_.description,w,_.id,_.jsx,_.action,_.cancel]);const mr=rt.useCallback(()=>{ce(!0),Fe(St.current),w(ut=>ut.filter(fn=>fn.toastId!==_.id)),setTimeout(()=>{C(_)},iSn)},[_,C,w,St]);rt.useEffect(()=>{if(_.promise&&qt==="loading"||_.duration===1/0||_.type==="loading")return;let ut;return b||m||cn?(()=>{if(Be.current{Ue.current!==1/0&&(ct.current=new Date().getTime(),ut=setTimeout(()=>{_.onAutoClose==null||_.onAutoClose.call(_,_),mr()},Ue.current))})(),()=>clearTimeout(ut)},[b,m,_,qt,cn,mr]),rt.useEffect(()=>{_.delete&&(mr(),_.onDismiss==null||_.onDismiss.call(_,_))},[mr,_.delete]);function Gr(){var ut;if(Z!=null&&Z.loading){var fn;return rt.createElement("div",{className:pc(K==null?void 0:K.loader,_==null||(fn=_.classNames)==null?void 0:fn.loader,"sonner-loader"),"data-visible":qt==="loading"},Z.loading)}return rt.createElement(Ikn,{className:pc(K==null?void 0:K.loader,_==null||(ut=_.classNames)==null?void 0:ut.loader),visible:qt==="loading"})}const Jt=_.icon||(Z==null?void 0:Z[qt])||Dkn(qt);var Gn,ls;return rt.createElement("li",{tabIndex:0,ref:wt,className:pc(D,Ce,K==null?void 0:K.toast,_==null||(n=_.classNames)==null?void 0:n.toast,K==null?void 0:K[$e],_==null||(t=_.classNames)==null?void 0:t[$e]),"data-sonner-toast":"","data-rich-colors":(Gn=_.richColors)!=null?Gn:N,"data-styled":!(_.jsx||_.unstyled||p),"data-mounted":V,"data-promise":!!_.promise,"data-swiped":ge,"data-removed":oe,"data-visible":Ht,"data-y-position":Vt,"data-x-position":_n,"data-index":y,"data-front":Ft,"data-swiping":ne,"data-dismissible":ot,"data-type":qt,"data-invert":$t,"data-swipe-out":ae,"data-swipe-direction":F,"data-expanded":!!(b||Q&&V),"data-testid":_.testId,style:{"--index":y,"--toasts-before":y,"--z-index":x.length-y,"--offset":`${oe?Ee:St.current}px`,"--initial-height":Q?"auto":`${Ye}px`,...A,..._.style},onDragEnd:()=>{G(!1),I(null),un.current=null},onPointerDown:ut=>{ut.button!==2&&(Lr||!ot||(dt.current=new Date,Fe(St.current),ut.target.setPointerCapture(ut.pointerId),ut.target.tagName!=="BUTTON"&&(G(!0),un.current={x:ut.clientX,y:ut.clientY})))},onPointerUp:()=>{var ut,fn,yn;if(ae||!ot)return;un.current=null;const Tn=Number(((ut=wt.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Vn=Number(((fn=wt.current)==null?void 0:fn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dn=new Date().getTime()-((yn=dt.current)==null?void 0:yn.getTime()),Dn=$==="x"?Tn:Vn,Kn=Math.abs(Dn)/dn;if(($==="x"?Tt.includes(Tn>0?"right":"left"):Tt.includes(Vn>0?"bottom":"top"))&&(Math.abs(Dn)>=sSn||Kn>.11)){Fe(St.current),_.onDismiss==null||_.onDismiss.call(_,_),q($==="x"?Tn>0?"right":"left":Vn>0?"down":"up"),mr(),le(!0);return}else{var Rt,Pn;(Rt=wt.current)==null||Rt.style.setProperty("--swipe-amount-x","0px"),(Pn=wt.current)==null||Pn.style.setProperty("--swipe-amount-y","0px")}be(!1),G(!1),I(null)},onPointerMove:ut=>{var fn,yn,Tn;if(!un.current||!ot||((fn=window.getSelection())==null?void 0:fn.toString().length)>0)return;const dn=ut.clientY-un.current.y,Dn=ut.clientX-un.current.x;!$&&(Math.abs(Dn)>1||Math.abs(dn)>1)&&I(Math.abs(Dn)>Math.abs(dn)?"x":"y");let Kn={x:0,y:0};const Et=Rt=>1/(1.5+Math.abs(Rt)/20);if($==="y"){if(Tt.includes("top")||Tt.includes("bottom"))if(Tt.includes("top")&&dn<0||Tt.includes("bottom")&&dn>0)Kn.y=dn;else{const Rt=dn*Et(dn);Kn.y=Math.abs(Rt)0)Kn.x=Dn;else{const Rt=Dn*Et(Dn);Kn.x=Math.abs(Rt)0||Math.abs(Kn.y)>0)&&be(!0),(yn=wt.current)==null||yn.style.setProperty("--swipe-amount-x",`${Kn.x}px`),(Tn=wt.current)==null||Tn.style.setProperty("--swipe-amount-y",`${Kn.y}px`)}},He&&!_.jsx&&qt!=="loading"?rt.createElement("button",{"aria-label":ee,"data-disabled":Lr,"data-close-button":!0,onClick:Lr||!ot?()=>{}:()=>{mr(),_.onDismiss==null||_.onDismiss.call(_,_)},className:pc(K==null?void 0:K.closeButton,_==null||(r=_.classNames)==null?void 0:r.closeButton)},(ls=Z==null?void 0:Z.close)!=null?ls:Hkn):null,(qt||_.icon||_.promise)&&_.icon!==null&&((Z==null?void 0:Z[qt])!==null||_.icon)?rt.createElement("div",{"data-icon":"",className:pc(K==null?void 0:K.icon,_==null||(s=_.classNames)==null?void 0:s.icon)},qt==="loading"?_.icon||Gr():_.promise?Gr():null,qt!=="loading"?Jt:null):null,rt.createElement("div",{"data-content":"",className:pc(K==null?void 0:K.content,_==null||(i=_.classNames)==null?void 0:i.content)},rt.createElement("div",{"data-title":"",className:pc(K==null?void 0:K.title,_==null||(a=_.classNames)==null?void 0:a.title)},_.jsx?_.jsx:typeof _.title=="function"?_.title():_.title),_.description?rt.createElement("div",{"data-description":"",className:pc(L,me,K==null?void 0:K.description,_==null||(o=_.classNames)==null?void 0:o.description)},typeof _.description=="function"?_.description():_.description):null),rt.isValidElement(_.cancel)?_.cancel:_.cancel&&R1(_.cancel)?rt.createElement("button",{"data-button":!0,"data-cancel":!0,style:_.cancelButtonStyle||j,onClick:ut=>{R1(_.cancel)&&ot&&(_.cancel.onClick==null||_.cancel.onClick.call(_.cancel,ut),mr())},className:pc(K==null?void 0:K.cancelButton,_==null||(c=_.classNames)==null?void 0:c.cancelButton)},_.cancel.label):null,rt.isValidElement(_.action)?_.action:_.action&&R1(_.action)?rt.createElement("button",{"data-button":!0,"data-action":!0,style:_.actionButtonStyle||M,onClick:ut=>{R1(_.action)&&(_.action.onClick==null||_.action.onClick.call(_.action,ut),!ut.defaultPrevented&&mr())},className:pc(K==null?void 0:K.actionButton,_==null||(u=_.classNames)==null?void 0:u.actionButton)},_.action.label):null)};function Bj(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function cSn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?tSn:eSn;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${a}-${u}`]=o:t[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(o)}),t}const lSn=rt.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:d,mobileOffset:_,theme:p="light",richColors:m,duration:w,style:k,visibleToasts:v=Jkn,toastOptions:y,dir:x=Bj(),gap:b=rSn,icons:C,customAriaLabel:N,containerAriaLabel:z="Notifications"}=n,[A,j]=rt.useState([]),M=rt.useMemo(()=>r?A.filter(ie=>ie.toasterId===r):A.filter(ie=>!ie.toasterId),[A,r]),D=rt.useMemo(()=>Array.from(new Set([i].concat(M.filter(ie=>ie.position).map(ie=>ie.position)))),[M,i]),[L,B]=rt.useState([]),[U,H]=rt.useState(!1),[Q,K]=rt.useState(!1),[Z,ee]=rt.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=rt.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=rt.useRef(null),q=rt.useRef(!1),V=rt.useCallback(ie=>{j(oe=>{var ce;return(ce=oe.find(ne=>ne.id===ie.id))!=null&&ce.delete||Ji.dismiss(ie.id),oe.filter(({id:ne})=>ne!==ie.id)})},[]);return rt.useEffect(()=>Ji.subscribe(ie=>{if(ie.dismiss){requestAnimationFrame(()=>{j(oe=>oe.map(ce=>ce.id===ie.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{Mkn.flushSync(()=>{j(oe=>{const ce=oe.findIndex(ne=>ne.id===ie.id);return ce!==-1?[...oe.slice(0,ce),{...oe[ce],...ie},...oe.slice(ce+1)]:[ie,...oe]})})})}),[]),rt.useEffect(()=>{if(p!=="system"){ee(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const ie=window.matchMedia("(prefers-color-scheme: dark)");try{ie.addEventListener("change",({matches:oe})=>{ee(oe?"dark":"light")})}catch{ie.addListener(({matches:ce})=>{try{ee(ce?"dark":"light")}catch(ne){console.error(ne)}})}},[p]),rt.useEffect(()=>{A.length<=1&&H(!1)},[A]),rt.useEffect(()=>{const ie=oe=>{var ce;if(a.length>0&&a.every(ae=>oe[ae]||oe.code===ae)){var G;H(!0),(G=$.current)==null||G.focus()}oe.code==="Escape"&&(document.activeElement===$.current||(ce=$.current)!=null&&ce.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[a]),rt.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,q.current=!1)}},[$.current]),rt.createElement("section",{ref:t,"aria-label":N??`${z} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ie,oe)=>{var ce;const[ne,G]=ie.split("-");return M.length?rt.createElement("ol",{key:ie,dir:x==="auto"?Bj():x,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":ne,"data-x-position":G,style:{"--front-toast-height":`${((ce=L[0])==null?void 0:ce.height)||0}px`,"--width":`${nSn}px`,"--gap":`${b}px`,...k,...cSn(d,_)},onBlur:ae=>{q.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(q.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||q.current||(q.current=!0,F.current=ae.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ae=>!ae.position&&oe===0||ae.position===ie).map((ae,le)=>{var ge,be;return rt.createElement(oSn,{key:ae.id,icons:C,index:le,toast:ae,defaultRichColors:m,duration:(ge=y==null?void 0:y.duration)!=null?ge:w,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:s,visibleToasts:v,closeButton:(be=y==null?void 0:y.closeButton)!=null?be:c,interacting:Q,position:ie,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:V,toasts:M.filter(Ee=>Ee.position==ae.position),heights:L.filter(Ee=>Ee.position==ae.position),setHeights:B,expandByDefault:o,gap:b,expanded:U,swipeDirections:n.swipeDirections})})):null}))});function uSn(e){const[n]=r$();return f.jsx(lSn,{theme:n,...e})}function tn(e,n,t){Zkn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function Jm({content:e,children:n,className:t,interactive:r=!1}){const s=T.useRef(null),i=T.useRef(null);function a(){const c=s.current,u=i.current;if(!c||!u)return;u.matches(":popover-open")||u.showPopover();const d=c.getBoundingClientRect(),_=u.getBoundingClientRect(),p=Math.max(8,Math.min(d.left+d.width/2-_.width/2,window.innerWidth-_.width-8));u.style.left=`${p}px`,u.style.top=`${Math.max(8,d.top-_.height-6)}px`}function o(){var u;const c=s.current;!(c!=null&&c.matches(":hover, :focus-visible"))&&!(c!=null&&c.querySelector(":focus-visible"))&&((u=i.current)==null||u.hidePopover())}return T.useEffect(()=>{const c=()=>{var u;return(u=i.current)==null?void 0:u.hidePopover()};return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[]),f.jsxs("span",{ref:s,className:$s("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:r?void 0:0,role:r?void 0:"img","aria-label":r?void 0:e,onMouseEnter:a,onMouseLeave:o,onFocus:c=>{c.target.matches(":focus-visible")&&a()},onBlur:o,onKeyDown:c=>{var u;c.key==="Escape"&&((u=i.current)!=null&&u.matches(":popover-open"))&&(c.preventDefault(),c.stopPropagation(),i.current.hidePopover())},children:[n,f.jsx("span",{ref:i,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const _Sn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function sp(e,n,t="[data-initial-focus]"){const r=T.useRef(n);r.current=n,T.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(_Sn)];(s.querySelector(t)??a()[0]??s).focus();const o=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const u=a(),d=u[0],_=u.at(-1);!d||!_?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===d?(c.preventDefault(),_.focus()):!c.shiftKey&&document.activeElement===_&&(c.preventDefault(),d.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function x$({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=T.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?BCt():a7t({count:ln(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?_Ct():S6t({count:ln(n.pendingPermissionCount)})),o>0&&c.push(o===1?CCt():VCt({count:ln(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?RCt():JCt({count:ln(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?vCt():G6t({count:ln(n.activeRunCount)})),sp(a,s),ni.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!r&&u.target===u.currentTarget&&s()},children:f.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[f.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:$6t({host:Ae(e)})}),c.length>0&&f.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[f.jsx("p",{className:"m-0 font-medium",children:sCt()}),f.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>f.jsx("li",{children:u},u))})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx(Oe,{disabled:r,onClick:s,children:Nf()}),f.jsx(Oe,{variant:"danger",disabled:r,onClick:i,children:r?d7t():T6t()})]})]})}),document.body)}/** +स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,Xdn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gdn(e):t==="fa"?Vdn(e):t==="ar"?Kdn(e):t==="es"?Wdn(e):t==="hi"?Qdn(e):Udn(e)}),Ydn=()=>"Move data here",Zdn=()=>"将数据移动到此处",Jdn=()=>"انتقال داده به اینجا",ehn=()=>"نقل البيانات إلى هنا",thn=()=>"Mover los datos aquí",nhn=()=>"डेटा यहाँ ले जाएं",rhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zdn():t==="fa"?Jdn():t==="ar"?ehn():t==="es"?thn():t==="hi"?nhn():Ydn()}),shn=()=>"Moving…",ihn=()=>"正在移动…",ahn=()=>"در حال جابه‌جایی…",ohn=()=>"جارٍ النقل…",chn=()=>"Moviendo…",lhn=()=>"स्थानांतरित हो रहा है…",uhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ihn():t==="fa"?ahn():t==="ar"?ohn():t==="es"?chn():t==="hi"?lhn():shn()}),_hn=()=>"Preparing…",fhn=()=>"正在准备…",dhn=()=>"در حال آماده‌سازی…",hhn=()=>"جارٍ التحضير…",phn=()=>"Preparando…",mhn=()=>"तैयार हो रहा है…",ghn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fhn():t==="fa"?dhn():t==="ar"?hhn():t==="es"?phn():t==="hi"?mhn():_hn()}),vhn=()=>" (same disk, instant)",bhn=()=>"(同一磁盘,可立即完成)",yhn=()=>" (روی همان دیسک، فوری)",xhn=()=>" (القرص نفسه، فوري)",whn=()=>" (mismo disco, instantáneo)",khn=()=>" (उसी डिस्क पर, तुरंत)",Shn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bhn():t==="fa"?yhn():t==="ar"?xhn():t==="es"?whn():t==="hi"?khn():vhn()}),Chn=()=>"default location",Ehn=()=>"默认位置",Nhn=()=>"محل پیش‌فرض",zhn=()=>"الموقع الافتراضي",jhn=()=>"ubicación predeterminada",Ahn=()=>"डिफ़ॉल्ट स्थान",Thn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ehn():t==="fa"?Nhn():t==="ar"?zhn():t==="es"?jhn():t==="hi"?Ahn():Chn()}),Rhn=()=>"ORX_DATA_DIR environment variable",Mhn=()=>"ORX_DATA_DIR 环境变量",Ohn=()=>"متغیر محیطی ORX_DATA_DIR",Dhn=()=>"متغيّر البيئة ORX_DATA_DIR",Lhn=()=>"variable de entorno ORX_DATA_DIR",Ihn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",$hn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mhn():t==="fa"?Ohn():t==="ar"?Dhn():t==="es"?Lhn():t==="hi"?Ihn():Rhn()}),Bhn=()=>"your saved setting",Phn=()=>"已保存的设置",Fhn=()=>"تنظیم ذخیره‌شدهٔ شما",Hhn=()=>"إعدادك المحفوظ",qhn=()=>"tu ajuste guardado",Uhn=()=>"आपकी सेव की गई सेटिंग",Ghn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Phn():t==="fa"?Fhn():t==="ar"?Hhn():t==="es"?qhn():t==="hi"?Uhn():Bhn()}),Vhn=()=>"XDG_DATA_HOME",Khn=()=>"XDG_DATA_HOME",Whn=()=>"XDG_DATA_HOME",Qhn=()=>"XDG_DATA_HOME",Xhn=()=>"XDG_DATA_HOME",Yhn=()=>"XDG_DATA_HOME",Zhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Khn():t==="fa"?Whn():t==="ar"?Qhn():t==="es"?Xhn():t==="hi"?Yhn():Vhn()}),Jhn=()=>"Verifying…",epn=()=>"正在验证…",tpn=()=>"در حال بررسی…",npn=()=>"جارٍ التحقق…",rpn=()=>"Verificando…",spn=()=>"सत्यापित हो रहा है…",ipn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?epn():t==="fa"?tpn():t==="ar"?npn():t==="es"?rpn():t==="hi"?spn():Jhn()}),apn=()=>"Loading…",opn=()=>"正在加载…",cpn=()=>"در حال بارگیری…",lpn=()=>"جارٍ التحميل…",upn=()=>"Cargando…",_pn=()=>"लोड हो रहा है…",gI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?opn():t==="fa"?cpn():t==="ar"?lpn():t==="es"?upn():t==="hi"?_pn():apn()}),fpn=()=>"This sub-agent is no longer available.",dpn=()=>"此子智能体已不可用。",hpn=()=>"این عامل فرعی دیگر در دسترس نیست.",ppn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",mpn=()=>"Este subagente ya no está disponible.",gpn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",vpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpn():t==="fa"?hpn():t==="ar"?ppn():t==="es"?mpn():t==="hi"?gpn():fpn()}),bpn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,ypn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,xpn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,wpn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,kpn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Spn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Cpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ypn(e):t==="fa"?xpn(e):t==="ar"?wpn(e):t==="es"?kpn(e):t==="hi"?Spn(e):bpn(e)}),Epn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Npn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,zpn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,jpn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Apn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,Tpn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Rpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Npn(e):t==="fa"?zpn(e):t==="ar"?jpn(e):t==="es"?Apn(e):t==="hi"?Tpn(e):Epn(e)}),Mpn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Opn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Dpn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",Lpn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Ipn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",$pn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Bpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Opn():t==="fa"?Dpn():t==="ar"?Lpn():t==="es"?Ipn():t==="hi"?$pn():Mpn()}),Ppn=()=>", a repo for training a mini-GPT from scratch.",Fpn=()=>",一个从零训练迷你 GPT 的仓库。",Hpn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",qpn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",Upn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",Gpn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",Vpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fpn():t==="fa"?Hpn():t==="ar"?qpn():t==="es"?Upn():t==="hi"?Gpn():Ppn()}),Kpn=()=>"Close",Wpn=()=>"关闭",Qpn=()=>"بستن",Xpn=()=>"إغلاق",Ypn=()=>"Cerrar",Zpn=()=>"बंद करें",ib=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wpn():t==="fa"?Qpn():t==="ar"?Xpn():t==="es"?Ypn():t==="hi"?Zpn():Kpn()}),Jpn=()=>"Create a new project",e0n=()=>"新建项目",t0n=()=>"ایجاد پروژهٔ جدید",n0n=()=>"إنشاء مشروع جديد",r0n=()=>"Crear un proyecto nuevo",s0n=()=>"नया प्रोजेक्ट बनाएं",i0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e0n():t==="fa"?t0n():t==="ar"?n0n():t==="es"?r0n():t==="hi"?s0n():Jpn()}),a0n=()=>"Demo project",o0n=()=>"演示项目",c0n=()=>"پروژهٔ نمایشی",l0n=()=>"مشروع توضيحي",u0n=()=>"Proyecto de demostración",_0n=()=>"डेमो प्रोजेक्ट",f0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o0n():t==="fa"?c0n():t==="ar"?l0n():t==="es"?u0n():t==="hi"?_0n():a0n()}),d0n=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",h0n=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",p0n=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",m0n=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",g0n=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",v0n=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",b0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h0n():t==="fa"?p0n():t==="ar"?m0n():t==="es"?g0n():t==="hi"?v0n():d0n()}),y0n=()=>"nanochat",x0n=()=>"nanochat",w0n=()=>"nanochat",k0n=()=>"nanochat",S0n=()=>"nanochat",C0n=()=>"nanochat",E0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x0n():t==="fa"?w0n():t==="ar"?k0n():t==="es"?S0n():t==="hi"?C0n():y0n()}),N0n=()=>"Try the demo experiment",z0n=()=>"试试演示实验",j0n=()=>"آزمایش نمایشی را امتحان کنید",A0n=()=>"جرّب التجربة التوضيحية",T0n=()=>"Probar el experimento de demostración",R0n=()=>"डेमो प्रयोग आज़माएं",M0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z0n():t==="fa"?j0n():t==="ar"?A0n():t==="es"?T0n():t==="hi"?R0n():N0n()}),O0n=()=>"Couldn’t save your progress. Try again.",D0n=()=>"无法保存进度。请重试。",L0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",I0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",$0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",B0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",P0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D0n():t==="fa"?L0n():t==="ar"?I0n():t==="es"?$0n():t==="hi"?B0n():O0n()}),F0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",H0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",q0n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",U0n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",G0n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",V0n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",K0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H0n():t==="fa"?q0n():t==="ar"?U0n():t==="es"?G0n():t==="hi"?V0n():F0n()}),W0n=()=>"Welcome to OpenResearch",Q0n=()=>"欢迎使用 OpenResearch",X0n=()=>"به OpenResearch خوش آمدید",Y0n=()=>"مرحبًا بك في OpenResearch",Z0n=()=>"Te damos la bienvenida a OpenResearch",J0n=()=>"OpenResearch में आपका स्वागत है",emn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q0n():t==="fa"?X0n():t==="ar"?Y0n():t==="es"?Z0n():t==="hi"?J0n():W0n()}),tmn=()=>"All experiments are archived. Turn on Show archived to view them.",nmn=()=>"所有实验均已归档。开启“显示已归档”即可查看。",rmn=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",smn=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",imn=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",amn=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",omn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nmn():t==="fa"?rmn():t==="ar"?smn():t==="es"?imn():t==="hi"?amn():tmn()}),cmn=()=>"Archive ancestors",lmn=()=>"归档祖先节点",umn=()=>"بایگانی نیاکان",_mn=()=>"أرشفة الأسلاف",fmn=()=>"Archivar antepasados",dmn=()=>"पूर्वजों को संग्रहीत करें",hmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lmn():t==="fa"?umn():t==="ar"?_mn():t==="es"?fmn():t==="hi"?dmn():cmn()}),pmn=()=>"Archive descendants",mmn=()=>"归档后代节点",gmn=()=>"بایگانی نوادگان",vmn=()=>"أرشفة الفروع التابعة",bmn=()=>"Archivar descendientes",ymn=()=>"वंशजों को संग्रहीत करें",xmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mmn():t==="fa"?gmn():t==="ar"?vmn():t==="es"?bmn():t==="hi"?ymn():pmn()}),wmn=()=>"Manage",kmn=()=>"管理",Smn=()=>"مدیریت",Cmn=()=>"إدارة",Emn=()=>"Gestionar",Nmn=()=>"प्रबंधित करें",zmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kmn():t==="fa"?Smn():t==="ar"?Cmn():t==="es"?Emn():t==="hi"?Nmn():wmn()}),jmn=e=>`Manage ${e==null?void 0:e.name}`,Amn=e=>`管理 ${e==null?void 0:e.name}`,Tmn=e=>`مدیریت ${e==null?void 0:e.name}`,Rmn=e=>`إدارة ${e==null?void 0:e.name}`,Mmn=e=>`Gestionar ${e==null?void 0:e.name}`,Omn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,oj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Amn(e):t==="fa"?Tmn(e):t==="ar"?Rmn(e):t==="es"?Mmn(e):t==="hi"?Omn(e):jmn(e)}),Dmn=()=>"Archive this experiment",Lmn=()=>"归档此实验",Imn=()=>"بایگانی این آزمایش",$mn=()=>"أرشفة هذه التجربة",Bmn=()=>"Archivar este experimento",Pmn=()=>"इस प्रयोग को संग्रहीत करें",Fmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lmn():t==="fa"?Imn():t==="ar"?$mn():t==="es"?Bmn():t==="hi"?Pmn():Dmn()}),Hmn=()=>"Archived",qmn=()=>"已归档",Umn=()=>"بایگانی‌شده",Gmn=()=>"مؤرشف",Vmn=()=>"Archivado",Kmn=()=>"संग्रहीत",vI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qmn():t==="fa"?Umn():t==="ar"?Gmn():t==="es"?Vmn():t==="hi"?Kmn():Hmn()}),Wmn=e=>`${e==null?void 0:e.count} archived`,Qmn=e=>`${e==null?void 0:e.count} 个已归档`,Xmn=e=>`${e==null?void 0:e.count} بایگانی‌شده`,Ymn=e=>`${e==null?void 0:e.count} مؤرشفة`,Zmn=e=>`${e==null?void 0:e.count} archivados`,Jmn=e=>`${e==null?void 0:e.count} संग्रहीत`,egn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qmn(e):t==="fa"?Xmn(e):t==="ar"?Ymn(e):t==="es"?Zmn(e):t==="hi"?Jmn(e):Wmn(e)}),tgn=()=>"Baseline",ngn=()=>"基线",rgn=()=>"مبنا",sgn=()=>"الأساس",ign=()=>"Base",agn=()=>"बेसलाइन",ogn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ngn():t==="fa"?rgn():t==="ar"?sgn():t==="es"?ign():t==="hi"?agn():tgn()}),cgn=()=>"Experiment",lgn=()=>"实验",ugn=()=>"آزمایش",_gn=()=>"تجربة",fgn=()=>"Experimento",dgn=()=>"प्रयोग",El=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lgn():t==="fa"?ugn():t==="ar"?_gn():t==="es"?fgn():t==="hi"?dgn():cgn()}),hgn=e=>`${e==null?void 0:e.count} experiments`,pgn=e=>`${e==null?void 0:e.count} 个实验`,mgn=e=>`${e==null?void 0:e.count} آزمایش`,ggn=e=>`التجارب: ${e==null?void 0:e.count}`,vgn=e=>`${e==null?void 0:e.count} experimentos`,bgn=e=>`${e==null?void 0:e.count} प्रयोग`,ygn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pgn(e):t==="fa"?mgn(e):t==="ar"?ggn(e):t==="es"?vgn(e):t==="hi"?bgn(e):hgn(e)}),xgn=()=>"hidden",wgn=()=>"已隐藏",kgn=()=>"پنهان",Sgn=()=>"مخفية",Cgn=()=>"ocultos",Egn=()=>"छिपे हुए",Ngn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wgn():t==="fa"?kgn():t==="ar"?Sgn():t==="es"?Cgn():t==="hi"?Egn():xgn()}),zgn=()=>"1 experiment",jgn=()=>"1 个实验",Agn=()=>"۱ آزمایش",Tgn=()=>"تجربة واحدة",Rgn=()=>"1 experimento",Mgn=()=>"1 प्रयोग",Ogn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jgn():t==="fa"?Agn():t==="ar"?Tgn():t==="es"?Rgn():t==="hi"?Mgn():zgn()}),Dgn=()=>"Restore archived ancestors",Lgn=()=>"恢复已归档的祖先节点",Ign=()=>"بازیابی نیاکان بایگانی‌شده",$gn=()=>"استعادة الأسلاف المؤرشفين",Bgn=()=>"Restaurar antepasados archivados",Pgn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",Fgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lgn():t==="fa"?Ign():t==="ar"?$gn():t==="es"?Bgn():t==="hi"?Pgn():Dgn()}),Hgn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,qgn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,Ugn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,Ggn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,Vgn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,Kgn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,Wgn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qgn(e):t==="fa"?Ugn(e):t==="ar"?Ggn(e):t==="es"?Vgn(e):t==="hi"?Kgn(e):Hgn(e)}),Qgn=()=>"Restore descendants",Xgn=()=>"恢复后代节点",Ygn=()=>"بازیابی نوادگان",Zgn=()=>"استعادة الفروع التابعة",Jgn=()=>"Restaurar descendientes",e1n=()=>"वंशजों को पुनर्स्थापित करें",t1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xgn():t==="fa"?Ygn():t==="ar"?Zgn():t==="es"?Jgn():t==="hi"?e1n():Qgn()}),n1n=()=>"Restore this experiment",r1n=()=>"恢复此实验",s1n=()=>"بازیابی این آزمایش",i1n=()=>"استعادة هذه التجربة",a1n=()=>"Restaurar este experimento",o1n=()=>"इस प्रयोग को पुनर्स्थापित करें",bI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r1n():t==="fa"?s1n():t==="ar"?i1n():t==="es"?a1n():t==="hi"?o1n():n1n()}),c1n=()=>"Running",l1n=()=>"运行中",u1n=()=>"در حال اجرا",_1n=()=>"قيد التشغيل",f1n=()=>"En ejecución",d1n=()=>"चल रहा है",h1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l1n():t==="fa"?u1n():t==="ar"?_1n():t==="es"?f1n():t==="hi"?d1n():c1n()}),p1n=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",m1n=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",g1n=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",v1n=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",b1n=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",y1n=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",x1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m1n():t==="fa"?g1n():t==="ar"?v1n():t==="es"?b1n():t==="hi"?y1n():p1n()}),w1n=()=>"Ask the agent in chat to create and run your first experiment.",k1n=()=>"在聊天中让智能体创建并运行你的第一个实验。",S1n=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",C1n=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",E1n=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",N1n=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",z1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k1n():t==="fa"?S1n():t==="ar"?C1n():t==="es"?E1n():t==="hi"?N1n():w1n()}),j1n=()=>"Code",A1n=()=>"代码",T1n=()=>"کد",R1n=()=>"الشيفرة",M1n=()=>"Código",O1n=()=>"कोड",D1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A1n():t==="fa"?T1n():t==="ar"?R1n():t==="es"?M1n():t==="hi"?O1n():j1n()}),L1n=()=>"Logs",I1n=()=>"日志",$1n=()=>"گزارش‌ها",B1n=()=>"السجلات",P1n=()=>"Logs",F1n=()=>"लॉग",yI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I1n():t==="fa"?$1n():t==="ar"?B1n():t==="es"?P1n():t==="hi"?F1n():L1n()}),H1n=()=>"No experiments from the current task yet",q1n=()=>"当前任务尚无实验",U1n=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",G1n=()=>"لا توجد تجارب من المهمة الحالية بعد",V1n=()=>"Aún no hay experimentos de la tarea actual",K1n=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",W1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q1n():t==="fa"?U1n():t==="ar"?G1n():t==="es"?V1n():t==="hi"?K1n():H1n()}),Q1n=()=>"No experiments yet",X1n=()=>"尚无实验",Y1n=()=>"هنوز آزمایشی وجود ندارد",Z1n=()=>"لا توجد تجارب بعد",J1n=()=>"Aún no hay experimentos",evn=()=>"अभी तक कोई प्रयोग नहीं",tvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X1n():t==="fa"?Y1n():t==="ar"?Z1n():t==="es"?J1n():t==="hi"?evn():Q1n()}),nvn=()=>"no runs",rvn=()=>"无运行",svn=()=>"بدون اجرا",ivn=()=>"لا عمليات تشغيل",avn=()=>"sin ejecuciones",ovn=()=>"कोई रन नहीं",cvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rvn():t==="fa"?svn():t==="ar"?ivn():t==="es"?avn():t==="hi"?ovn():nvn()}),lvn=()=>"Open logs",uvn=()=>"打开日志",_vn=()=>"باز کردن گزارش‌ها",fvn=()=>"فتح السجلات",dvn=()=>"Abrir logs",hvn=()=>"लॉग खोलें",pvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uvn():t==="fa"?_vn():t==="ar"?fvn():t==="es"?dvn():t==="hi"?hvn():lvn()}),mvn=()=>"Runs",gvn=()=>"运行",vvn=()=>"اجراها",bvn=()=>"عمليات التشغيل",yvn=()=>"Ejecuciones",xvn=()=>"रन",wvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gvn():t==="fa"?vvn():t==="ar"?bvn():t==="es"?yvn():t==="hi"?xvn():mvn()}),kvn=()=>"Switch to Entire project to see all experiments",Svn=()=>"切换到“整个项目”以查看所有实验",Cvn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Evn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Nvn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",zvn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",jvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Svn():t==="fa"?Cvn():t==="ar"?Evn():t==="es"?Nvn():t==="hi"?zvn():kvn()}),Avn=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,Tvn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,Rvn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,Mvn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,Ovn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,Dvn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,Lvn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tvn(e):t==="fa"?Rvn(e):t==="ar"?Mvn(e):t==="es"?Ovn(e):t==="hi"?Dvn(e):Avn(e)}),Ivn=()=>"Dismiss",$vn=()=>"关闭",Bvn=()=>"بستن",Pvn=()=>"تجاهل",Fvn=()=>"Descartar",Hvn=()=>"खारिज करें",qvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$vn():t==="fa"?Bvn():t==="ar"?Pvn():t==="es"?Fvn():t==="hi"?Hvn():Ivn()}),Uvn=()=>"Restart now",Gvn=()=>"立即重新启动",Vvn=()=>"هم‌اکنون دوباره راه‌اندازی کن",Kvn=()=>"أعد التشغيل الآن",Wvn=()=>"Reiniciar ahora",Qvn=()=>"अभी फिर से शुरू करें",xI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gvn():t==="fa"?Vvn():t==="ar"?Kvn():t==="es"?Wvn():t==="hi"?Qvn():Uvn()}),Xvn=e=>`Could not restart: ${e==null?void 0:e.error}`,Yvn=e=>`无法重新启动:${e==null?void 0:e.error}`,Zvn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,Jvn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,ebn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,tbn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,wI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yvn(e):t==="fa"?Zvn(e):t==="ar"?Jvn(e):t==="es"?ebn(e):t==="hi"?tbn(e):Xvn(e)}),nbn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",rbn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",sbn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",ibn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",abn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",obn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",cbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rbn():t==="fa"?sbn():t==="ar"?ibn():t==="es"?abn():t==="hi"?obn():nbn()}),lbn=()=>"Restarting…",ubn=()=>"正在重新启动…",_bn=()=>"در حال راه‌اندازی مجدد…",fbn=()=>"جارٍ إعادة التشغيل…",dbn=()=>"Reiniciando…",hbn=()=>"फिर से शुरू हो रहा है…",kI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ubn():t==="fa"?_bn():t==="ar"?fbn():t==="es"?dbn():t==="hi"?hbn():lbn()}),pbn=()=>"macOS app",mbn=()=>"macOS 应用",gbn=()=>"برنامهٔ macOS",vbn=()=>"تطبيق macOS",bbn=()=>"App de macOS",ybn=()=>"macOS ऐप",xbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mbn():t==="fa"?gbn():t==="ar"?vbn():t==="es"?bbn():t==="hi"?ybn():pbn()}),wbn=()=>"Linux app (AppImage)",kbn=()=>"Linux 应用(AppImage)",Sbn=()=>"برنامه لینوکس (AppImage)",Cbn=()=>"تطبيق Linux ‏(AppImage)",Ebn=()=>"Aplicación para Linux (AppImage)",Nbn=()=>"Linux ऐप (AppImage)",zbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kbn():t==="fa"?Sbn():t==="ar"?Cbn():t==="es"?Ebn():t==="hi"?Nbn():wbn()}),jbn=()=>"Installed with cargo",Abn=()=>"通过 cargo 安装",Tbn=()=>"نصب‌شده با cargo",Rbn=()=>"مثبّت عبر cargo",Mbn=()=>"Instalado con cargo",Obn=()=>"cargo से इंस्टॉल किया गया",Dbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abn():t==="fa"?Tbn():t==="ar"?Rbn():t==="es"?Mbn():t==="hi"?Obn():jbn()}),Lbn=()=>"Installed with Homebrew",Ibn=()=>"通过 Homebrew 安装",$bn=()=>"نصب‌شده با Homebrew",Bbn=()=>"مثبّت عبر Homebrew",Pbn=()=>"Instalado con Homebrew",Fbn=()=>"Homebrew से इंस्टॉल किया गया",Hbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ibn():t==="fa"?$bn():t==="ar"?Bbn():t==="es"?Pbn():t==="hi"?Fbn():Lbn()}),qbn=()=>"Installed with the orx installer",Ubn=()=>"通过 orx 安装程序安装",Gbn=()=>"نصب‌شده با نصب‌کنندهٔ orx",Vbn=()=>"مثبّت عبر مُثبّت orx",Kbn=()=>"Instalado con el instalador de orx",Wbn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",Qbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ubn():t==="fa"?Gbn():t==="ar"?Vbn():t==="es"?Kbn():t==="hi"?Wbn():qbn()}),Xbn=()=>"Managed by Nix",Ybn=()=>"由 Nix 管理",Zbn=()=>"مدیریت‌شده با Nix",Jbn=()=>"مُدار بواسطة Nix",eyn=()=>"Gestionado por Nix",tyn=()=>"Nix द्वारा प्रबंधित",nyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ybn():t==="fa"?Zbn():t==="ar"?Jbn():t==="es"?eyn():t==="hi"?tyn():Xbn()}),ryn=()=>"Portable orx.exe",syn=()=>"便携版 orx.exe",iyn=()=>"orx.exe قابل‌حمل",ayn=()=>"‏orx.exe المحمول",oyn=()=>"orx.exe portable",cyn=()=>"पोर्टेबल orx.exe",lyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?syn():t==="fa"?iyn():t==="ar"?ayn():t==="es"?oyn():t==="hi"?cyn():ryn()}),uyn=()=>"Unknown install",_yn=()=>"未知安装方式",fyn=()=>"روش نصب نامشخص",dyn=()=>"تثبيت غير معروف",hyn=()=>"Instalación desconocida",pyn=()=>"अज्ञात इंस्टॉल",myn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_yn():t==="fa"?fyn():t==="ar"?dyn():t==="es"?hyn():t==="hi"?pyn():uyn()}),gyn=()=>"Re-run your cargo install to update.",vyn=()=>"重新运行 cargo 安装命令以更新。",byn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",yyn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",xyn=()=>"Vuelve a ejecutar cargo install para actualizar.",wyn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",kyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vyn():t==="fa"?byn():t==="ar"?yyn():t==="es"?xyn():t==="hi"?wyn():gyn()}),Syn=()=>"Run brew upgrade to update.",Cyn=()=>"运行 brew upgrade 以更新。",Eyn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Nyn=()=>"نفّذ brew upgrade للتحديث.",zyn=()=>"Ejecuta brew upgrade para actualizar.",jyn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Ayn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cyn():t==="fa"?Eyn():t==="ar"?Nyn():t==="es"?zyn():t==="hi"?jyn():Syn()}),Tyn=()=>"Update it through your Nix configuration.",Ryn=()=>"通过 Nix 配置进行更新。",Myn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Oyn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Dyn=()=>"Actualízalo desde tu configuración de Nix.",Lyn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Iyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ryn():t==="fa"?Myn():t==="ar"?Oyn():t==="es"?Dyn():t==="hi"?Lyn():Tyn()}),$yn=()=>"Close",Byn=()=>"关闭",Pyn=()=>"بستن",Fyn=()=>"إغلاق",Hyn=()=>"Cerrar",qyn=()=>"बंद करें",Uyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Byn():t==="fa"?Pyn():t==="ar"?Fyn():t==="es"?Hyn():t==="hi"?qyn():$yn()}),Gyn=()=>"Maximize",Vyn=()=>"最大化",Kyn=()=>"بزرگ کردن",Wyn=()=>"تكبير",Qyn=()=>"Maximizar",Xyn=()=>"बड़ा करें",Yyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vyn():t==="fa"?Kyn():t==="ar"?Wyn():t==="es"?Qyn():t==="hi"?Xyn():Gyn()}),Zyn=()=>"Minimize",Jyn=()=>"最小化",exn=()=>"کوچک کردن",txn=()=>"تصغير",nxn=()=>"Minimizar",rxn=()=>"छोटा करें",sxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jyn():t==="fa"?exn():t==="ar"?txn():t==="es"?nxn():t==="hi"?rxn():Zyn()}),ixn=()=>"Restore",axn=()=>"还原",oxn=()=>"بازیابی",cxn=()=>"استعادة",lxn=()=>"Restaurar",uxn=()=>"पुनर्स्थापित करें",_xn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?axn():t==="fa"?oxn():t==="ar"?cxn():t==="es"?lxn():t==="hi"?uxn():ixn()}),fxn=()=>"Active Experiments",dxn=()=>"活跃实验",hxn=()=>"آزمایش‌های فعال",pxn=()=>"التجارب النشطة",mxn=()=>"Experimentos activos",gxn=()=>"सक्रिय प्रयोग",vxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dxn():t==="fa"?hxn():t==="ar"?pxn():t==="es"?mxn():t==="hi"?gxn():fxn()}),bxn=()=>"Default compute",yxn=()=>"默认计算目标",xxn=()=>"محاسبات پیش‌فرض",wxn=()=>"الحوسبة الافتراضية",kxn=()=>"Cómputo predeterminado",Sxn=()=>"डिफ़ॉल्ट कंप्यूट",Cxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yxn():t==="fa"?xxn():t==="ar"?wxn():t==="es"?kxn():t==="hi"?Sxn():bxn()}),Exn=()=>"More tools",Nxn=()=>"更多工具",zxn=()=>"ابزارهای بیشتر",jxn=()=>"مزيد من الأدوات",Axn=()=>"Más herramientas",Txn=()=>"और टूल",cj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nxn():t==="fa"?zxn():t==="ar"?jxn():t==="es"?Axn():t==="hi"?Txn():Exn()}),Rxn=()=>"Terminal",Mxn=()=>"终端",Oxn=()=>"ترمینال",Dxn=()=>"الطرفية",Lxn=()=>"Terminal",Ixn=()=>"टर्मिनल",ab=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mxn():t==="fa"?Oxn():t==="ar"?Dxn():t==="es"?Lxn():t==="hi"?Ixn():Rxn()}),$xn=()=>"The terminal disconnected.",Bxn=()=>"终端连接已断开。",Pxn=()=>"ارتباط ترمینال قطع شد.",Fxn=()=>"انقطعت الطرفية.",Hxn=()=>"La terminal se desconectó.",qxn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",lj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bxn():t==="fa"?Pxn():t==="ar"?Fxn():t==="es"?Hxn():t==="hi"?qxn():$xn()}),Uxn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,Gxn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,Vxn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,Kxn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,Wxn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,Qxn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,Xxn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gxn(e):t==="fa"?Vxn(e):t==="ar"?Kxn(e):t==="es"?Wxn(e):t==="hi"?Qxn(e):Uxn(e)}),Yxn=()=>"Restart shell",Zxn=()=>"重新启动 Shell",Jxn=()=>"راه‌اندازی دوباره پوسته",e2n=()=>"إعادة تشغيل Shell",t2n=()=>"Reiniciar shell",n2n=()=>"शेल फिर से शुरू करें",r2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zxn():t==="fa"?Jxn():t==="ar"?e2n():t==="es"?t2n():t==="hi"?n2n():Yxn()}),s2n=()=>"This worktree",i2n=()=>"当前工作树",a2n=()=>"این درخت کاری",o2n=()=>"شجرة العمل هذه",c2n=()=>"Este árbol de trabajo",l2n=()=>"यह वर्कट्री",u2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i2n():t==="fa"?a2n():t==="ar"?o2n():t==="es"?c2n():t==="hi"?l2n():s2n()}),_2n=()=>"Workspace",f2n=()=>"工作区",d2n=()=>"فضای کاری",h2n=()=>"مساحة العمل",p2n=()=>"Espacio de trabajo",m2n=()=>"वर्कस्पेस",Ew=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f2n():t==="fa"?d2n():t==="ar"?h2n():t==="es"?p2n():t==="hi"?m2n():_2n()}),g2n=e=>`Current worktree · ${e==null?void 0:e.branch}`,v2n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,b2n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,y2n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,x2n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,w2n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,k2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?v2n(e):t==="fa"?b2n(e):t==="ar"?y2n(e):t==="es"?x2n(e):t==="hi"?w2n(e):g2n(e)}),S2n=e=>`Default branch · ${e==null?void 0:e.branch}`,C2n=e=>`默认分支 · ${e==null?void 0:e.branch}`,E2n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,N2n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,z2n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,j2n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,A2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?C2n(e):t==="fa"?E2n(e):t==="ar"?N2n(e):t==="es"?z2n(e):t==="hi"?j2n(e):S2n(e)}),T2n=e=>`detached at ${e==null?void 0:e.branch}`,R2n=e=>`分离于 ${e==null?void 0:e.branch}`,M2n=e=>`جدا در ${e==null?void 0:e.branch}`,O2n=e=>`منفصل عند ${e==null?void 0:e.branch}`,D2n=e=>`desacoplado en ${e==null?void 0:e.branch}`,L2n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,I2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?R2n(e):t==="fa"?M2n(e):t==="ar"?O2n(e):t==="es"?D2n(e):t==="hi"?L2n(e):T2n(e)}),$2n=()=>"Listing truncated.",B2n=()=>"列表已截断。",P2n=()=>"فهرست کوتاه شده است.",F2n=()=>"القائمة مقتطعة.",H2n=()=>"Listado truncado.",q2n=()=>"सूची छोटी की गई।",U2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B2n():t==="fa"?P2n():t==="ar"?F2n():t==="es"?H2n():t==="hi"?q2n():$2n()}),G2n=()=>"Loading…",V2n=()=>"正在加载…",K2n=()=>"در حال بارگیری…",W2n=()=>"جارٍ التحميل…",Q2n=()=>"Cargando…",X2n=()=>"लोड हो रहा है…",Y2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V2n():t==="fa"?K2n():t==="ar"?W2n():t==="es"?Q2n():t==="hi"?X2n():G2n()}),Z2n=()=>"No changes yet.",J2n=()=>"尚无更改。",ewn=()=>"هنوز تغییری وجود ندارد.",twn=()=>"لا توجد تغييرات بعد.",nwn=()=>"Aún no hay cambios.",rwn=()=>"अभी तक कोई बदलाव नहीं।",swn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J2n():t==="fa"?ewn():t==="ar"?twn():t==="es"?nwn():t==="hi"?rwn():Z2n()}),iwn=()=>"No files.",awn=()=>"没有文件。",own=()=>"فایلی وجود ندارد.",cwn=()=>"لا توجد ملفات.",lwn=()=>"No hay archivos.",uwn=()=>"कोई फ़ाइल नहीं।",_wn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?awn():t==="fa"?own():t==="ar"?cwn():t==="es"?lwn():t==="hi"?uwn():iwn()}),fwn=()=>"Refresh failed:",dwn=()=>"刷新失败:",hwn=()=>"تازه‌سازی ناموفق بود:",pwn=()=>"فشل التحديث:",mwn=()=>"Error al actualizar:",gwn=()=>"रीफ़्रेश विफल:",vwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dwn():t==="fa"?hwn():t==="ar"?pwn():t==="es"?mwn():t==="hi"?gwn():fwn()}),Ae=e=>`⁦${e}⁩`,Ml=e=>`⁨${e}⁩`,_n=e=>new Intl.NumberFormat(E()).format(e),c0="demo_nanochat_v1",Do=e=>e.startsWith("demo_"),ef="chat_demo_nanochat_v1",oy="chat_demo_nanochat_figures_v1",cy="chat_demo_nanochat_literature_v1",bwn={[ef]:"cpu_end_to_end",[oy]:"figures",[cy]:"literature"},Nw="cpu-apple-silicon-pipeline-results.md",ywn={[ef]:"msg_demo_nanochat_assistant_v1",[oy]:"msg_demo_nanochat_figures_assistant_v1",[cy]:"msg_demo_nanochat_literature_assistant_v1"},uj="Run the Muon matrix LR 2× probe experiment. When it finishes, compare its step-100 and step-200 val_bpb against the baseline and tell me whether doubling the matrix learning rate helps early training.";class Y3 extends Error{constructor(t,r,s){super(t);li(this,"currentVersion");li(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Aa(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function xwn(e){var t;if(e.status!=="running"&&e.status!=="starting")return null;const n=(t=e.backend)==null?void 0:t.monitoringError;return typeof n=="string"&&n?n:null}function SI(e){return[...e].sort((t,r)=>r.createdAt-t.createdAt).map(xwn).find(t=>t!==null)??null}const CI=new WeakMap;async function Di(e){if(!e.ok){const r=await e.text().catch(()=>"");let s=r;try{const i=JSON.parse(r);if(typeof i=="object"&&i!==null&&("error"in i&&typeof i.error=="string"&&(s=i.error),e.status===409&&"code"in i&&i.code==="fileChanged"&&"exists"in i&&typeof i.exists=="boolean")){const a="currentVersion"in i&&typeof i.currentVersion=="string"?i.currentVersion:null;throw new Y3(s,a,i.exists)}}catch(i){if(i instanceof Y3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=CI.get(e);if(t&&!Gn(t))throw new DOMException("Workspace changed","AbortError");return n}const $t=(e,n)=>fetch(e,{signal:n}).then(t=>Di(t));async function Pa(e,n){const t=go(),r=await fetch(e,n);if(!Gn(t))throw new DOMException("Workspace changed","AbortError");return CI.set(r,t),r.ok&&fX(e,t),r}const bt=(e,n,t=!1)=>Pa(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>Di(r)),Hc=(e,n)=>Pa(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Di(t)),EI=(e,n)=>Pa(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Di(t)),wwn=e=>$t("/api/projects",e).then(n=>n.projects),kwn=e=>$t("/api/projects/activity",e).then(n=>n.activity),Z3="agentic",Swn=e=>$t("/api/settings/ui-state",e),Cwn=(e,n)=>$t(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),Ewn=(e,n,t=!1)=>bt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),Nwn=(e,n=!1)=>bt("/api/settings/ui-state",{workspace:e},n),zwn=e=>bt("/api/settings/ui-state",e),jwn=(e,n)=>bt("/api/onboarding/complete",{...e,...n}),Awn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/project-path/status${t}`,n)},Twn=()=>bt("/api/git/install"),Rwn=()=>bt("/api/project-path/pick").then(e=>e.path),Mwn=e=>bt("/api/projects",e),Own=(e,n)=>$t(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Dwn=e=>$t("/api/github/account",e),Lwn=(e,n)=>$t(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),Iwn=(e,n,t)=>$t(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),$wn=(e,n)=>$t(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Bwn=(e,n)=>Hc(`/api/projects/${e}`,n).then(t=>t.project),Pwn=e=>bt("/api/projects/starter-prompts/prewarm",e),Fwn=(e,n,t,r,s)=>$t(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Hwn=e=>bt(`/api/projects/${e}/open`).then(n=>n.project),NI=e=>Pa(`/api/projects/${e}`,{method:"DELETE"}).then(async n=>{if(!n.ok){const t=await n.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${n.status})`)}uX(e)}),qwn=(e,n)=>$t(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),Uwn=(e,n,t)=>Hc(`/api/experiments/${e}/archive`,{direction:n,archived:t}),Gwn=(e,n)=>$t(`/api/projects/${e}/runs`,n).then(t=>t.runs),zI=e=>bt(`/api/runs/${e}/cancel`).then(()=>{}),Vwn=(e,n)=>$t(`/api/runs/${e}/log?offset=${n}`),Kwn=(e,n)=>$t(`/api/runs/${e}/diff`,n),Wwn=(e,n)=>$t(`/api/experiments/${e}/diff`,n),f_=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),Qwn=(e,n,t={},r)=>$t(`/api/projects/${e}/file?${f_(t,new URLSearchParams({path:n}))}`,r),J3=(e,n,t={})=>`/api/projects/${e}/file/raw?${f_(t,new URLSearchParams({path:n}))}`,Xwn=(e,n)=>$t(`/api/files/abs?path=${encodeURIComponent(e)}`,n),jI=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,Ywn=(e,n,t,r)=>EI(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),Zwn=(e,n,t,r={})=>Hc(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),Jwn=(e,n,t={})=>bt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),AI=(e,n,t={})=>bt(`/api/projects/${e}/file/reveal`,{path:n,sessionId:t.sessionId}),e4n=e=>$t("/api/latex/engine",e),t4n=(e,n,t={})=>bt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),n4n=e=>$t("/api/overleaf/settings",e),TI=e=>bt("/api/overleaf/token",{token:e}),r4n=()=>Pa("/api/overleaf/token",{method:"DELETE"}).then(e=>Di(e)),RI=(e,n={})=>bt("/api/overleaf/session",{session:e,host:n.host}),s4n=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Di(e)),i4n=(e={})=>bt("/api/overleaf/session/import",{host:e.host}),a4n=(e,n,t={})=>bt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),o4n=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${f_(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Di(r)),c4n=(e,n,t={},r)=>$t(`/api/projects/${e}/file/overleaf?${f_(t,new URLSearchParams({path:n}))}`,r),l4n=(e,n,t)=>bt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),u4n=(e,n,t={})=>Pa(`/api/projects/${e}/file/overleaf?${f_(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Di(r)),_4n=(e,n,t={})=>bt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),f4n=(e,n,t={},r)=>$t(`/api/projects/${e}/file/overleaf/status?${f_(t,new URLSearchParams({path:n}))}`,r),d4n=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${f_(t,new URLSearchParams({path:n}))}`,h4n=(e,n={},t)=>{const r=f_(n).toString();return $t(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},p4n=(e,n)=>$t(`/api/chat/sessions/${e}/worktree`,n),ly=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,m4n=e=>$t("/api/settings/hf",e),g4n=e=>bt("/api/settings/hf",{token:e}),v4n=e=>$t("/api/settings/tinker",e),b4n=e=>bt("/api/settings/tinker",{key:e}),y4n=e=>$t("/api/update",e),x4n=()=>bt("/api/update/apply"),w4n=()=>bt("/api/update/restart"),k4n=e=>bt("/api/update/auto",{enabled:e}),S4n=(e=!1)=>bt("/api/update/install-cli",{force:e}),C4n=e=>$t("/api/settings/k8s",e),E4n=e=>bt("/api/settings/k8s",e),N4n=e=>$t("/api/settings/modal",e),z4n=(e,n)=>bt("/api/settings/modal",{tokenId:e,tokenSecret:n}),j4n=e=>$t("/api/settings/env",e).then(n=>n.vars),MI=(e,n)=>bt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),A4n=e=>Pa(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n)).then(n=>n.vars),T4n=e=>$t("/api/settings/data-dir",e),R4n=e=>bt("/api/settings/data-dir/validate",{path:e}),M4n=e=>bt("/api/settings/data-dir/move",{path:e}),O4n=e=>$t("/api/settings/ssh",e),D4n=e=>bt("/api/settings/ssh",e),L4n=e=>bt("/api/settings/ssh/default",{host:e}),I4n=(e,n)=>bt("/api/settings/ssh/preflight",{host:e,container:n}),$4n=e=>$t("/api/settings/ssh/config",e),B4n=(e,n)=>EI("/api/settings/ssh/config",{content:e,previousContent:n}),P4n=(e,n)=>$t(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),F4n=e=>$t("/_orx/runtime",e),H4n=e=>$t("/api/remote/sessions",e).then(n=>n.sessions),q4n=(e,n)=>bt("/api/remote/sessions",{host:e,uiPreferences:n}),U4n=e=>bt("/_orx/install",e),G4n=()=>bt("/_orx/reconnect"),OI=()=>bt("/_orx/disconnect"),V4n=()=>bt("/_orx/start-host"),DI=()=>$t("/_orx/stop-host"),LI=e=>bt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),K4n=e=>$t("/api/settings/slurm",e),W4n=e=>bt("/api/settings/slurm",e),Q4n=e=>$t("/api/settings/ray",e),X4n=e=>bt("/api/settings/ray",e),Y4n=e=>bt("/api/settings/ray/preflight",{address:e??null}),Z4n=(e,n)=>$t(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),J4n=e=>bt("/api/settings/compute/default",e),e3n=e=>$t("/api/settings/local",e),t3n=e=>$t("/api/settings/openresearch",e),n3n=(e,n)=>$t(`/api/projects/${e}/files`,n),r3n=(e,n)=>Pa(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Di(t)),s3n=(e,n,t)=>Hc(`/api/projects/${e}/files`,{path:n,...t}),zf=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,II=512e3,i3n=(e,n)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:n};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:n}),binary:!1,truncated:n}}catch{return{content:"",binary:!0,truncated:n}}},a3n=(e,n,t)=>fetch(zf(e,n),{signal:t,headers:{Range:`bytes=0-${II-1}`}}).then(r=>{var i;if(r.status===404)return null;if(r.status===416&&r.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=Number((i=r.headers.get("content-range"))==null?void 0:i.split("/").pop());return r.arrayBuffer().then(a=>i3n(a,Number.isFinite(s)&&s>a.byteLength))}),o3n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",c3n=(e,n,t)=>fetch(zf(e,n),{signal:t,method:"HEAD"}).then(r=>{if(r.status===404)return null;if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=r.headers.get("x-openresearch-presentation");return{size:Number(r.headers.get("content-length"))||0,presentation:o3n(s)?s:"download"}}),l3n=e=>$t("/api/settings/profile",e),u3n=e=>$t("/api/settings/lit-sources",e),_3n=e=>bt("/api/settings/lit-sources",e),f3n=e=>$t("/api/settings/projects",e),$I=(e,n)=>bt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),d3n=(e,n)=>$t(`/api/projects/${e}/git`,n),h3n=e=>bt(`/api/projects/${e}/git/init`),p3n=e=>bt(`/api/projects/${e}/github`),m3n=e=>bt(`/api/projects/${e}/github/disable`),g3n=e=>$t("/api/settings/telemetry",e),v3n=e=>bt("/api/settings/telemetry",{enabled:e}),Lu=e=>{bt("/api/telemetry/event",e).catch(()=>{})},BI=e=>{bt("/api/telemetry/locale",{locale:e}).catch(()=>{})};function wv(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??t5(e.id);const n=(s=e.displayName)==null?void 0:s.split(" · ").slice(1).join(" · ").replace(/ \(local\)$/,""),t=n==="OpenAI-compatible server"||n==="Custom endpoint"||n==="Custom Endpoint"?jS():n,r=t5(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const ob="default";function uy(e,n){var a,o,c;const t=e==null?void 0:e.models.find(u=>u.id===n),r=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,i=s&&r.some(u=>u.id===s)?s:r.some(u=>u.id===ob)?ob:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:i}}const e5="default";function PI(e,n){var r;if((e==null?void 0:e.id)!=="codex")return[];const t=(r=e.models.find(s=>s.id===n))==null?void 0:r.serviceTiers;return t!=null&&t.length?[{id:e5,label:DEt(),description:zEt()},...t]:[]}function cb(e,n,t){var i;if(!e)return t??null;if(e.id!=="codex"||((i=e.models.find(a=>a.id===n))==null?void 0:i.serviceTiers)===void 0)return null;const s=PI(e,n);return s.length===0?e5:t!=null&&s.some(a=>a.id===t)?t:e5}function FI(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=uy(e,n);return r.length===0?ob:t&&r.some(i=>i.id===t)?t:s}const b3n=e=>$t("/api/harnesses/setup/commands",e),HI=(e=!1,n=!1,t)=>{const r=new URLSearchParams;e&&r.set("refresh","1"),n&&r.set("retry","1");const s=r.size>0?`?${r.toString()}`:"";return $t(`/api/harnesses${s}`,t).then(i=>i.harnesses)},y3n=(e,n,t)=>{const r=new URLSearchParams({...n?{harness:n}:{},...t?{project:t}:{}});return $t(`/api/skills${r.size?`?${r}`:""}`,e)},x3n=(e,n,t,r)=>$t(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),w3n=e=>$t("/api/latex-templates",e).then(n=>n.templates),k3n=e=>bt("/api/latex-templates",e).then(n=>n.template),S3n=e=>Pa(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n)),C3n=e=>$t("/api/user-skills",e),E3n=e=>bt("/api/user-skills",e).then(n=>n.skill),N3n=e=>Pa(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n));function t5(e){const n=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],r=[];for(const s of n.split("-"))/^\d+(\.\d+)?$/.test(s)?r.push(s):(r.length&&t.push(r.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return r.length&&t.push(r.join(".")),t.join(" ")}const z3n=(e,n)=>$t(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),j3n=e=>$t("/api/chat/native-sessions",e).then(n=>n.chats),A3n=(e,n)=>bt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),T3n=e=>$t("/api/chat/sessions?scope=all",e).then(n=>n.sessions),R3n=(e,n,t)=>{const r=new URLSearchParams({scope:"sidebar"});return e!=="all"&&r.set("archived",String(e==="archived")),n&&(r.set("beforeUpdatedAt",String(n.updatedAt)),r.set("beforeId",n.id)),$t(`/api/chat/sessions?${r}`,t)},M3n=(e,n,t={})=>bt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),n5=e=>Pa(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Di(n).then(t=>(iy(e),t))),O3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),D3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),L3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),I3n=e=>bt(`/api/chat/sessions/${e}/side`,{}).then(n=>n.session),$3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),B3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{autonomy:n}).then(t=>t.session),P3n=(e,n)=>Hc(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),F3n=(e,n)=>$t(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),H3n=(e,n)=>Pa(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Di(t)),q3n=(e,n)=>bt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),U3n=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,r5=(e,n,t={},r,s,i,a)=>bt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:i,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:a}),G3n=e=>bt(`/api/chat/sessions/${e}/compact`,{}),V3n=(e,n)=>bt(`/api/chat/sessions/${e}/shell`,{command:n}),K3n=(e,n,t,r={})=>bt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),W3n=(e,n,t)=>bt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Q3n=(e,n)=>bt(`/api/chat/sessions/${e}/branch`,{leafId:n}),X3n=e=>bt(`/api/chat/sessions/${e}/interrupt`),Y3n=(e,n)=>bt(`/api/chat/sessions/${e}/respond`,n);function Dc(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(E(),{numeric:"always",style:"narrow"});if(n<60)return t.format(-n,"second");const r=Math.floor(n/60);if(r<60)return t.format(-r,"minute");const s=Math.floor(r/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function em(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return MDe({value:_n(n)});const t=Math.floor(n/60);if(t<60)return EDe({value:_n(t)});const r=Math.floor(t/60);return r<24?bDe({hours:_n(r),minutes:_n(t%60)}):fDe({days:_n(Math.floor(r/24)),hours:_n(r%24)})}function Dl(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r$t("/api/local-models",e),e5n=e=>bt("/api/local-models/discover",e),t5n=e=>bt("/api/local-models",e),n5n=e=>bt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),r5n=e=>Pa(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Di(n)),_j=()=>({queryKey:jt("getHfSettings"),queryFn:({signal:e})=>m4n(e),staleTime:3e5}),fj=()=>({queryKey:jt("getTinkerSettings"),queryFn:({signal:e})=>v4n(e),staleTime:3e5}),dj=()=>({queryKey:jt("getK8sSettings"),queryFn:({signal:e})=>C4n(e),staleTime:3e4}),hj=()=>({queryKey:jt("getModalSettings"),queryFn:({signal:e})=>N4n(e),staleTime:3e5}),s5n=()=>({queryKey:jt("getSlurmSettings"),queryFn:({signal:e})=>K4n(e),staleTime:3e5}),i5n=()=>({queryKey:jt("getRaySettings"),queryFn:({signal:e})=>Q4n(e),staleTime:3e5}),qI=e=>({queryKey:jt("getComputeSettings",e??null),queryFn:({signal:n})=>Z4n(e,n),staleTime:3e4}),a5n=()=>({queryKey:jt("getLocalMachine"),queryFn:({signal:e})=>e3n(e),staleTime:3e5}),o5n=()=>({queryKey:jt("getOpenResearchSettings"),queryFn:({signal:e})=>t3n(e),staleTime:3e4}),c5n=()=>({queryKey:jt("getEnvVars"),queryFn:({signal:e})=>j4n(e),staleTime:3e5}),l5n=()=>({queryKey:jt("getDataDir"),queryFn:({signal:e})=>T4n(e),staleTime:3e5}),UI=()=>({queryKey:jt("getSshSettings"),queryFn:({signal:e})=>O4n(e),staleTime:3e4}),u5n=()=>({queryKey:jt("getSshConfig"),queryFn:({signal:e})=>$4n(e),staleTime:3e5}),pj=e=>({queryKey:jt("getSshMasterStatus",e),queryFn:({signal:n})=>P4n(e,n),staleTime:5e3}),_5n=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>F4n(e),staleTime:2e3}),f5n=()=>({queryKey:jt("listRemoteSessions"),queryFn:({signal:e})=>H4n(e),staleTime:3e4}),lb=()=>({queryKey:jt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>tp(n,t,()=>y4n(e)),staleTime:3e4}),d5n=()=>({queryKey:jt("getProfile"),queryFn:({signal:e})=>l3n(e),staleTime:3e5}),h5n=()=>({queryKey:jt("getLitSources"),queryFn:({signal:e})=>u3n(e),staleTime:3e5}),PS=()=>({queryKey:jt("getProjectDefaults"),queryFn:({signal:e})=>f3n(e),staleTime:3e5}),p5n=e=>({queryKey:jt("getProjectGitStatus",e),queryFn:({signal:n})=>d3n(e,n),staleTime:3e4}),m5n=()=>({queryKey:jt("getTelemetry"),queryFn:({signal:e})=>g3n(e),staleTime:3e5}),GI=()=>({queryKey:jt("getHarnessSetupCommands"),queryFn:({signal:e})=>b3n(e),staleTime:1/0}),r_=()=>({queryKey:jt("getHarnesses"),queryFn:({signal:e})=>HI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),g5n=(e,n)=>({queryKey:jt("getSkills",e??null,n??null),queryFn:({signal:t})=>y3n(t,e,n),select:t=>t.skills,refetchInterval:t=>{var r;return(r=t.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5}),v5n=(e,n,t)=>({queryKey:jt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>x3n(e,n,r,t),staleTime:3e5}),b5n=()=>({queryKey:jt("listLatexTemplates"),queryFn:({signal:e})=>w3n(e),refetchInterval:3e4,staleTime:3e5}),y5n=()=>({queryKey:jt("listUserSkills"),queryFn:({signal:e})=>C3n(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function jf(e=!1,n=!1){const t=r_();if(!e&&!n)return Ze.fetchQuery(t);await Ze.cancelQueries(t);const r=await HI(e,n);return Gn(t.queryKey)&&Ze.setQueryData(t.queryKey,r),r}const x5n=()=>({queryKey:jt("getLocalModels"),queryFn:({signal:e})=>J3n(e),staleTime:3e4}),kv=new Map;function w5n(e,n){let t=kv.get(e);return t||(t=new Set,kv.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&kv.delete(e)}}function k5n(e){var n;(n=kv.get(e.runId))==null||n.forEach(t=>t(e))}const s5=new Set;function tm(e){return s5.add(e),()=>{s5.delete(e)}}function bl(e){s5.forEach(n=>n(e))}const i5=new Set;function S5n(e){return i5.add(e),()=>{i5.delete(e)}}function yl(){i5.forEach(e=>e())}const a5=new Set;function C5n(e){return a5.add(e),()=>{a5.delete(e)}}const o5=new Set;function E5n(e){return o5.add(e),()=>{o5.delete(e)}}function N5n(){o5.forEach(e=>e())}function mj(e){a5.forEach(n=>n(e))}const c5=new Set;function VI(e){return c5.add(e),()=>{c5.delete(e)}}function zw(e){c5.forEach(n=>n(e))}const l5=new Set;function z5n(e){return l5.add(e),()=>{l5.delete(e)}}function gj(e){l5.forEach(n=>n(e))}const u5=new Set;function j5n(e){return u5.add(e),()=>{u5.delete(e)}}function A5n(e){u5.forEach(n=>n(e))}let _5=!0;const f5=new Set;function T5n(e){return f5.add(e),()=>{f5.delete(e)}}function vj(){return _5}function bj(e){e!==_5&&(_5=e,f5.forEach(n=>n()))}const R5n=8e3,M5n=3e3;function O5n(e){const n=T.useRef(e);n.current=e,T.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>bj(!1),R5n)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},M5n)))},c.onopen=()=>{var d,f;r||(window.clearTimeout(s),s=void 0,bj(!0),a&&(bl({type:"reconnected"}),yl(),mj({harness:"*",authState:"unknown"}),(f=(d=n.current).onReconnect)==null||f.call(d)),a=!0)};const u=d=>{try{return JSON.parse(d.data)}catch{return null}};c.addEventListener("resync.required",()=>{var d,f;bl({type:"reconnected"}),yl(),(f=(d=n.current).onReconnect)==null||f.call(d)}),c.addEventListener("run.updated",d=>{const f=u(d);f!=null&&f.run&&(yl(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",d=>{var p,m;const f=u(d);f!=null&&f.experiment&&(yl(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),c.addEventListener("project.updated",d=>{var p,m;const f=u(d);f!=null&&f.project&&(yl(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),c.addEventListener("files.updated",d=>{var p,m;const f=u(d);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),c.addEventListener("run.log",d=>{const f=u(d);f!=null&&f.runId&&k5n(f)}),c.addEventListener("chat.session",d=>{const f=u(d);f!=null&&f.session&&(yl(),bl({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",d=>{const f=u(d);f!=null&&f.sessionId&&(yl(),bl({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",d=>{const f=u(d);f!=null&&f.message&&(yl(),bl({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",d=>{const f=u(d);f!=null&&f.sessionId&&(yl(),bl({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",d=>{const f=u(d);f!=null&&f.sessionId&&f.usage&&bl({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",d=>{const f=u(d);f!=null&&f.sessionId&&bl({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",d=>{const f=u(d);f!=null&&f.sessionId&&bl({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",d=>{const f=u(d);f!=null&&f.harness&&f.authState&&mj(f)}),c.addEventListener("harness.catalog",()=>N5n()),c.addEventListener("datadir.move.progress",d=>{const f=u(d);f&&zw({type:"progress",...f})}),c.addEventListener("datadir.move.done",d=>{const f=u(d);f&&zw({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",d=>{const f=u(d);f&&zw({type:"error",error:f.error})}),c.addEventListener("update.status",d=>{const f=u(d);f&&A5n(f)}),c.addEventListener("overleaf.live",d=>{const f=u(d);f!=null&&f.key&&f.status&&gj({type:"live",key:f.key,status:f.status})}),c.addEventListener("overleaf.pulled",d=>{const f=u(d);f!=null&&f.key&&Array.isArray(f.paths)&&gj({type:"pulled",key:f.key,paths:f.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const ub=new Set;function D5n(e){const n=T.useRef(e);n.current=e,T.useEffect(()=>{const t={onRun:r=>n.current.onRun(r),onReconnect:()=>{var r,s;return(s=(r=n.current).onReconnect)==null?void 0:s.call(r)}};return ub.add(t),()=>{ub.delete(t)}},[])}const yj={onRun:e=>ub.forEach(n=>n.onRun(e)),onReconnect:()=>ub.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},pi=e=>({queryKey:jt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>tp(t,r,async()=>{const s=await z3n(e,n),i=t.getQueryData(r);return s.filter(a=>!Ac.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(c=>c.id===a.id))==null?void 0:o.contextUsage)}})},Wm),staleTime:3e4}),KI=()=>({queryKey:jt("listNativeChats"),queryFn:({signal:e})=>j3n(e),staleTime:0}),L5n=()=>({queryKey:jt("listAllChatSessions"),queryFn:async({signal:e})=>(await T3n(e)).filter(n=>!Ac.has(n.id)),staleTime:0}),Rc=e=>({queryKey:jt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var d;const s=t.getQueryData(r),i=await tp(t,r,()=>F3n(e,n),(f,p,m)=>{if(!p)return f;const w=new Set([...m].filter(k=>k.startsWith("message:")).map(k=>k.slice(8)));return{messages:Wm(f.messages,p.messages,w,!1),queued:m.has("queued")?p.queued:f.queued,activeLeafId:m.has("branch")||w.size?p.activeLeafId:f.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),c=s!==void 0&&i.messages.some(f=>f.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===f.id)))?[]:(a==null?void 0:a.messages.filter(f=>f.id.startsWith("local-")))??[],u=c.some(f=>f.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...c.filter(f=>!i.messages.some(p=>p.id===f.id))],activeLeafId:a&&(u||!((d=a.activeLeafId)!=null&&d.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"});async function I5n(e,n,t){const r=new Map,s=tm(i=>{(i.type==="busy"||i.type==="usage")&&r.set(i.sessionId,{...r.get(i.sessionId),...i.type==="busy"?{busy:i.busy}:{contextUsage:i.usage}})});try{const i=await R3n(e,n,t);return t.throwIfAborted(),{...i,sessions:i.sessions.map(a=>({...a,...r.get(a.id)}))}}finally{s()}}const bf="local-",WI="bash";function xj(e,n){const t=e.findIndex(r=>r.id===n.id);if(t>=0){const r=e.slice();return r[t]=n,r}return n.role!=="user"?[...e,n]:[...e.filter(r=>!r.id.startsWith(bf)),n]}function $5n(e,n){switch(n.type){case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,i=n.message.role==="user"&&s!==null&&s.startsWith(bf),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:xj(t,n.message)},activeLeafBySession:r&&!i&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${bf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:n.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,r]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:r.id}}}case"localShell":{const t=e.messagesBySession[n.sessionId]??[],r=t.find(i=>i.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:WI,state:{status:n.error===void 0?"running":"error",input:{command:n.command},error:n.error}}],createdAt:(r==null?void 0:r.createdAt)??Date.now(),parentId:r?r.parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:r?xj(t,s):[...t,s]},activeLeafBySession:r?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.leafId}};case"optimisticUser":{const t=e.messagesBySession[n.sessionId]??[],r=n.text?[{id:"p0",type:"text",text:n.text}]:[];n.attachments.forEach((i,a)=>r.push({id:`img${a}`,type:"image",text:i.url,name:i.name})),n.annotations.forEach((i,a)=>r.push({id:`annotation${a}`,type:"annotation",text:i.text}));const s={id:`${bf}${Date.now()}`,role:"user",parts:r,createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}}}}let QI=0;function XI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Ze.getQueryCache().subscribe(e=>{XI(e)&&QI++});const B5n=e=>Ze.getQueryCache().subscribe(n=>{XI(n)&&e()}),P5n=()=>QI;function F5n(e,n){const t=Ze.getQueryData(pi(e).queryKey)??[],r=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:r},i=new Set(r);n&&i.add(n);for(const a of i){const o=Ze.getQueryData(Rc(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function YI(e,n,t=!1){if(n.type==="busy"){_o(Ze,pi(e).queryKey,n.sessionId),Ze.setQueryData(pi(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=Rc(n.sessionId);if(Ac.has(n.sessionId))return;_o(Ze,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=Ze.getQueryData(r.queryKey);if(t&&!s)return;const i={messagesBySession:s?{[n.sessionId]:s.messages}:{},queuedBySession:s?{[n.sessionId]:s.queued}:{},activeLeafBySession:s?{[n.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=$5n(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};Ze.setQueryData(r.queryKey,o)}function H5n(e,n){const t=!!n&&!Ac.has(n??""),r=dt({...Rc(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(B5n,P5n),i=T.useMemo(()=>F5n(e,n),[e,n,s,r.data]),a=go()[1],o=T.useCallback(c=>{Gn(["workspace",a])&&YI(e,c)},[e,a]);return[i,o,r]}const Af=()=>({queryKey:jt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>tp(n,t,()=>wwn(e),Wm),staleTime:3e4}),wj=()=>({queryKey:jt("listProjectActivity"),queryFn:({signal:e})=>kwn(e),staleTime:3e4}),Jm=()=>({queryKey:jt("getUiState"),queryFn:({signal:e})=>Swn(e),staleTime:3e5}),FS=e=>({queryKey:jt("getProjectUiState",e),queryFn:({signal:n})=>Cwn(e,n),staleTime:3e5}),D0=(e="")=>({queryKey:jt("getProjectPathStatus",e),queryFn:({signal:n})=>Awn(e,n),staleTime:3e4}),ZI=e=>({queryKey:jt("searchPapers",e),queryFn:({signal:n})=>Own(e,n),staleTime:3e5}),q5n=()=>({queryKey:jt("githubAccount"),queryFn:({signal:e})=>Dwn(e),staleTime:3e5}),U5n=e=>({queryKey:jt("githubProjectRepoPreview",e),queryFn:({signal:n})=>Lwn(e,n),staleTime:3e4}),kj=(e,n)=>({queryKey:jt("repoAccess",e,n),queryFn:({signal:t})=>Iwn(e,n,t),staleTime:3e4}),d5=e=>({queryKey:jt("resolvePaper",e),queryFn:({signal:n})=>$wn(e,n),staleTime:36e5}),G5n=(e,n,t,r)=>({queryKey:jt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>Fwn(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),_b=e=>({queryKey:jt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>tp(t,r,()=>qwn(e,n),Wm),staleTime:3e4}),Qu=e=>({queryKey:jt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>tp(t,r,()=>Gwn(e,n),Wm),staleTime:3e4});function z1(e,n){if(!e)return;const t=e.find(r=>r.id===n.id);return t&&t.updatedAt>n.updatedAt?e:t?e.map(r=>r.id===n.id?n:r):[...e,n]}function Sj(){const e=go();return O5n({onRun(n){var r;if(!Gn(e))return;const t=(r=Ze.getQueryData(Qu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);_o(Ze,Qu(n.projectId).queryKey,n.id),Ze.setQueryData(Qu(n.projectId).queryKey,s=>z1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Sa(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Sa(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),yj.onRun(n)},onExperiment(n){Gn(e)&&(_o(Ze,_b(n.projectId).queryKey,n.id),Ze.setQueryData(_b(n.projectId).queryKey,t=>z1(t,n)),Sa(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Sa(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Sa(["getRunDiff"],e,t=>{var r;return((r=Ze.getQueryData(Qu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){Gn(e)&&(_o(Ze,Af().queryKey,n.id),Ze.setQueryData(Af().queryKey,t=>z1(t,n)))},onArtifacts(n){Gn(e)&&(Sa(yS,e,t=>t.queryKey[3]===n),Sa(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){Gn(e)&&(Sa(cX,e),yj.onReconnect())}}),T.useEffect(()=>{let n,t;const r=()=>{t??(t=setTimeout(()=>{t=void 0,Sa(["listSidebarChatSessions"],e)},100))},i=S5n(()=>{n??(n=setTimeout(()=>{n=void 0,Sa(["listProjectActivity"],e)},100))}),a=VI(f=>{f.type==="done"&&Sa(["getDataDir"],e)}),o=tm(f=>{if(Gn(e)){if((f.type==="session"||f.type==="sessionDeleted")&&r(),f.type==="session"?_o(Ze,pi(f.session.projectId).queryKey,f.session.id):(f.type==="busy"||f.type==="usage")&&_o(Ze,[...e,"listChatSessions"],f.sessionId),(f.type==="message"||f.type==="queued"||f.type==="branch")&&YI("",f.type==="message"?{type:"upsertMessage",sessionId:f.sessionId,message:f.message}:f.type==="queued"?{type:"setQueued",sessionId:f.sessionId,items:f.items}:{type:"activeLeaf",sessionId:f.sessionId,leafId:f.activeLeafId},!0),f.type==="session"&&!Ac.has(f.session.id))Ze.setQueryData(pi(f.session.projectId).queryKey,p=>{if(!p)return;const m=p.find(w=>w.id===f.session.id);return m?z1(p,{...f.session,contextUsage:f.session.contextUsage??m.contextUsage}):[f.session,...p]});else if(f.type==="sessionDeleted")iy(f.sessionId);else if(f.type==="busy"||f.type==="usage"){const p=m=>m.id!==f.sessionId?m:f.type==="busy"?{...m,busy:f.busy}:{...m,contextUsage:f.usage};Ze.setQueriesData({queryKey:[...e,"listChatSessions"]},m=>m==null?void 0:m.map(p)),Ze.setQueriesData({queryKey:[...e,"listSidebarChatSessions"]},m=>m&&{...m,pages:m.pages.map(w=>({...w,sessions:w.sessions.map(p)}))})}}}),c=C5n(()=>{Gn(e)&&jf(!0).catch(()=>{})}),u=E5n(()=>{Gn(e)&&Ze.fetchQuery({...r_(),staleTime:0}).catch(()=>{})}),d=j5n(f=>{Gn(e)&&(_o(Ze,lb().queryKey),Ze.setQueryData(lb().queryKey,f))});return()=>{clearTimeout(n),clearTimeout(t),i(),a(),o(),c(),u(),d()}},[e[1]]),null}const h5=new Set;function JI(e){if(e!==E()){WD(e,{reload:!1}),document.documentElement.lang=e,BI(e);for(const n of h5)n()}}function V5n(e){return h5.add(e),()=>h5.delete(e)}function d_(){return T.useSyncExternalStore(V5n,E,E)}const _y="__ORX_MAC_TITLEBAR__"in window,e$="__ORX_WIN_TITLEBAR__"in window;let Cj="system",Ej="",jw=!1;const Id=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function Nj(e){if(!Id)return null;Id.clearRect(0,0,1,1),Id.fillStyle="transparent",Id.fillStyle=e,Id.fillRect(0,0,1,1);const[n,t,r,s]=Id.getImageData(0,0,1,1).data;return s!==255?null:[n,t,r].map(i=>i.toString(16).padStart(2,"0")).join("")}function K5n(){const e=document.elementsFromPoint(window.innerWidth/2,0),n=e.findIndex(t=>t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY));for(const t of e.slice(Math.max(n,0))){const r=Nj(getComputedStyle(t).backgroundColor);if(r)return r}return Nj(getComputedStyle(document.documentElement).backgroundColor)}function p5(e){e&&(Cj=e),!(!_y||jw)&&(jw=!0,setTimeout(()=>{var r;jw=!1;const n=K5n(),t=`titlebar:${Cj}:${n}`;!n||t===Ej||(Ej=t,(r=window.ipc)==null||r.postMessage(t))},100))}_y&&(new MutationObserver(()=>p5()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>p5()));const W5n="a, button, input, select, textarea, label, summary, [role='button'], [role='tab'], [role='menuitem'], [role='option'], [role='switch'], [role='checkbox'], [contenteditable]:not([contenteditable='false']), [tabindex]:not([tabindex='-1'])",zj=_y?28:e$?32:0;if(zj){document.documentElement.classList.add(_y?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",n=>{var t;e=!1,!(n.button!==0||n.defaultPrevented||n.clientY>=zj)&&(n.target instanceof Element&&n.target.closest(W5n)||(n.detail===2?(t=window.ipc)==null||t.postMessage("titlebar:zoom"):e=!0))}),window.addEventListener("mousemove",n=>{var t;!e||n.buttons!==1||(e=!1,(t=window.ipc)==null||t.postMessage("titlebar:drag"))}),window.addEventListener("mouseup",()=>{e=!1})}const t$="orx:theme";function Q5n(){try{const e=localStorage.getItem(t$);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Tf=Q5n();const m5=new Set;function X5n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function HS(){document.documentElement.dataset.theme=X5n(Tf),p5(Tf)}function n$(e){Tf=e;try{localStorage.setItem(t$,e)}catch{}HS();for(const n of m5)n()}function Y5n(){return Tf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Tf==="system"&&HS()});HS();function Z5n(e){return m5.add(e),()=>m5.delete(e)}function r$(){return[T.useSyncExternalStore(Z5n,()=>Tf,()=>Tf),n$]}const J5n=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),s$=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),fb="-",jj=[],tkn="arbitrary..",nkn=e=>{const n=skn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return rkn(a);const o=a.split(fb),c=o[0]===""&&o.length>1?1:0;return i$(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?J5n(u,c):c:u||jj}return t[a]||jj}}},i$=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=i$(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(fb):e.slice(n).join(fb),c=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?tkn+r:void 0})(),skn=e=>{const{theme:n,classGroups:t}=e;return ikn(t,n)},ikn=(e,n)=>{const t=s$();for(const r in e){const s=e[r];qS(s,t,r,n)}return t},qS=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){okn(e,n,t);return}if(typeof e=="function"){ckn(e,n,t,r);return}lkn(e,n,t,r)},okn=(e,n,t)=>{const r=e===""?n:a$(n,e);r.classGroupId=t},ckn=(e,n,t,r)=>{if(ukn(e)){qS(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ekn(t,e))},lkn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(fb),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,_kn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(i,a)=>{t[i]=a,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(i){let a=t[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in t?t[i]=a:s(i,a)}}},g5="!",Aj=":",fkn=[],Tj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),dkn=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const d=s.length;for(let k=0;kc?u-c:void 0;return Tj(i,m,p,w)};if(n){const s=n+Aj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Tj(fkn,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},hkn=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let i=0;i0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},pkn=e=>({cache:_kn(e.cacheSize),parseClassName:dkn(e),sortModifiers:hkn(e),postfixLookupClassGroupIds:mkn(e),...nkn(e)}),mkn=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=n,o=[],c=e.trim().split(gkn);let u="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:m,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:v}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let y=!!v,x;if(y){const A=k.substring(0,v);x=r(A);const j=x&&a[x]?r(k):void 0;j&&j!==x&&(x=j,y=!1)}else x=r(k);if(!x){if(!y){u=f+(u.length>0?" "+u:u);continue}if(x=r(k),!x){u=f+(u.length>0?" "+u:u);continue}y=!1}const b=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=w?b+g5:b,N=C+x;if(o.indexOf(N)>-1)continue;o.push(N);const z=s(x,y);for(let A=0;A0?" "+u:u)}return u},bkn=(...e)=>{let n=0,t,r,s="";for(;n{if(typeof e=="string")return e;let n,t="";for(let r=0;r{let t,r,s,i;const a=c=>{const u=n.reduce((d,f)=>f(d),e());return t=pkn(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const d=vkn(c,t);return s(c,d),d};return i=a,(...c)=>i(bkn(...c))},ykn=[],Ds=e=>{const n=t=>t[e]||ykn;return n.isThemeGetter=!0,n},c$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,l$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xkn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,wkn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,kkn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Skn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ckn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ekn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zu=e=>xkn.test(e),kn=e=>!!e&&!Number.isNaN(Number(e)),hc=e=>!!e&&Number.isInteger(Number(e)),Aw=e=>e.endsWith("%")&&kn(e.slice(0,-1)),xl=e=>wkn.test(e),u$=()=>!0,Nkn=e=>kkn.test(e)&&!Skn.test(e),US=()=>!1,zkn=e=>Ckn.test(e),jkn=e=>Ekn.test(e),Akn=e=>!yt(e)&&!St(e),Tkn=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Rkn=e=>h_(e,d$,US),yt=e=>c$.test(e),F_=e=>h_(e,h$,Nkn),Mj=e=>h_(e,Pkn,kn),Mkn=e=>h_(e,m$,u$),Okn=e=>h_(e,p$,US),Oj=e=>h_(e,_$,US),Dkn=e=>h_(e,f$,jkn),j1=e=>h_(e,g$,zkn),St=e=>l$.test(e),l0=e=>Kf(e,h$),Lkn=e=>Kf(e,p$),Dj=e=>Kf(e,_$),Ikn=e=>Kf(e,d$),$kn=e=>Kf(e,f$),A1=e=>Kf(e,g$,!0),Bkn=e=>Kf(e,m$,!0),h_=(e,n,t)=>{const r=c$.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Kf=(e,n,t=!1)=>{const r=l$.exec(e);return r?r[1]?n(r[1]):t:!1},_$=e=>e==="position"||e==="percentage",f$=e=>e==="image"||e==="url",d$=e=>e==="length"||e==="size"||e==="bg-size",h$=e=>e==="length",Pkn=e=>e==="number",p$=e=>e==="family-name",m$=e=>e==="number"||e==="weight",g$=e=>e==="shadow",Lj=()=>{const e=Ds("color"),n=Ds("font"),t=Ds("text"),r=Ds("font-weight"),s=Ds("tracking"),i=Ds("leading"),a=Ds("breakpoint"),o=Ds("container"),c=Ds("spacing"),u=Ds("radius"),d=Ds("shadow"),f=Ds("inset-shadow"),p=Ds("text-shadow"),m=Ds("drop-shadow"),w=Ds("blur"),k=Ds("perspective"),v=Ds("aspect"),y=Ds("ease"),x=Ds("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),St,yt],z=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],j=()=>[St,yt,c],M=()=>[zu,"full","auto",...j()],D=()=>[hc,"none","subgrid",St,yt],L=()=>["auto",{span:["full",hc,St,yt]},hc,St,yt],B=()=>[hc,"auto",St,yt],U=()=>["auto","min","max","fr",St,yt],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...j()],Z=()=>[zu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],ee=()=>[zu,"screen","full","dvw","lvw","svw","min","max","fit",...j()],$=()=>[zu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],I=()=>[e,St,yt],F=()=>[...C(),Dj,Oj,{position:[St,yt]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",Ikn,Rkn,{size:[St,yt]}],ie=()=>[Aw,l0,F_],oe=()=>["","none","full",u,St,yt],ce=()=>["",kn,l0,F_],ne=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[kn,Aw,Dj,Oj],le=()=>["","none",w,St,yt],me=()=>["none",kn,St,yt],ve=()=>["none",kn,St,yt],Ee=()=>[kn,St,yt],Fe=()=>[zu,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xl],breakpoint:[xl],color:[u$],container:[xl],"drop-shadow":[xl],ease:["in","out","in-out"],font:[Akn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xl],shadow:[xl],spacing:["px",kn],text:[xl],"text-shadow":[xl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zu,yt,St,v]}],container:["container"],"container-type":[{"@container":["","normal","size",St,yt]}],"container-named":[Tkn],columns:[{columns:[kn,yt,St,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[hc,"auto",St,yt]}],basis:[{basis:[zu,"full","auto",o,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kn,zu,"auto","initial","none",yt]}],grow:[{grow:["",kn,St,yt]}],shrink:[{shrink:["",kn,St,yt]}],order:[{order:[hc,"first","last","none",St,yt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...ee()]}],"min-inline-size":[{"min-inline":["auto",...ee()]}],"max-inline-size":[{"max-inline":["none",...ee()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[o,"screen",...Z()]}],"min-w":[{"min-w":[o,"screen","none",...Z()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",t,l0,F_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Bkn,Mkn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Aw,yt]}],"font-family":[{font:[Lkn,Okn,n]}],"font-features":[{"font-features":[yt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,St,yt]}],"line-clamp":[{"line-clamp":[kn,"none",St,Mj]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",St,yt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",St,yt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[kn,"from-font","auto",St,F_]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[kn,"auto",St,yt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[hc,St,yt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",St,yt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",St,yt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hc,St,yt],radial:["",St,yt],conic:[hc,St,yt]},$kn,Dkn]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kn,St,yt]}],"outline-w":[{outline:["",kn,l0,F_]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",d,A1,j1]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,A1,j1]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[kn,F_]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",p,A1,j1]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[kn,St,yt]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[St,yt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[kn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",St,yt]}],filter:[{filter:["","none",St,yt]}],blur:[{blur:le()}],brightness:[{brightness:[kn,St,yt]}],contrast:[{contrast:[kn,St,yt]}],"drop-shadow":[{"drop-shadow":["","none",m,A1,j1]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",kn,St,yt]}],"hue-rotate":[{"hue-rotate":[kn,St,yt]}],invert:[{invert:["",kn,St,yt]}],saturate:[{saturate:[kn,St,yt]}],sepia:[{sepia:["",kn,St,yt]}],"backdrop-filter":[{"backdrop-filter":["","none",St,yt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[kn,St,yt]}],"backdrop-contrast":[{"backdrop-contrast":[kn,St,yt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kn,St,yt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kn,St,yt]}],"backdrop-invert":[{"backdrop-invert":["",kn,St,yt]}],"backdrop-opacity":[{"backdrop-opacity":[kn,St,yt]}],"backdrop-saturate":[{"backdrop-saturate":[kn,St,yt]}],"backdrop-sepia":[{"backdrop-sepia":["",kn,St,yt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",St,yt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kn,"initial",St,yt]}],ease:[{ease:["linear","initial",y,St,yt]}],delay:[{delay:[kn,St,yt]}],animate:[{animate:["none",x,St,yt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,St,yt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[St,yt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Fe()}],"translate-x":[{"translate-x":Fe()}],"translate-y":[{"translate-y":Fe()}],"translate-z":[{"translate-z":Fe()}],"translate-none":["translate-none"],zoom:[{zoom:[hc,St,yt]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",St,yt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",St,yt]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[kn,l0,F_,Mj]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fkn=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Vd(e,"cacheSize",n),Vd(e,"prefix",t),Vd(e,"experimentalParseClassName",r),T1(e.theme,i.theme),T1(e.classGroups,i.classGroups),T1(e.conflictingClassGroups,i.conflictingClassGroups),T1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Vd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Vd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),R1(e.theme,s.theme),R1(e.classGroups,s.classGroups),R1(e.conflictingClassGroups,s.conflictingClassGroups),R1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),v5(e,s,"postfixLookupClassGroups"),v5(e,s,"orderSensitiveModifiers"),e),Vd=(e,n,t)=>{t!==void 0&&(e[n]=t)},T1=(e,n)=>{if(n)for(const t in n)Vd(e,t,n[t])},R1=(e,n)=>{if(n)for(const t in n)v5(e,n,t)},v5=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},Hkn=(e,...n)=>typeof e=="function"?Rj(Lj,e,...n):Rj(()=>Fkn(Lj(),e),...n),qkn=Hkn({extend:{theme:{text:["menu"]}}});function $s(...e){return qkn(...e)}const Ukn={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Zt({variant:e="default",size:n="default",className:t,...r}){return _.jsx("span",{className:$s("badge inline-flex items-center rounded-full border py-px font-sans",n==="small"?"px-1.5 text-xs font-normal":"px-2 text-sm font-medium",Ukn[e],t),...r})}const Gkn=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Vkn={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},Kkn={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function v$(e,n,t,r){return $s(Gkn,Vkn[e],Kkn[n],t&&"active",r)}function Me({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("button",{className:v$(n,t,e,r),...s})}function $h({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("a",{className:v$(n,t,e,r),...s})}const Wkn=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Qkn={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},Xkn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function b$(e,n,t,r,s){return $s(Wkn,Qkn[e],Xkn[n],r==="circle"&&"rounded-full",t&&"active",s)}const Rt=T.forwardRef(function({active:n=!1,shape:t="rounded",size:r="default",variant:s="default",className:i,...a},o){return _.jsx("button",{ref:o,className:b$(s,r,n,t,i),...a})});function rp({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return _.jsx("a",{className:b$(r,t,e,n,s),...i})}const Ykn={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function qr({variant:e="default",className:n,...t}){return _.jsx("input",{className:$s("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",Ykn[e],n),...t})}function un({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return _.jsx("button",{className:$s("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",r),...s})}function Et({className:e,...n}){return _.jsx("span",{className:$s("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...n})}function Ur({className:e,...n}){return _.jsx("div",{className:$s("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const Zkn={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function ch({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return _.jsxs("span",{className:$s("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[_.jsx("span",{className:$s("h-[7px] w-[7px] shrink-0 rounded-full bg-current",Zkn[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const Jkn=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-surface","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function y$(e,n){return $s(Jkn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function GS({checked:e=!1,className:n,children:t,...r}){return _.jsx("button",{role:"switch","aria-checked":e,className:y$(e,n),...r,children:t??_.jsx("span",{})})}function eSn({checked:e=!1,className:n,...t}){return _.jsx("span",{className:y$(e,n),...t,children:_.jsx("span",{})})}var ni=_D();const tSn=Um(ni);function nSn(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const rSn=e=>{switch(e){case"success":return aSn;case"info":return cSn;case"warning":return oSn;case"error":return lSn;default:return null}},sSn=Array(12).fill(0),iSn=({visible:e,className:n})=>rt.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},rt.createElement("div",{className:"sonner-spinner"},sSn.map((t,r)=>rt.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),aSn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),oSn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cSn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),lSn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},rt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uSn=rt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},rt.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),rt.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),_Sn=()=>{const[e,n]=rt.useState(document.hidden);return rt.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let fSn=1;const dSn=100,Ij=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:fSn++};class hSn{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-dSn;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,s=Ij(n),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:t}),{...u,...n,id:s,dismissible:o,title:t}):u):this.addToast({title:t,...r,dismissible:o,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let i=r!==void 0,a;const o=s.then(async u=>{if(a=["resolve",u],rt.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(mSn(u)&&!u.ok){i=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,w=typeof f=="object"&&!rt.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...w})}else if(u instanceof Error){i=!1;const f=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,w=typeof f=="object"&&!rt.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...w})}else if(t.success!==void 0){i=!1;const f=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,w=typeof f=="object"&&!rt.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:p,...w})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const d=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof d=="object"&&!rt.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=Ij(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Ji=new hSn,pSn=(e,n)=>Ji.message(e,n),mSn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",gSn=pSn,vSn=()=>Ji.toasts,bSn=()=>Ji.getActiveToasts(),ySn=Object.assign(gSn,{success:Ji.success,info:Ji.info,warning:Ji.warning,error:Ji.error,custom:Ji.custom,message:Ji.message,promise:Ji.promise,dismiss:Ji.dismiss,loading:Ji.loading},{getHistory:vSn,getToasts:bSn});nSn("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function M1(e){return e.label!==void 0}const xSn=3,wSn="24px",kSn="16px",$j=4e3,SSn=356,CSn=14,ESn=45,NSn=200;function pc(...e){return e.filter(Boolean).join(" ")}function zSn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const jSn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:d,toast:f,unstyled:p,interacting:m,setHeights:w,visibleToasts:k,heights:v,index:y,toasts:x,expanded:b,removeToast:C,defaultRichColors:N,closeButton:z,style:A,cancelButtonStyle:j,actionButtonStyle:M,className:D="",descriptionClassName:L="",duration:B,position:U,gap:H,expandByDefault:Q,classNames:K,icons:Z,closeButtonAriaLabel:ee="Close toast"}=e,[$,I]=rt.useState(null),[F,q]=rt.useState(null),[V,ie]=rt.useState(!1),[oe,ce]=rt.useState(!1),[ne,G]=rt.useState(!1),[ae,le]=rt.useState(!1),[me,ve]=rt.useState(!1),[Ee,Fe]=rt.useState(0),[We,Oe]=rt.useState(0),He=rt.useRef(f.duration||B||$j),ht=rt.useRef(null),xt=rt.useRef(null),Kt=y===0,Ut=y+1<=k,Ht=f.type,$e=Ht??"default",ot=f.dismissible!==!1,ct=f.className||"",ye=f.descriptionClassName||"",Be=rt.useMemo(()=>v.findIndex(_t=>_t.toastId===f.id)||0,[v,f.id]),Ke=rt.useMemo(()=>{var _t;return(_t=f.closeButton)!=null?_t:z},[f.closeButton,z]),Ce=rt.useMemo(()=>f.duration||B||$j,[f.duration,B]),Ye=rt.useRef(0),lt=rt.useRef(0),je=rt.useRef(0),Gt=rt.useRef(null),[Mt,Jt]=U.split("-"),rn=rt.useMemo(()=>v.reduce((_t,fn,yn)=>yn>=Be?_t:_t+fn.height,0),[v,Be]),nn=_Sn(),Nt=rt.useMemo(()=>{var _t;return(_t=e.swipeDirections)!=null?_t:zSn(U)},[e.swipeDirections,U]),wt=f.invert||d,Bn=Ht==="loading";lt.current=rt.useMemo(()=>Be*H+rn,[Be,rn]),rt.useEffect(()=>{He.current=Ce},[Ce]),rt.useEffect(()=>{ie(!0)},[]),rt.useEffect(()=>{const _t=xt.current;if(_t){const fn=_t.getBoundingClientRect().height;return Oe(fn),w(yn=>[{toastId:f.id,height:fn,position:f.position},...yn]),()=>w(yn=>yn.filter(Tn=>Tn.toastId!==f.id))}},[w,f.id]),rt.useLayoutEffect(()=>{if(!V)return;const _t=xt.current,fn=_t.style.height;_t.style.height="auto";const yn=_t.getBoundingClientRect().height;_t.style.height=fn,Oe(yn),w(Tn=>Tn.find(dn=>dn.toastId===f.id)?Tn.map(dn=>dn.toastId===f.id?{...dn,height:yn}:dn):[{toastId:f.id,height:yn,position:f.position},...Tn])},[V,f.title,f.description,w,f.id,f.jsx,f.action,f.cancel]);const gr=rt.useCallback(()=>{ce(!0),Fe(lt.current),w(_t=>_t.filter(fn=>fn.toastId!==f.id)),setTimeout(()=>{C(f)},NSn)},[f,C,w,lt]);rt.useEffect(()=>{if(f.promise&&Ht==="loading"||f.duration===1/0||f.type==="loading")return;let _t;return b||m||nn?(()=>{if(je.current{He.current!==1/0&&(Ye.current=new Date().getTime(),_t=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),gr()},He.current))})(),()=>clearTimeout(_t)},[b,m,f,Ht,nn,gr]),rt.useEffect(()=>{f.delete&&(gr(),f.onDismiss==null||f.onDismiss.call(f,f))},[gr,f.delete]);function Gr(){var _t;if(Z!=null&&Z.loading){var fn;return rt.createElement("div",{className:pc(K==null?void 0:K.loader,f==null||(fn=f.classNames)==null?void 0:fn.loader,"sonner-loader"),"data-visible":Ht==="loading"},Z.loading)}return rt.createElement(iSn,{className:pc(K==null?void 0:K.loader,f==null||(_t=f.classNames)==null?void 0:_t.loader),visible:Ht==="loading"})}const en=f.icon||(Z==null?void 0:Z[Ht])||rSn(Ht);var Vn,ls;return rt.createElement("li",{tabIndex:0,ref:xt,className:pc(D,ct,K==null?void 0:K.toast,f==null||(n=f.classNames)==null?void 0:n.toast,K==null?void 0:K[$e],f==null||(t=f.classNames)==null?void 0:t[$e]),"data-sonner-toast":"","data-rich-colors":(Vn=f.richColors)!=null?Vn:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":V,"data-promise":!!f.promise,"data-swiped":me,"data-removed":oe,"data-visible":Ut,"data-y-position":Mt,"data-x-position":Jt,"data-index":y,"data-front":Kt,"data-swiping":ne,"data-dismissible":ot,"data-type":Ht,"data-invert":wt,"data-swipe-out":ae,"data-swipe-direction":F,"data-expanded":!!(b||Q&&V),"data-testid":f.testId,style:{"--index":y,"--toasts-before":y,"--z-index":x.length-y,"--offset":`${oe?Ee:lt.current}px`,"--initial-height":Q?"auto":`${We}px`,...A,...f.style},onDragEnd:()=>{G(!1),I(null),Gt.current=null},onPointerDown:_t=>{_t.button!==2&&(Bn||!ot||(ht.current=new Date,Fe(lt.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(G(!0),Gt.current={x:_t.clientX,y:_t.clientY})))},onPointerUp:()=>{var _t,fn,yn;if(ae||!ot)return;Gt.current=null;const Tn=Number(((_t=xt.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Kn=Number(((fn=xt.current)==null?void 0:fn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dn=new Date().getTime()-((yn=ht.current)==null?void 0:yn.getTime()),Dn=$==="x"?Tn:Kn,Wn=Math.abs(Dn)/dn;if(($==="x"?Nt.includes(Tn>0?"right":"left"):Nt.includes(Kn>0?"bottom":"top"))&&(Math.abs(Dn)>=ESn||Wn>.11)){Fe(lt.current),f.onDismiss==null||f.onDismiss.call(f,f),q($==="x"?Tn>0?"right":"left":Kn>0?"down":"up"),gr(),le(!0);return}else{var Ot,Fn;(Ot=xt.current)==null||Ot.style.setProperty("--swipe-amount-x","0px"),(Fn=xt.current)==null||Fn.style.setProperty("--swipe-amount-y","0px")}ve(!1),G(!1),I(null)},onPointerMove:_t=>{var fn,yn,Tn;if(!Gt.current||!ot||((fn=window.getSelection())==null?void 0:fn.toString().length)>0)return;const dn=_t.clientY-Gt.current.y,Dn=_t.clientX-Gt.current.x;!$&&(Math.abs(Dn)>1||Math.abs(dn)>1)&&I(Math.abs(Dn)>Math.abs(dn)?"x":"y");let Wn={x:0,y:0};const zt=Ot=>1/(1.5+Math.abs(Ot)/20);if($==="y"){if(Nt.includes("top")||Nt.includes("bottom"))if(Nt.includes("top")&&dn<0||Nt.includes("bottom")&&dn>0)Wn.y=dn;else{const Ot=dn*zt(dn);Wn.y=Math.abs(Ot)0)Wn.x=Dn;else{const Ot=Dn*zt(Dn);Wn.x=Math.abs(Ot)0||Math.abs(Wn.y)>0)&&ve(!0),(yn=xt.current)==null||yn.style.setProperty("--swipe-amount-x",`${Wn.x}px`),(Tn=xt.current)==null||Tn.style.setProperty("--swipe-amount-y",`${Wn.y}px`)}},Ke&&!f.jsx&&Ht!=="loading"?rt.createElement("button",{"aria-label":ee,"data-disabled":Bn,"data-close-button":!0,onClick:Bn||!ot?()=>{}:()=>{gr(),f.onDismiss==null||f.onDismiss.call(f,f)},className:pc(K==null?void 0:K.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(ls=Z==null?void 0:Z.close)!=null?ls:uSn):null,(Ht||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[Ht])!==null||f.icon)?rt.createElement("div",{"data-icon":"",className:pc(K==null?void 0:K.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},Ht==="loading"?f.icon||Gr():f.promise?Gr():null,Ht!=="loading"?en:null):null,rt.createElement("div",{"data-content":"",className:pc(K==null?void 0:K.content,f==null||(i=f.classNames)==null?void 0:i.content)},rt.createElement("div",{"data-title":"",className:pc(K==null?void 0:K.title,f==null||(a=f.classNames)==null?void 0:a.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?rt.createElement("div",{"data-description":"",className:pc(L,ye,K==null?void 0:K.description,f==null||(o=f.classNames)==null?void 0:o.description)},typeof f.description=="function"?f.description():f.description):null),rt.isValidElement(f.cancel)?f.cancel:f.cancel&&M1(f.cancel)?rt.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||j,onClick:_t=>{M1(f.cancel)&&ot&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,_t),gr())},className:pc(K==null?void 0:K.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,rt.isValidElement(f.action)?f.action:f.action&&M1(f.action)?rt.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:_t=>{M1(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,_t),!_t.defaultPrevented&&gr())},className:pc(K==null?void 0:K.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Bj(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ASn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?kSn:wSn;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${a}-${u}`]=o:t[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(o)}),t}const TSn=rt.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:d,mobileOffset:f,theme:p="light",richColors:m,duration:w,style:k,visibleToasts:v=xSn,toastOptions:y,dir:x=Bj(),gap:b=CSn,icons:C,customAriaLabel:N,containerAriaLabel:z="Notifications"}=n,[A,j]=rt.useState([]),M=rt.useMemo(()=>r?A.filter(ie=>ie.toasterId===r):A.filter(ie=>!ie.toasterId),[A,r]),D=rt.useMemo(()=>Array.from(new Set([i].concat(M.filter(ie=>ie.position).map(ie=>ie.position)))),[M,i]),[L,B]=rt.useState([]),[U,H]=rt.useState(!1),[Q,K]=rt.useState(!1),[Z,ee]=rt.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=rt.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=rt.useRef(null),q=rt.useRef(!1),V=rt.useCallback(ie=>{j(oe=>{var ce;return(ce=oe.find(ne=>ne.id===ie.id))!=null&&ce.delete||Ji.dismiss(ie.id),oe.filter(({id:ne})=>ne!==ie.id)})},[]);return rt.useEffect(()=>Ji.subscribe(ie=>{if(ie.dismiss){requestAnimationFrame(()=>{j(oe=>oe.map(ce=>ce.id===ie.id?{...ce,delete:!0}:ce))});return}setTimeout(()=>{tSn.flushSync(()=>{j(oe=>{const ce=oe.findIndex(ne=>ne.id===ie.id);return ce!==-1?[...oe.slice(0,ce),{...oe[ce],...ie},...oe.slice(ce+1)]:[ie,...oe]})})})}),[]),rt.useEffect(()=>{if(p!=="system"){ee(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),typeof window>"u")return;const ie=window.matchMedia("(prefers-color-scheme: dark)");try{ie.addEventListener("change",({matches:oe})=>{ee(oe?"dark":"light")})}catch{ie.addListener(({matches:ce})=>{try{ee(ce?"dark":"light")}catch(ne){console.error(ne)}})}},[p]),rt.useEffect(()=>{A.length<=1&&H(!1)},[A]),rt.useEffect(()=>{const ie=oe=>{var ce;if(a.length>0&&a.every(ae=>oe[ae]||oe.code===ae)){var G;H(!0),(G=$.current)==null||G.focus()}oe.code==="Escape"&&(document.activeElement===$.current||(ce=$.current)!=null&&ce.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[a]),rt.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,q.current=!1)}},[$.current]),rt.createElement("section",{ref:t,"aria-label":N??`${z} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ie,oe)=>{var ce;const[ne,G]=ie.split("-");return M.length?rt.createElement("ol",{key:ie,dir:x==="auto"?Bj():x,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":ne,"data-x-position":G,style:{"--front-toast-height":`${((ce=L[0])==null?void 0:ce.height)||0}px`,"--width":`${SSn}px`,"--gap":`${b}px`,...k,...ASn(d,f)},onBlur:ae=>{q.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(q.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||q.current||(q.current=!0,F.current=ae.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ae=>!ae.position&&oe===0||ae.position===ie).map((ae,le)=>{var me,ve;return rt.createElement(jSn,{key:ae.id,icons:C,index:le,toast:ae,defaultRichColors:m,duration:(me=y==null?void 0:y.duration)!=null?me:w,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:s,visibleToasts:v,closeButton:(ve=y==null?void 0:y.closeButton)!=null?ve:c,interacting:Q,position:ie,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,closeButtonAriaLabel:y==null?void 0:y.closeButtonAriaLabel,removeToast:V,toasts:M.filter(Ee=>Ee.position==ae.position),heights:L.filter(Ee=>Ee.position==ae.position),setHeights:B,expandByDefault:o,gap:b,expanded:U,swipeDirections:n.swipeDirections})})):null}))});function RSn(e){const[n]=r$();return _.jsx(TSn,{theme:n,...e})}function sn(e,n,t){ySn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function eg({content:e,children:n,className:t,interactive:r=!1}){const s=T.useRef(null),i=T.useRef(null);function a(){const c=s.current,u=i.current;if(!c||!u)return;u.matches(":popover-open")||u.showPopover();const d=c.getBoundingClientRect(),f=u.getBoundingClientRect(),p=Math.max(8,Math.min(d.left+d.width/2-f.width/2,window.innerWidth-f.width-8));u.style.left=`${p}px`,u.style.top=`${Math.max(8,d.top-f.height-6)}px`}function o(){var u;const c=s.current;!(c!=null&&c.matches(":hover, :focus-visible"))&&!(c!=null&&c.querySelector(":focus-visible"))&&((u=i.current)==null||u.hidePopover())}return T.useEffect(()=>{const c=()=>{var u;return(u=i.current)==null?void 0:u.hidePopover()};return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[]),_.jsxs("span",{ref:s,className:$s("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:r?void 0:0,role:r?void 0:"img","aria-label":r?void 0:e,onMouseEnter:a,onMouseLeave:o,onFocus:c=>{c.target.matches(":focus-visible")&&a()},onBlur:o,onKeyDown:c=>{var u;c.key==="Escape"&&((u=i.current)!=null&&u.matches(":popover-open"))&&(c.preventDefault(),c.stopPropagation(),i.current.hidePopover())},children:[n,_.jsx("span",{ref:i,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const MSn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function sp(e,n,t="[data-initial-focus]"){const r=T.useRef(n);r.current=n,T.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(MSn)];(s.querySelector(t)??a()[0]??s).focus();const o=c=>{if(c.key==="Escape"){if(s.querySelector(":popover-open"))return;c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key!=="Tab")return;const u=a(),d=u[0],f=u.at(-1);!d||!f?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===d?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),d.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function x$({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=T.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),c=[];return n.activeTurnCount>0&&c.push(n.activeTurnCount===1?a7t():N7t({count:_n(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?RCt():G6t({count:_n(n.pendingPermissionCount)})),o>0&&c.push(o===1?VCt():d7t({count:_n(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?JCt():y7t({count:_n(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?BCt():fCt({count:_n(n.activeRunCount)})),sp(a,s),ni.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!r&&u.target===u.currentTarget&&s()},children:_.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":c.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[_.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:iCt({host:Ae(e)})}),c.length>0&&_.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[_.jsx("p",{className:"m-0 font-medium",children:CCt()}),_.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:c.map(u=>_.jsx("li",{children:u},u))})]}),_.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[_.jsx(Me,{disabled:r,onClick:s,children:Nf()}),_.jsx(Me,{variant:"danger",disabled:r,onClick:i,children:r?O7t():Z6t()})]})]})}),document.body)}/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -103,527 +103,527 @@ ${e==null?void 0:e.path} * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fSn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const OSn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dSn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const DSn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pj=e=>{const n=dSn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const Pj=e=>{const n=DSn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var Aw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + */var Tw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hSn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},pSn=T.createContext({}),mSn=()=>T.useContext(pSn),gSn=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:_=!1,color:p="currentColor",className:m=""}=mSn()??{},w=r??_?Number(t??d)*24/Number(n??u):t??d;return T.createElement("svg",{ref:c,...Aw,width:n??u??Aw.width,height:n??u??Aw.height,stroke:e??p,strokeWidth:w,className:w$("lucide",m,s),...!i&&!hSn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>T.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** + */const LSn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},ISn=T.createContext({}),$Sn=()=>T.useContext(ISn),BSn=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=$Sn()??{},w=r??f?Number(t??d)*24/Number(n??u):t??d;return T.createElement("svg",{ref:c,...Tw,width:n??u??Tw.width,height:n??u??Tw.height,stroke:e??p,strokeWidth:w,className:w$("lucide",m,s),...!i&&!LSn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>T.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const at=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(gSn,{ref:i,iconNode:n,className:w$(`lucide-${fSn(Pj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=Pj(e),t};/** + */const at=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(BSn,{ref:i,iconNode:n,className:w$(`lucide-${OSn(Pj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=Pj(e),t};/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vSn=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],bSn=at("archive",vSn);/** + */const PSn=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],FSn=at("archive",PSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ySn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],xSn=at("arrow-down",ySn);/** + */const HSn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],qSn=at("arrow-down",HSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wSn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],fb=at("arrow-left",wSn);/** + */const USn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],db=at("arrow-left",USn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kSn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],kv=at("arrow-right",kSn);/** + */const GSn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sv=at("arrow-right",GSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SSn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],CSn=at("arrow-up-right",SSn);/** + */const VSn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],KSn=at("arrow-up-right",VSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ESn=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],k$=at("blocks",ESn);/** + */const WSn=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],k$=at("blocks",WSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NSn=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],S$=at("book-open",NSn);/** + */const QSn=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],S$=at("book-open",QSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zSn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],jSn=at("calendar-days",zSn);/** + */const XSn=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],YSn=at("calendar-days",XSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ASn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],TSn=at("chart-spline",ASn);/** + */const ZSn=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],JSn=at("chart-spline",ZSn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RSn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ti=at("check",RSn);/** + */const e6n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ti=at("check",e6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MSn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qc=at("chevron-down",MSn);/** + */const t6n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qc=at("chevron-down",t6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OSn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],C$=at("chevron-left",OSn);/** + */const n6n=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],C$=at("chevron-left",n6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DSn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yo=at("chevron-right",DSn);/** + */const r6n=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yo=at("chevron-right",r6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LSn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],VS=at("circle-alert",LSn);/** + */const s6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],VS=at("circle-alert",s6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ISn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],$Sn=at("circle-question-mark",ISn);/** + */const i6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],a6n=at("circle-question-mark",i6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BSn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],E$=at("circle-stop",BSn);/** + */const o6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],E$=at("circle-stop",o6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PSn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],N$=at("circle-x",PSn);/** + */const c6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],N$=at("circle-x",c6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FSn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],HSn=at("clock-3",FSn);/** + */const l6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],u6n=at("clock-3",l6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qSn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],USn=at("clock",qSn);/** + */const _6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],f6n=at("clock",_6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GSn=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],VSn=at("cloud-upload",GSn);/** + */const d6n=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],h6n=at("cloud-upload",d6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KSn=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],b5=at("code",KSn);/** + */const p6n=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],b5=at("code",p6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WSn=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Wf=at("copy",WSn);/** + */const m6n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Wf=at("copy",m6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QSn=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],z$=at("corner-down-left",QSn);/** + */const g6n=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],z$=at("corner-down-left",g6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XSn=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],KS=at("cpu",XSn);/** + */const v6n=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],KS=at("cpu",v6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YSn=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],eg=at("download",YSn);/** + */const b6n=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],tg=at("download",b6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZSn=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ip=at("ellipsis",ZSn);/** + */const y6n=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],ip=at("ellipsis",y6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JSn=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Rf=at("external-link",JSn);/** + */const x6n=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Rf=at("external-link",x6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e6n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],j$=at("file-code",e6n);/** + */const w6n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],j$=at("file-code",w6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t6n=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],n6n=at("file-output",t6n);/** + */const k6n=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],S6n=at("file-output",k6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r6n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],_y=at("file-text",r6n);/** + */const C6n=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],fy=at("file-text",C6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s6n=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Bh=at("flask-conical",s6n);/** + */const E6n=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Bh=at("flask-conical",E6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i6n=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]],a6n=at("fold-vertical",i6n);/** + */const N6n=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]],z6n=at("fold-vertical",N6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o6n=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],c6n=at("folder-git-2",o6n);/** + */const j6n=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],A6n=at("folder-git-2",j6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const l6n=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],vo=at("folder-open",l6n);/** + */const T6n=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],vo=at("folder-open",T6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u6n=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],_6n=at("folder-plus",u6n);/** + */const R6n=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],M6n=at("folder-plus",R6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const f6n=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],fy=at("folder-tree",f6n);/** + */const O6n=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],dy=at("folder-tree",O6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const d6n=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],h6n=at("funnel",d6n);/** + */const D6n=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],L6n=at("funnel",D6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const p6n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],m6n=at("gauge",p6n);/** + */const I6n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],$6n=at("gauge",I6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const g6n=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],tg=at("git-branch",g6n);/** + */const B6n=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],ng=at("git-branch",B6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const v6n=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],b6n=at("git-commit-horizontal",v6n);/** + */const P6n=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],F6n=at("git-commit-horizontal",P6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const y6n=[["path",{d:"M12 13V2l8 4-8 4",key:"5wlwwj"}],["path",{d:"M20.561 10.222a9 9 0 1 1-12.55-5.29",key:"1c0wjv"}],["path",{d:"M8.002 9.997a5 5 0 1 0 8.9 2.02",key:"gb1g7m"}]],A$=at("goal",y6n);/** + */const H6n=[["path",{d:"M12 13V2l8 4-8 4",key:"5wlwwj"}],["path",{d:"M20.561 10.222a9 9 0 1 1-12.55-5.29",key:"1c0wjv"}],["path",{d:"M8.002 9.997a5 5 0 1 0 8.9 2.02",key:"gb1g7m"}]],A$=at("goal",H6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],w6n=at("globe",x6n);/** + */const q6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],U6n=at("globe",q6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const k6n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],S6n=at("history",k6n);/** + */const G6n=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],V6n=at("history",G6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const C6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],WS=at("info",C6n);/** + */const K6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],WS=at("info",K6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E6n=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],N6n=at("laptop",E6n);/** + */const W6n=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],Q6n=at("laptop",W6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const z6n=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],j6n=at("lightbulb",z6n);/** + */const X6n=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Y6n=at("lightbulb",X6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const A6n=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],T$=at("link-2",A6n);/** + */const Z6n=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],T$=at("link-2",Z6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const T6n=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],R6n=at("list-checks",T6n);/** + */const J6n=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],eCn=at("list-checks",J6n);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M6n=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Fj=at("lock",M6n);/** + */const tCn=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Fj=at("lock",tCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const O6n=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],D6n=at("maximize-2",O6n);/** + */const nCn=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],rCn=at("maximize-2",nCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L6n=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],I6n=at("message-circle",L6n);/** + */const sCn=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],iCn=at("message-circle",sCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $6n=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],R$=at("message-square-quote",$6n);/** + */const aCn=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],R$=at("message-square-quote",aCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const B6n=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],tm=at("messages-square",B6n);/** + */const oCn=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],nm=at("messages-square",oCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const P6n=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],F6n=at("minimize-2",P6n);/** + */const cCn=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],lCn=at("minimize-2",cCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H6n=[["path",{d:"M5 12h14",key:"1ays0h"}]],q6n=at("minus",H6n);/** + */const uCn=[["path",{d:"M5 12h14",key:"1ays0h"}]],_Cn=at("minus",uCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U6n=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],G6n=at("monitor",U6n);/** + */const fCn=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],dCn=at("monitor",fCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const V6n=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],K6n=at("moon",V6n);/** + */const hCn=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],pCn=at("moon",hCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const W6n=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],Q6n=at("mouse-pointer-click",W6n);/** + */const mCn=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],gCn=at("mouse-pointer-click",mCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const X6n=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],QS=at("package",X6n);/** + */const vCn=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],QS=at("package",vCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Y6n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],M$=at("panel-left",Y6n);/** + */const bCn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],M$=at("panel-left",bCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Z6n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],O$=at("panel-right",Z6n);/** + */const yCn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],O$=at("panel-right",yCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const J6n=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],eCn=at("paperclip",J6n);/** + */const xCn=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],wCn=at("paperclip",xCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tCn=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],XS=at("pencil",tCn);/** + */const kCn=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],XS=at("pencil",kCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nCn=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],rCn=at("pin",nCn);/** + */const SCn=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],CCn=at("pin",SCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sCn=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],iCn=at("play",sCn);/** + */const ECn=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],NCn=at("play",ECn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aCn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qf=at("plus",aCn);/** + */const zCn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qf=at("plus",zCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oCn=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],xo=at("refresh-cw",oCn);/** + */const jCn=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],xo=at("refresh-cw",jCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cCn=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],lCn=at("rotate-cw",cCn);/** + */const ACn=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],TCn=at("rotate-cw",ACn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uCn=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],YS=at("scroll-text",uCn);/** + */const RCn=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],YS=at("scroll-text",RCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _Cn=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],D$=at("search",_Cn);/** + */const MCn=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],D$=at("search",MCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fCn=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Hj=at("server",fCn);/** + */const OCn=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Hj=at("server",OCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dCn=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dy=at("settings",dCn);/** + */const DCn=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],hy=at("settings",DCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hCn=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],L$=at("sliders-horizontal",hCn);/** + */const LCn=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],L$=at("sliders-horizontal",LCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pCn=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],mCn=at("square-pen",pCn);/** + */const ICn=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],$Cn=at("square-pen",ICn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gCn=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Xf=at("square-terminal",gCn);/** + */const BCn=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Xf=at("square-terminal",BCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vCn=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],bCn=at("sun",vCn);/** + */const PCn=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],FCn=at("sun",PCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yCn=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ko=at("terminal",yCn);/** + */const HCn=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ko=at("terminal",HCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xCn=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],wCn=at("toggle-right",xCn);/** + */const qCn=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],UCn=at("toggle-right",qCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kCn=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Yf=at("trash-2",kCn);/** + */const GCn=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Yf=at("trash-2",GCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SCn=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ZS=at("triangle-alert",SCn);/** + */const VCn=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ZS=at("triangle-alert",VCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CCn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ECn=at("upload",CCn);/** + */const KCn=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],WCn=at("upload",KCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NCn=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],JS=at("users",NCn);/** + */const QCn=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],JS=at("users",QCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zCn=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],jCn=at("wand-sparkles",zCn);/** + */const XCn=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],YCn=at("wand-sparkles",XCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ACn=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ur=at("x",ACn);/** + */const ZCn=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_r=at("x",ZCn);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TCn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],RCn=at("zap",TCn);function e_(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const MCn=["settings","harnesses","projects","compute","instances","environment","git","storage"],OCn=e=>MCn.some(n=>n===e),Zf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Xi=e=>typeof e=="string"&&e.length>0,M1=e=>e==null||Xi(e);function e6(e){if(!Zf(e))return;const n=(...t)=>Object.keys(e).every(r=>t.includes(r));switch(e.kind){case"home":if(n("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Xi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&M1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Xi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Xi(e.path)&&M1(e.sessionId)&&M1(e.ref)&&M1(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...Xi(e.sessionId)?{sessionId:e.sessionId}:{},...Xi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Xi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Xi(e.experimentId)&&Xi(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(n("kind","sessionId","promptId")&&Xi(e.sessionId)&&Xi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Xi(e.sessionId)&&Xi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(n("kind","sessionId")&&Xi(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function Mf(e){if(e==="/projects")return{kind:"home"};const n=e.split("/");if(n[0]!==""||n[1]!=="projects"||!n[2])return null;let t,r;try{t=decodeURIComponent(n[2]),r=decodeURIComponent(n[4]??"")}catch{return null}const s=i=>i.length>0&&i!=="."&&i!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(i);return s(t)?n.length===3||n.length===4&&n[3]===""?{kind:"resume",projectId:t}:n.length===4&&n[3]==="skills"?{kind:"skills",projectId:t}:n.length===5&&n[3]==="tasks"&&s(r)?{kind:"task",projectId:t,...r==="new"?{}:{sessionId:r}}:n.length===5&&n[3]==="settings"&&OCn(r)?{kind:"settings",projectId:t,section:r}:null:null}function hy(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const n=e.indexOf("?"),t=n===-1?e:e.slice(0,n),r=n===-1?"":e.slice(n+1),s=Mf(t);if(!s||s.kind==="resume")return null;const i=new URLSearchParams(r);if([...i.keys()].some(a=>a!=="pane")||i.getAll("pane").length>1)return null;if(i.has("pane"))try{if(!e6(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function Sv(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const qj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function I$(e,n){let t,r,s=!1,i=!1,a;async function o(c=!1){if(clearTimeout(a),i||(i=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const d=i;i=!1;try{await e(u,d),r=void 0}catch(_){r=u,n(_)}finally{s=!1,t!==void 0&&o()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var Tw={exports:{}},Uj;function DCn(){return Uj||(Uj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={};return(()=>{var r=t;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const i=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(i._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,i=s._renderService.dimensions;if(i.css.cell.width===0||i.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),_=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),p=u-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(_/i.css.cell.height))}}}})(),t})()))})(Tw)),Tw.exports}var LCn=DCn(),Rw={exports:{}},Gj;function ICn(){return Gj||(Gj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(d){try{const _=new URL(d),p=_.password&&_.username?`${_.protocol}//${_.username}:${_.password}@${_.host}`:_.username?`${_.protocol}//${_.username}@${_.host}`:`${_.protocol}//${_.host}`;return d.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(d,_,p,m={}){this._terminal=d,this._regex=_,this._handler=p,this._options=m}provideLinks(d,_){const p=u.computeLink(d,this._regex,this._terminal,this._handler);_(this._addCallbacks(p))}_addCallbacks(d){return d.map((_=>(_.leave=this._options.leave,_.hover=(p,m)=>{if(this._options.hover){const{range:w}=_;this._options.hover(p,m,w)}},_)))}};class u{static computeLink(_,p,m,w){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,y]=u._getWindowedLineStrings(_-1,m),x=v.join("");let b;const C=[];for(;b=k.exec(x);){const N=b[0];if(!c(N))continue;const[z,A]=u._mapStrIdx(m,y,0,b.index),[j,M]=u._mapStrIdx(m,z,A,N.length);if(z===-1||A===-1||j===-1||M===-1)continue;const D={start:{x:A+1,y:z+1},end:{x:M,y:j+1}};C.push({range:D,text:N,activate:w})}return C}static _getWindowedLineStrings(_,p){let m,w=_,k=_,v=0,y="";const x=[];if(m=p.buffer.active.getLine(_)){const b=m.translateToString(!0);if(m.isWrapped&&b[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--w))&&v<2048&&(y=m.translateToString(!0),v+=y.length,x.push(y),m.isWrapped&&y.indexOf(" ")===-1););x.reverse()}for(x.push(b),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(y=m.translateToString(!0),v+=y.length,x.push(y),y.indexOf(" ")===-1););}return[x,w]}static _mapStrIdx(_,p,m,w){const k=_.buffer.active,v=k.getNullCell();let y=m;for(;w;){const x=k.getLine(p);if(!x)return[-1,-1];for(let b=y;b{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(d,_){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(d=u,_={}){this._handler=d,this._options=_}activate(d){this._terminal=d;const _=this._options,p=_.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,_))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),i})()))})(Rw)),Rw.exports}var $Cn=ICn(),Mw={exports:{}},Vj;function BCn(){return Vj||(Vj=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const _=c(9042),p=c(9924),m=c(844),w=c(4725),k=c(2585),v=c(3656);let y=o.AccessibilityManager=class extends m.Disposable{constructor(x,b,C,N){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=N,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let z=0;zthis._handleBoundaryFocus(z,0),this._bottomBoundaryFocusListener=z=>this._handleBoundaryFocus(z,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((z=>this._handleResize(z.rows)))),this.register(this._terminal.onRender((z=>this._refreshRows(z.start,z.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((z=>this._handleChar(z)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` + */const JCn=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e7n=at("zap",JCn);function e_(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const t7n=["settings","harnesses","projects","compute","instances","environment","git","storage"],n7n=e=>t7n.some(n=>n===e),Zf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Xi=e=>typeof e=="string"&&e.length>0,O1=e=>e==null||Xi(e);function e6(e){if(!Zf(e))return;const n=(...t)=>Object.keys(e).every(r=>t.includes(r));switch(e.kind){case"home":if(n("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"||e.view==="terminal"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Xi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&O1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Xi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Xi(e.path)&&O1(e.sessionId)&&O1(e.ref)&&O1(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...Xi(e.sessionId)?{sessionId:e.sessionId}:{},...Xi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Xi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Xi(e.experimentId)&&Xi(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(n("kind","sessionId","promptId")&&Xi(e.sessionId)&&Xi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Xi(e.sessionId)&&Xi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(n("kind","sessionId")&&Xi(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function Mf(e){if(e==="/projects")return{kind:"home"};const n=e.split("/");if(n[0]!==""||n[1]!=="projects"||!n[2])return null;let t,r;try{t=decodeURIComponent(n[2]),r=decodeURIComponent(n[4]??"")}catch{return null}const s=i=>i.length>0&&i!=="."&&i!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(i);return s(t)?n.length===3||n.length===4&&n[3]===""?{kind:"resume",projectId:t}:n.length===4&&n[3]==="skills"?{kind:"skills",projectId:t}:n.length===5&&n[3]==="tasks"&&s(r)?{kind:"task",projectId:t,...r==="new"?{}:{sessionId:r}}:n.length===5&&n[3]==="settings"&&n7n(r)?{kind:"settings",projectId:t,section:r}:null:null}function py(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const n=e.indexOf("?"),t=n===-1?e:e.slice(0,n),r=n===-1?"":e.slice(n+1),s=Mf(t);if(!s||s.kind==="resume")return null;const i=new URLSearchParams(r);if([...i.keys()].some(a=>a!=="pane")||i.getAll("pane").length>1)return null;if(i.has("pane"))try{if(!e6(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function Cv(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const qj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function I$(e,n){let t,r,s=!1,i=!1,a;async function o(c=!1){if(clearTimeout(a),i||(i=c),s||t===void 0)return;s=!0;const u=t;t=void 0;const d=i;i=!1;try{await e(u,d),r=void 0}catch(f){r=u,n(f)}finally{s=!1,t!==void 0&&o()}}return{queue(c,u=0){t=c,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}var Rw={exports:{}},Uj;function r7n(){return Uj||(Uj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={};return(()=>{var r=t;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const i=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(i._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,i=s._renderService.dimensions;if(i.css.cell.width===0||i.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),f=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),p=u-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(f/i.css.cell.height))}}}})(),t})()))})(Rw)),Rw.exports}var s7n=r7n(),Mw={exports:{}},Gj;function i7n(){return Gj||(Gj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(d){try{const f=new URL(d),p=f.password&&f.username?`${f.protocol}//${f.username}:${f.password}@${f.host}`:f.username?`${f.protocol}//${f.username}@${f.host}`:`${f.protocol}//${f.host}`;return d.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(d,f,p,m={}){this._terminal=d,this._regex=f,this._handler=p,this._options=m}provideLinks(d,f){const p=u.computeLink(d,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(d){return d.map((f=>(f.leave=this._options.leave,f.hover=(p,m)=>{if(this._options.hover){const{range:w}=f;this._options.hover(p,m,w)}},f)))}};class u{static computeLink(f,p,m,w){const k=new RegExp(p.source,(p.flags||"")+"g"),[v,y]=u._getWindowedLineStrings(f-1,m),x=v.join("");let b;const C=[];for(;b=k.exec(x);){const N=b[0];if(!c(N))continue;const[z,A]=u._mapStrIdx(m,y,0,b.index),[j,M]=u._mapStrIdx(m,z,A,N.length);if(z===-1||A===-1||j===-1||M===-1)continue;const D={start:{x:A+1,y:z+1},end:{x:M,y:j+1}};C.push({range:D,text:N,activate:w})}return C}static _getWindowedLineStrings(f,p){let m,w=f,k=f,v=0,y="";const x=[];if(m=p.buffer.active.getLine(f)){const b=m.translateToString(!0);if(m.isWrapped&&b[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--w))&&v<2048&&(y=m.translateToString(!0),v+=y.length,x.push(y),m.isWrapped&&y.indexOf(" ")===-1););x.reverse()}for(x.push(b),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(y=m.translateToString(!0),v+=y.length,x.push(y),y.indexOf(" ")===-1););}return[x,w]}static _mapStrIdx(f,p,m,w){const k=f.buffer.active,v=k.getNullCell();let y=m;for(;w;){const x=k.getLine(p);if(!x)return[-1,-1];for(let b=y;b{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(d,f){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(d=u,f={}){this._handler=d,this._options=f}activate(d){this._terminal=d;const f=this._options,p=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),i})()))})(Mw)),Mw.exports}var a7n=i7n(),Ow={exports:{}},Vj;function o7n(){return Vj||(Vj=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const f=c(9042),p=c(9924),m=c(844),w=c(4725),k=c(2585),v=c(3656);let y=o.AccessibilityManager=class extends m.Disposable{constructor(x,b,C,N){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=N,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let z=0;zthis._handleBoundaryFocus(z,0),this._bottomBoundaryFocusListener=z=>this._handleBoundaryFocus(z,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((z=>this._handleResize(z.rows)))),this.register(this._terminal.onRender((z=>this._refreshRows(z.start,z.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((z=>this._handleChar(z)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` `)))),this.register(this._terminal.onA11yTab((z=>this._handleTab(z)))),this.register(this._terminal.onKey((z=>this._handleKey(z.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,v.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let b=0;b0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=_.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,b){this._liveRegionDebouncer.refresh(x,b,this._terminal.rows)}_renderRows(x,b){const C=this._terminal.buffer,N=C.lines.length.toString();for(let z=x;z<=b;z++){const A=C.lines.get(C.ydisp+z),j=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,j))||"",D=(C.ydisp+z+1).toString(),L=this._rowElements[z];L&&(M.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=M,this._rowColumns.set(L,j)),L.setAttribute("aria-posinset",D),L.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,b){const C=x.target,N=this._rowElements[b===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(b===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==N)return;let z,A;if(b===0?(z=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(z=this._rowElements.shift(),A=C,this._rowContainer.removeChild(z)),z.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),b===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(b===0?-1:1),this._rowElements[b===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let b={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.focusOffset};if((b.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||b.node===C.node&&b.offset>C.offset)&&([b,C]=[C,b]),b.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(b={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(b.node))return;const N=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:N,offset:((M=N.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(C.node))return;const z=({node:D,offset:L})=>{const B=D instanceof Text?D.parentNode:D;let U=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(B);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=L=this._terminal.cols&&(++U,Q=0),{row:U,column:Q}},A=z(b),j=z(C);if(A&&j){if(A.row>j.row||A.row===j.row&&A.column>=j.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(j.row-A.row)*this._terminal.cols-A.column+j.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let b=this._rowContainer.children.length;bx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function d(p,m,w,k){p=u(p=c(p),w.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),m.value=""}function _(p,m,w){const k=w.getBoundingClientRect(),v=p.clientX-k.left-10,y=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${y}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=c,o.bracketTextForPaste=u,o.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,m,w,k){p.stopPropagation(),p.clipboardData&&d(p.clipboardData.getData("text/plain"),m,w,k)},o.paste=d,o.moveTextAreaUnderMouseCursor=_,o.rightClickHandler=function(p,m,w,k,v){_(p,m,w),v&&k.rightClickSelect(p),m.value=k.selectionText,m.select()}},7239:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=c(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(d,_,p){this._css.set(d,_,p)}getCss(d,_){return this._css.get(d,_)}setColor(d,_,p){this._color.set(d,_,p)}getColor(d,_){return this._color.get(d,_)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,u,d,_){c.addEventListener(u,d,_);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,d,_))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(y,x,b,C){var N,z=arguments.length,A=z<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,b,C);else for(var j=y.length-1;j>=0;j--)(N=y[j])&&(A=(z<3?N(A):z>3?N(x,b,A):N(x,b))||A);return z>3&&A&&Object.defineProperty(x,b,A),A},d=this&&this.__param||function(y,x){return function(b,C){x(b,C,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const _=c(3656),p=c(8460),m=c(844),w=c(2585),k=c(4725);let v=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(y,x,b,C,N){super(),this._element=y,this._mouseService=x,this._renderService=b,this._bufferService=C,this._linkProviderService=N,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var z;this._lastMouseEvent=void 0,(z=this._activeProviderReplies)==null||z.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,_.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,_.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,_.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(y){this._lastMouseEvent=y;const x=this._positionFromMouseEvent(y,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const b=y.composedPath();for(let C=0;C{z==null||z.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=y.y);let b=!1;for(const[z,A]of this._linkProviderService.linkProviders.entries())x?(N=this._activeProviderReplies)!=null&&N.get(z)&&(b=this._checkLinkProviderResult(z,y,b)):A.provideLinks(y.y,(j=>{var D,L;if(this._isMouseOut)return;const M=j==null?void 0:j.map((B=>({link:B})));(D=this._activeProviderReplies)==null||D.set(z,M),b=this._checkLinkProviderResult(z,y,b),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(y.y,this._activeProviderReplies)}))}_removeIntersectingLinks(y,x){const b=new Set;for(let C=0;Cy?this._bufferService.cols:A.link.range.end.x;for(let D=j;D<=M;D++){if(b.has(D)){N.splice(z--,1);break}b.add(D)}}}}_checkLinkProviderResult(y,x,b){var z;if(!this._activeProviderReplies)return b;const C=this._activeProviderReplies.get(y);let N=!1;for(let A=0;Athis._linkAtPosition(j.link,x)));A&&(b=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!b)for(let A=0;Athis._linkAtPosition(M.link,x)));if(j){b=!0,this._handleNewLink(j);break}}return b}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(y){if(!this._currentLink)return;const x=this._positionFromMouseEvent(y,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(y,this._currentLink.link.text)}_clearCurrentLink(y,x){this._currentLink&&this._lastMouseEvent&&(!y||!x||this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(y){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(y.link,x)&&(this._currentLink=y,this._currentLink.state={decorations:{underline:y.link.decorations===void 0||y.link.decorations.underline,pointerCursor:y.link.decorations===void 0||y.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,y.link,this._lastMouseEvent),y.link.decorations={},Object.defineProperties(y.link.decorations,{pointerCursor:{get:()=>{var b,C;return(C=(b=this._currentLink)==null?void 0:b.state)==null?void 0:C.decorations.pointerCursor},set:b=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==b&&(this._currentLink.state.decorations.pointerCursor=b,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",b))}},underline:{get:()=>{var b,C;return(C=(b=this._currentLink)==null?void 0:b.state)==null?void 0:C.decorations.underline},set:b=>{var C,N,z;(C=this._currentLink)!=null&&C.state&&((z=(N=this._currentLink)==null?void 0:N.state)==null?void 0:z.decorations.underline)!==b&&(this._currentLink.state.decorations.underline=b,this._currentLink.state.isHovered&&this._fireUnderlineEvent(y.link,b))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((b=>{if(!this._currentLink)return;const C=b.start===0?0:b.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+b.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const z=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);z&&this._askForLink(z,!1)}}))))}_linkHover(y,x,b){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&y.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(b,x.text)}_fireUnderlineEvent(y,x){const b=y.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(b.start.x-1,b.start.y-C-1,b.end.x,b.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(y,x,b){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&y.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(b,x.text)}_linkAtPosition(y,x){const b=y.range.start.y*this._bufferService.cols+y.range.start.x,C=y.range.end.y*this._bufferService.cols+y.range.end.x,N=x.y*this._bufferService.cols+x.x;return b<=N&&N<=C}_positionFromMouseEvent(y,x,b){const C=b.getCoords(y,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(y,x,b,C,N){return{x1:y,y1:x,x2:b,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([d(1,k.IMouseService),d(2,k.IRenderService),d(3,w.IBufferService),d(4,k.ILinkProviderService)],v)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,c){var u=this&&this.__decorate||function(k,v,y,x){var b,C=arguments.length,N=C<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,y,x);else for(var z=k.length-1;z>=0;z--)(b=k[z])&&(N=(C<3?b(N):C>3?b(v,y,N):b(v,y))||N);return C>3&&N&&Object.defineProperty(v,y,N),N},d=this&&this.__param||function(k,v){return function(y,x){v(y,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const _=c(511),p=c(2585);let m=o.OscLinkProvider=class{constructor(k,v,y){this._bufferService=k,this._optionsService=v,this._oscLinkService=y}provideLinks(k,v){var M;const y=this._bufferService.buffer.lines.get(k-1);if(!y)return void v(void 0);const x=[],b=this._optionsService.rawOptions.linkHandler,C=new _.CellData,N=y.getTrimmedLength();let z=-1,A=-1,j=!1;for(let D=0;Db?b.activate(H,Q,B):w(0,Q),hover:(H,Q)=>{var K;return(K=b==null?void 0:b.hover)==null?void 0:K.call(b,H,Q,B)},leave:(H,Q)=>{var K;return(K=b==null?void 0:b.leave)==null?void 0:K.call(b,H,Q,B)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=D,z=C.extended.urlId):(A=-1,z=-1)}}v(x)}};function w(k,v){if(confirm(`Do you want to navigate to ${v}? +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,b){this._liveRegionDebouncer.refresh(x,b,this._terminal.rows)}_renderRows(x,b){const C=this._terminal.buffer,N=C.lines.length.toString();for(let z=x;z<=b;z++){const A=C.lines.get(C.ydisp+z),j=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,j))||"",D=(C.ydisp+z+1).toString(),L=this._rowElements[z];L&&(M.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=M,this._rowColumns.set(L,j)),L.setAttribute("aria-posinset",D),L.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,b){const C=x.target,N=this._rowElements[b===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(b===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==N)return;let z,A;if(b===0?(z=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(z=this._rowElements.shift(),A=C,this._rowContainer.removeChild(z)),z.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),b===0){const j=this._createAccessibilityTreeNode();this._rowElements.unshift(j),this._rowContainer.insertAdjacentElement("afterbegin",j)}else{const j=this._createAccessibilityTreeNode();this._rowElements.push(j),this._rowContainer.appendChild(j)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(b===0?-1:1),this._rowElements[b===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let b={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.focusOffset};if((b.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||b.node===C.node&&b.offset>C.offset)&&([b,C]=[C,b]),b.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(b={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(b.node))return;const N=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:N,offset:((M=N.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(C.node))return;const z=({node:D,offset:L})=>{const B=D instanceof Text?D.parentNode:D;let U=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(B);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=L=this._terminal.cols&&(++U,Q=0),{row:U,column:Q}},A=z(b),j=z(C);if(A&&j){if(A.row>j.row||A.row===j.row&&A.column>=j.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(j.row-A.row)*this._terminal.cols-A.column+j.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let b=this._rowContainer.children.length;bx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function d(p,m,w,k){p=u(p=c(p),w.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),m.value=""}function f(p,m,w){const k=w.getBoundingClientRect(),v=p.clientX-k.left-10,y=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${y}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=c,o.bracketTextForPaste=u,o.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,m,w,k){p.stopPropagation(),p.clipboardData&&d(p.clipboardData.getData("text/plain"),m,w,k)},o.paste=d,o.moveTextAreaUnderMouseCursor=f,o.rightClickHandler=function(p,m,w,k,v){f(p,m,w),v&&k.rightClickSelect(p),m.value=k.selectionText,m.select()}},7239:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=c(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(d,f,p){this._css.set(d,f,p)}getCss(d,f){return this._css.get(d,f)}setColor(d,f,p){this._color.set(d,f,p)}getColor(d,f){return this._color.get(d,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,u,d,f){c.addEventListener(u,d,f);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,d,f))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(y,x,b,C){var N,z=arguments.length,A=z<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,b,C);else for(var j=y.length-1;j>=0;j--)(N=y[j])&&(A=(z<3?N(A):z>3?N(x,b,A):N(x,b))||A);return z>3&&A&&Object.defineProperty(x,b,A),A},d=this&&this.__param||function(y,x){return function(b,C){x(b,C,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const f=c(3656),p=c(8460),m=c(844),w=c(2585),k=c(4725);let v=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(y,x,b,C,N){super(),this._element=y,this._mouseService=x,this._renderService=b,this._bufferService=C,this._linkProviderService=N,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var z;this._lastMouseEvent=void 0,(z=this._activeProviderReplies)==null||z.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(y){this._lastMouseEvent=y;const x=this._positionFromMouseEvent(y,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const b=y.composedPath();for(let C=0;C{z==null||z.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=y.y);let b=!1;for(const[z,A]of this._linkProviderService.linkProviders.entries())x?(N=this._activeProviderReplies)!=null&&N.get(z)&&(b=this._checkLinkProviderResult(z,y,b)):A.provideLinks(y.y,(j=>{var D,L;if(this._isMouseOut)return;const M=j==null?void 0:j.map((B=>({link:B})));(D=this._activeProviderReplies)==null||D.set(z,M),b=this._checkLinkProviderResult(z,y,b),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(y.y,this._activeProviderReplies)}))}_removeIntersectingLinks(y,x){const b=new Set;for(let C=0;Cy?this._bufferService.cols:A.link.range.end.x;for(let D=j;D<=M;D++){if(b.has(D)){N.splice(z--,1);break}b.add(D)}}}}_checkLinkProviderResult(y,x,b){var z;if(!this._activeProviderReplies)return b;const C=this._activeProviderReplies.get(y);let N=!1;for(let A=0;Athis._linkAtPosition(j.link,x)));A&&(b=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!b)for(let A=0;Athis._linkAtPosition(M.link,x)));if(j){b=!0,this._handleNewLink(j);break}}return b}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(y){if(!this._currentLink)return;const x=this._positionFromMouseEvent(y,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(y,this._currentLink.link.text)}_clearCurrentLink(y,x){this._currentLink&&this._lastMouseEvent&&(!y||!x||this._currentLink.link.range.start.y>=y&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(y){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(y.link,x)&&(this._currentLink=y,this._currentLink.state={decorations:{underline:y.link.decorations===void 0||y.link.decorations.underline,pointerCursor:y.link.decorations===void 0||y.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,y.link,this._lastMouseEvent),y.link.decorations={},Object.defineProperties(y.link.decorations,{pointerCursor:{get:()=>{var b,C;return(C=(b=this._currentLink)==null?void 0:b.state)==null?void 0:C.decorations.pointerCursor},set:b=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==b&&(this._currentLink.state.decorations.pointerCursor=b,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",b))}},underline:{get:()=>{var b,C;return(C=(b=this._currentLink)==null?void 0:b.state)==null?void 0:C.decorations.underline},set:b=>{var C,N,z;(C=this._currentLink)!=null&&C.state&&((z=(N=this._currentLink)==null?void 0:N.state)==null?void 0:z.decorations.underline)!==b&&(this._currentLink.state.decorations.underline=b,this._currentLink.state.isHovered&&this._fireUnderlineEvent(y.link,b))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((b=>{if(!this._currentLink)return;const C=b.start===0?0:b.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+b.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const z=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);z&&this._askForLink(z,!1)}}))))}_linkHover(y,x,b){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&y.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(b,x.text)}_fireUnderlineEvent(y,x){const b=y.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(b.start.x-1,b.start.y-C-1,b.end.x,b.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(y,x,b){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&y.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(b,x.text)}_linkAtPosition(y,x){const b=y.range.start.y*this._bufferService.cols+y.range.start.x,C=y.range.end.y*this._bufferService.cols+y.range.end.x,N=x.y*this._bufferService.cols+x.x;return b<=N&&N<=C}_positionFromMouseEvent(y,x,b){const C=b.getCoords(y,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(y,x,b,C,N){return{x1:y,y1:x,x2:b,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([d(1,k.IMouseService),d(2,k.IRenderService),d(3,w.IBufferService),d(4,k.ILinkProviderService)],v)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,c){var u=this&&this.__decorate||function(k,v,y,x){var b,C=arguments.length,N=C<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,y,x);else for(var z=k.length-1;z>=0;z--)(b=k[z])&&(N=(C<3?b(N):C>3?b(v,y,N):b(v,y))||N);return C>3&&N&&Object.defineProperty(v,y,N),N},d=this&&this.__param||function(k,v){return function(y,x){v(y,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const f=c(511),p=c(2585);let m=o.OscLinkProvider=class{constructor(k,v,y){this._bufferService=k,this._optionsService=v,this._oscLinkService=y}provideLinks(k,v){var M;const y=this._bufferService.buffer.lines.get(k-1);if(!y)return void v(void 0);const x=[],b=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=y.getTrimmedLength();let z=-1,A=-1,j=!1;for(let D=0;Db?b.activate(H,Q,B):w(0,Q),hover:(H,Q)=>{var K;return(K=b==null?void 0:b.hover)==null?void 0:K.call(b,H,Q,B)},leave:(H,Q)=>{var K;return(K=b==null?void 0:b.leave)==null?void 0:K.call(b,H,Q,B)}})}j=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=D,z=C.extended.urlId):(A=-1,z=-1)}}v(x)}};function w(k,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([d(0,p.IBufferService),d(1,p.IOptionsService),d(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),d=c(3656),_=c(3551),p=c(9042),m=c(3730),w=c(1680),k=c(3107),v=c(5744),y=c(2950),x=c(1296),b=c(428),C=c(4269),N=c(5114),z=c(8934),A=c(3230),j=c(9312),M=c(4725),D=c(6731),L=c(8055),B=c(8969),U=c(8460),H=c(844),Q=c(6114),K=c(8437),Z=c(2584),ee=c(7399),$=c(5941),I=c(9074),F=c(2585),q=c(5435),V=c(4567),ie=c(779);class oe extends B.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ne={}){super(ne),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(I.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((G,ae)=>this.refresh(G,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,H.toDisposable)((()=>{var G,ae;this._customKeyEventHandler=void 0,(ae=(G=this.element)==null?void 0:G.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(ne){if(this._themeService)for(const G of ne){let ae,le="";switch(G.index){case 256:ae="foreground",le="10";break;case 257:ae="background",le="11";break;case 258:ae="cursor",le="12";break;default:ae="ansi",le="4;"+G.index}switch(G.type){case 0:const ge=L.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${le};${(0,$.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((be=>be.ansi[G.index]=L.channels.toColor(...G.color)));else{const be=ae;this._themeService.modifyColors((Ee=>Ee[be]=L.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ne){ne?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ne){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ne;return(ne=this.textarea)==null?void 0:ne.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const ne=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(ne);if(!G)return;const ae=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ge=G.getWidth(ae),be=this._renderService.dimensions.css.cell.width*ge,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Fe=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Fe+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=be+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,u.copyHandler)(G,this._selectionService)})));const ne=G=>(0,u.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",ne)),this.register((0,d.addDisposableDomListener)(this.element,"paste",ne)),Q.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,u.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(ne=>this._keyUp(ne)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(ne=>this._keyDown(ne)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(ne=>this._keyPress(ne)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(ne=>this._compositionHelper.compositionupdate(ne)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(ne=>this._inputEvent(ne)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ne){var ae;if(!ne)throw new Error("Terminal requires a parent element.");if(ne.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ne.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),ne.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,ne.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(y.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(z.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(_.Linkifier,this.screenElement)),this.element.appendChild(G);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ne=this,G=this.element;function ae(be){const Ee=ne._mouseService.getMouseReportCoords(be,ne.screenElement);if(!Ee)return!1;let Fe,Ye;switch(be.overrideType||be.type){case"mousemove":Ye=32,be.buttons===void 0?(Fe=3,be.button!==void 0&&(Fe=be.button<3?be.button:3)):Fe=1&be.buttons?0:4&be.buttons?1:2&be.buttons?2:3;break;case"mouseup":Ye=0,Fe=be.button<3?be.button:3;break;case"mousedown":Ye=1,Fe=be.button<3?be.button:3;break;case"wheel":if(ne._customWheelEventHandler&&ne._customWheelEventHandler(be)===!1||ne.viewport.getLinesScrolled(be)===0)return!1;Ye=be.deltaY<0?0:1,Fe=4;break;default:return!1}return!(Ye===void 0||Fe===void 0||Fe>4)&&ne.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Fe,action:Ye,ctrl:be.ctrlKey,alt:be.altKey,shift:be.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:be=>(ae(be),be.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(be)),wheel:be=>(ae(be),this.cancel(be,!0)),mousedrag:be=>{be.buttons&&ae(be)},mousemove:be=>{be.buttons||ae(be)}};this.register(this.coreMouseService.onProtocolChange((be=>{be?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(be)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&be?le.mousemove||(G.addEventListener("mousemove",ge.mousemove),le.mousemove=ge.mousemove):(G.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&be?le.wheel||(G.addEventListener("wheel",ge.wheel,{passive:!1}),le.wheel=ge.wheel):(G.removeEventListener("wheel",le.wheel),le.wheel=null),2&be?le.mouseup||(le.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&be?le.mousedrag||(le.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(G,"mousedown",(be=>{if(be.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(be))return ae(be),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(be)}))),this.register((0,d.addDisposableDomListener)(G,"wheel",(be=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(be)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(be);if(Ee===0)return;const Fe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(be.deltaY<0?"A":"B");let Ye="";for(let Me=0;Me{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(be),this.cancel(be)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(G,"touchmove",(be=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(be)?void 0:this.cancel(be)}),{passive:!1}))}refresh(ne,G){var ae;(ae=this._renderService)==null||ae.refreshRows(ne,G)}updateCursorStyle(ne){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(ne)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(ne,G,ae=0){var le;ae===1?(super.scrollLines(ne,G,ae),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ne)}paste(ne){(0,u.paste)(ne,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ne){this._customKeyEventHandler=ne}attachCustomWheelEventHandler(ne){this._customWheelEventHandler=ne}registerLinkProvider(ne){return this._linkProviderService.registerLinkProvider(ne)}registerCharacterJoiner(ne){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(ne);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(ne){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ne)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ne){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ne)}registerDecoration(ne){return this._decorationService.registerDecoration(ne)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ne,G,ae){this._selectionService.setSelection(ne,G,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var ne;(ne=this._selectionService)==null||ne.clearSelection()}selectAll(){var ne;(ne=this._selectionService)==null||ne.selectAll()}selectLines(ne,G){var ae;(ae=this._selectionService)==null||ae.selectLines(ne,G)}_keyDown(ne){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&ne.altKey;if(!G&&!this._compositionHelper.keydown(ne))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||ne.key!=="Dead"&&ne.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(ne,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ne),ae.type===3||ae.type===2){const le=this.rows-1;return this.scrollLines(ae.type===2?-le:le),this.cancel(ne,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ne)||(ae.cancel&&this.cancel(ne,!0),!ae.key||!!(ne.key&&!ne.ctrlKey&&!ne.altKey&&!ne.metaKey&&ne.key.length===1&&ne.key.charCodeAt(0)>=65&&ne.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==Z.C0.ETX&&ae.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:ne}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||ne.altKey||ne.ctrlKey?this.cancel(ne,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ne,G){const ae=ne.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||ne.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||ne.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?ae:ae&&(!G.keyCode||G.keyCode>47)}_keyUp(ne){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(ne)||this.focus(),this.updateCursorStyle(ne),this._keyPressHandled=!1)}_keyPress(ne){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1)return!1;if(this.cancel(ne),ne.charCode)G=ne.charCode;else if(ne.which===null||ne.which===void 0)G=ne.keyCode;else{if(ne.which===0||ne.charCode===0)return!1;G=ne.which}return!(!G||(ne.altKey||ne.ctrlKey||ne.metaKey)&&!this._isThirdLevelShift(this.browser,ne)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:ne}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ne){if(ne.data&&ne.inputType==="insertText"&&(!ne.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=ne.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(ne),!0}return!1}resize(ne,G){ne!==this.cols||G!==this.rows?super.resize(ne,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ne,G){var ae,le;(ae=this._charSizeService)==null||ae.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ne;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let G=1;G{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const _=Date.now();if(_-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=_,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=_-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,o,c){var u=this&&this.__decorate||function(y,x,b,C){var N,z=arguments.length,A=z<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,b,C);else for(var j=y.length-1;j>=0;j--)(N=y[j])&&(A=(z<3?N(A):z>3?N(x,b,A):N(x,b))||A);return z>3&&A&&Object.defineProperty(x,b,A),A},d=this&&this.__param||function(y,x){return function(b,C){x(b,C,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const _=c(3656),p=c(4725),m=c(8460),w=c(844),k=c(2585);let v=o.Viewport=class extends w.Disposable{constructor(y,x,b,C,N,z,A,j){super(),this._viewportElement=y,this._scrollArea=x,this._bufferService=b,this._optionsService=C,this._charSizeService=N,this._renderService=z,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(y){this._viewportElement.style.backgroundColor=y.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(y){if(y)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const y=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==y&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=y),this._refreshAnimationFrame=null}syncScrollArea(y=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(y);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(y)}_handleScroll(y){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const y=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(y*(this._smoothScrollState.target-this._smoothScrollState.origin)),y<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(y,x){const b=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&b0&&(b=B),C=""}}return{bufferElements:N,cursorElement:b}}getLinesScrolled(y){if(y.deltaY===0||y.shiftKey)return 0;let x=this._applyScrollModifier(y.deltaY,y);return y.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):y.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(y,x){const b=this._optionsService.rawOptions.fastScrollModifier;return b==="alt"&&x.altKey||b==="ctrl"&&x.ctrlKey||b==="shift"&&x.shiftKey?y*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:y*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(y){this._lastTouchY=y.touches[0].pageY}handleTouchMove(y){const x=this._lastTouchY-y.touches[0].pageY;return this._lastTouchY=y.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(y,x))}};o.Viewport=v=u([d(2,k.IBufferService),d(3,k.IOptionsService),d(4,p.ICharSizeService),d(5,p.IRenderService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,y,x){var b,C=arguments.length,N=C<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,y,x);else for(var z=k.length-1;z>=0;z--)(b=k[z])&&(N=(C<3?b(N):C>3?b(v,y,N):b(v,y))||N);return C>3&&N&&Object.defineProperty(v,y,N),N},d=this&&this.__param||function(k,v){return function(y,x){v(y,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const _=c(4725),p=c(844),m=c(2585);let w=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,y,x,b){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=y,this._decorationService=x,this._renderService=b,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((C=>this._removeDecoration(C)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const y=k.options.x??0;return y&&y>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let y=this._decorationElements.get(k);y||(y=this._createElement(k),k.element=y,this._decorationElements.set(k,y),this._container.appendChild(y),k.onDispose((()=>{this._decorationElements.delete(k),y.remove()}))),y.style.top=v*this._renderService.dimensions.css.cell.height+"px",y.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(y)}}_refreshXPosition(k,v=k.element){if(!v)return;const y=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=y?y*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=y?y*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=w=u([d(1,m.IBufferService),d(2,_.ICoreBrowserService),d(3,m.IDecorationService),d(4,_.IRenderService)],w)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,d){return u>=c.startBufferLine-this._linePadding[d||"full"]&&u<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,o,c){var u=this&&this.__decorate||function(b,C,N,z){var A,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,C,N,z);else for(var D=b.length-1;D>=0;D--)(A=b[D])&&(M=(j<3?A(M):j>3?A(C,N,M):A(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},d=this&&this.__param||function(b,C){return function(N,z){C(N,z,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const _=c(5871),p=c(4725),m=c(844),w=c(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},y={full:0,left:0,center:0,right:0};let x=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(b,C,N,z,A,j,M){var L;super(),this._viewportElement=b,this._screenElement=C,this._bufferService=N,this._decorationService=z,this._renderService=A,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new _.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(L=this._viewportElement.parentElement)==null||L.insertBefore(this._canvas,this._viewportElement);const D=this._canvas.getContext("2d");if(!D)throw new Error("Ctx cannot be null");this._ctx=D,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var B;(B=this._canvas)==null||B.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const b=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=b,v.center=C,v.right=b,this._refreshDrawHeightConstants(),y.full=0,y.left=0,y.center=v.left,y.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const b=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(b,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const b=this._colorZoneStore.zones;for(const C of b)C.position!=="full"&&this._renderColorZone(C);for(const C of b)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(b){this._ctx.fillStyle=b.color,this._ctx.fillRect(y[b.position||"full"],Math.round((this._canvas.height-1)*(b.startBufferLine/this._bufferService.buffers.active.lines.length)-k[b.position||"full"]/2),v[b.position||"full"],Math.round((this._canvas.height-1)*((b.endBufferLine-b.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[b.position||"full"]))}_queueRefresh(b,C){this._shouldUpdateDimensions=b||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=x=u([d(2,w.IBufferService),d(3,w.IDecorationService),d(4,p.IRenderService),d(5,w.IOptionsService),d(6,p.ICoreBrowserService)],x)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,y,x){var b,C=arguments.length,N=C<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,y,x);else for(var z=k.length-1;z>=0;z--)(b=k[z])&&(N=(C<3?b(N):C>3?b(v,y,N):b(v,y))||N);return C>3&&N&&Object.defineProperty(v,y,N),N},d=this&&this.__param||function(k,v){return function(y,x){v(y,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const _=c(4725),p=c(2585),m=c(2584);let w=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,y,x,b,C){this._textarea=k,this._compositionView=v,this._bufferService=y,this._optionsService=x,this._coreService=b,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let y;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,y=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),y.length>0&&this._coreService.triggerDataEvent(y,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,y=v.replace(k,"");this._dataAlreadySent=y,v.length>k.length?this._coreService.triggerDataEvent(y,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=w=u([d(2,p.IBufferService),d(3,p.IOptionsService),d(4,p.ICoreService),d(5,_.IRenderService)],w)},9806:(a,o)=>{function c(u,d,_){const p=_.getBoundingClientRect(),m=u.getComputedStyle(_),w=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[d.clientX-p.left-w,d.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,d,_,p,m,w,k,v,y){if(!w)return;const x=c(u,d,_);return x?(x[0]=Math.ceil((x[0]+(y?k/2:0))/k),x[1]=Math.ceil(x[1]/v),x[0]=Math.min(Math.max(x[0],1),p+(y?1:0)),x[1]=Math.min(Math.max(x[1],1),m),x):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function d(v,y,x,b){const C=v-_(v,x),N=y-_(y,x),z=Math.abs(C-N)-(function(A,j,M){let D=0;const L=A-_(A,M),B=j-_(j,M);for(let U=0;U=0&&vy?"A":"B"}function m(v,y,x,b,C,N){let z=v,A=y,j="";for(;z!==x||A!==b;)z+=C?1:-1,C&&z>N.cols-1?(j+=N.buffer.translateBufferLineToString(A,!1,v,z),z=0,v=0,A++):!C&&z<0&&(j+=N.buffer.translateBufferLineToString(A,!1,0,v+1),z=N.cols-1,v=z,A--);return j+N.buffer.translateBufferLineToString(A,!1,v,z)}function w(v,y){const x=y?"O":"[";return u.C0.ESC+x+v}function k(v,y){v=Math.floor(v);let x="";for(let b=0;b0?L-_(L,B):M;const Q=L,K=(function(Z,ee,$,I,F,q){let V;return V=d($,I,F,q).length>0?I-_(I,F):ee,Z<$&&V<=I||Z>=$&&Vv?"D":"C",k(Math.abs(C-v),w(z,b));z=N>y?"D":"C";const A=Math.abs(N-y);return k((function(j,M){return M.cols-j})(N>y?v:C,x)+(A-1)*x.cols+1+((N>y?C:v)-1),w(z,b))}},1296:function(a,o,c){var u=this&&this.__decorate||function(U,H,Q,K){var Z,ee=arguments.length,$=ee<3?H:K===null?K=Object.getOwnPropertyDescriptor(H,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(U,H,Q,K);else for(var I=U.length-1;I>=0;I--)(Z=U[I])&&($=(ee<3?Z($):ee>3?Z(H,Q,$):Z(H,Q))||$);return ee>3&&$&&Object.defineProperty(H,Q,$),$},d=this&&this.__param||function(U,H){return function(Q,K){H(Q,K,U)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const _=c(3787),p=c(2550),m=c(2223),w=c(6171),k=c(6052),v=c(4725),y=c(8055),x=c(8460),b=c(844),C=c(2585),N="xterm-dom-renderer-owner-",z="xterm-rows",A="xterm-fg-",j="xterm-bg-",M="xterm-focus",D="xterm-selection";let L=1,B=o.DomRenderer=class extends b.Disposable{constructor(U,H,Q,K,Z,ee,$,I,F,q,V,ie,oe){super(),this._terminal=U,this._document=H,this._element=Q,this._screenElement=K,this._viewportElement=Z,this._helperContainer=ee,this._linkifier2=$,this._charSizeService=F,this._optionsService=q,this._bufferService=V,this._coreBrowserService=ie,this._themeService=oe,this._terminalClass=L++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(z),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(D),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ce=>this._injectCss(ce)))),this._injectCss(this._themeService.colors),this._rowFactory=I.createInstance(_.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ce=>this._handleLinkHover(ce)))),this.register(this._linkifier2.onHideLinkUnderline((ce=>this._handleLinkLeave(ce)))),this.register((0,b.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${z} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${z} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${z} .xterm-dim { color: ${y.color.multiplyOpacity(U.foreground,.5).css};}`,H+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${K} { 50% { box-shadow: none; }}`,H+=`@keyframes ${Z} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,H+=`${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,$]of U.ansi.entries())H+=`${this._terminalSelector} .${A}${ee} { color: ${$.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${y.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${j}${ee} { background-color: ${$.css}; }`;H+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${y.color.opaque(U.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${y.color.multiplyOpacity(y.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,H){for(let Q=this._rowElements.length;Q<=H;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,H){this._refreshRowElements(U,H),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,H,Q),this.renderRows(0,this._bufferService.rows-1),!U||!H)return;this._selectionRenderModel.update(this._terminal,U,H,Q);const K=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||$<0)return;const I=this._document.createDocumentFragment();if(Q){const F=U[0]>H[0];I.appendChild(this._createSelectionElement(ee,F?H[0]:U[0],F?U[0]:H[0],$-ee+1))}else{const F=K===ee?U[0]:0,q=ee===Z?H[0]:this._bufferService.cols;I.appendChild(this._createSelectionElement(ee,F,q));const V=$-ee-1;if(I.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,V)),ee!==$){const ie=Z===$?H[0]:this._bufferService.cols;I.appendChild(this._createSelectionElement($,0,ie))}}this._selectionContainer.appendChild(I)}_createSelectionElement(U,H,Q,K=1){const Z=this._document.createElement("div"),ee=H*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Q-H);return ee+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-ee),Z.style.height=K*this.dimensions.css.cell.height+"px",Z.style.top=U*this.dimensions.css.cell.height+"px",Z.style.left=`${ee}px`,Z.style.width=`${$}px`,Z}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const U of this._rowElements)U.replaceChildren()}renderRows(U,H){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,Z=Math.min(Q.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,I=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=U;F<=H;F++){const q=F+Q.ydisp,V=this._rowElements[F],ie=Q.lines.get(q);if(!V||!ie)break;V.replaceChildren(...this._rowFactory.createRow(ie,q,q===K,$,I,Z,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,H,Q,K,Z,ee){Q<0&&(U=0),K<0&&(H=0);const $=this._bufferService.rows-1;Q=Math.max(Math.min(Q,$),0),K=Math.max(Math.min(K,$),0),Z=Math.min(Z,this._bufferService.cols);const I=this._bufferService.buffer,F=I.ybase+I.y,q=Math.min(I.x,Z-1),V=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let ce=Q;ce<=K;++ce){const ne=ce+I.ydisp,G=this._rowElements[ce],ae=I.lines.get(ne);if(!G||!ae)break;G.replaceChildren(...this._rowFactory.createRow(ae,ne,ne===F,ie,oe,q,V,this.dimensions.css.cell.width,this._widthCache,ee?ce===Q?U:0:-1,ee?(ce===K?H:Z)-1:-1))}}};o.DomRenderer=B=u([d(7,C.IInstantiationService),d(8,v.ICharSizeService),d(9,C.IOptionsService),d(10,C.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],B)},3787:function(a,o,c){var u=this&&this.__decorate||function(z,A,j,M){var D,L=arguments.length,B=L<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(z,A,j,M);else for(var U=z.length-1;U>=0;U--)(D=z[U])&&(B=(L<3?D(B):L>3?D(A,j,B):D(A,j))||B);return L>3&&B&&Object.defineProperty(A,j,B),B},d=this&&this.__param||function(z,A){return function(j,M){A(j,M,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const _=c(2223),p=c(643),m=c(511),w=c(2585),k=c(8055),v=c(4725),y=c(4269),x=c(6171),b=c(3734);let C=o.DomRendererRowFactory=class{constructor(z,A,j,M,D,L,B){this._document=z,this._characterJoinerService=A,this._optionsService=j,this._coreBrowserService=M,this._coreService=D,this._decorationService=L,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(z,A,j){this._selectionStart=z,this._selectionEnd=A,this._columnSelectMode=j}createRow(z,A,j,M,D,L,B,U,H,Q,K){const Z=[],ee=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let I,F=z.getNoBgTrimmedLength();j&&F0&&Ee===ee[0][0]){Ye=!0;const Be=ee.shift();Ue=new y.JoinedCellData(this._workCell,z.translateToString(!0,Be[0],Be[1]),Be[1]-Be[0]),Me=Be[1]-1,Fe=Ue.getWidth()}const dt=this._isCellInSelection(Ee,A),wt=j&&Ee===L,Ft=be&&Ee>=Q&&Ee<=K;let Ht=!1;this._decorationService.forEachDecorationAtCell(Ee,A,void 0,(Be=>{Ht=!0}));let qt=Ue.getChars()||p.WHITESPACE_CELL_CHAR;if(qt===" "&&(Ue.isUnderline()||Ue.isOverline())&&(qt=" "),le=Fe*U-H.get(qt,Ue.isBold(),Ue.isItalic()),I){if(q&&(dt&&ae||!dt&&!ae&&Ue.bg===ie)&&(dt&&ae&&$.selectionForeground||Ue.fg===oe)&&Ue.extended.ext===ce&&Ft===ne&&le===G&&!wt&&!Ye&&!Ht){Ue.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=qt,q++;continue}q&&(I.textContent=V),I=this._document.createElement("span"),q=0,V=""}else I=this._document.createElement("span");if(ie=Ue.bg,oe=Ue.fg,ce=Ue.extended.ext,ne=Ft,G=le,ae=dt,Ye&&L>=Ee&&L<=Me&&(L=Ee),!this._coreService.isCursorHidden&&wt&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&ge.push("xterm-cursor-blink"),ge.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(Ue.isBold()&&ge.push("xterm-bold"),Ue.isItalic()&&ge.push("xterm-italic"),Ue.isDim()&&ge.push("xterm-dim"),V=Ue.isInvisible()?p.WHITESPACE_CELL_CHAR:Ue.getChars()||p.WHITESPACE_CELL_CHAR,Ue.isUnderline()&&(ge.push(`xterm-underline-${Ue.extended.underlineStyle}`),V===" "&&(V=" "),!Ue.isUnderlineColorDefault()))if(Ue.isUnderlineColorRGB())I.style.textDecorationColor=`rgb(${b.AttributeData.toColorRGB(Ue.getUnderlineColor()).join(",")})`;else{let Be=Ue.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ue.isBold()&&Be<8&&(Be+=8),I.style.textDecorationColor=$.ansi[Be].css}Ue.isOverline()&&(ge.push("xterm-overline"),V===" "&&(V=" ")),Ue.isStrikethrough()&&ge.push("xterm-strikethrough"),Ft&&(I.style.textDecoration="underline");let $e=Ue.getFgColor(),ot=Ue.getFgColorMode(),Ce=Ue.getBgColor(),me=Ue.getBgColorMode();const ze=!!Ue.isInverse();if(ze){const Be=$e;$e=Ce,Ce=Be;const un=ot;ot=me,me=un}let He,We,ct,St=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,A,void 0,(Be=>{Be.options.layer!=="top"&&St||(Be.backgroundColorRGB&&(me=50331648,Ce=Be.backgroundColorRGB.rgba>>8&16777215,He=Be.backgroundColorRGB),Be.foregroundColorRGB&&(ot=50331648,$e=Be.foregroundColorRGB.rgba>>8&16777215,We=Be.foregroundColorRGB),St=Be.options.layer==="top")})),!St&&dt&&(He=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,Ce=He.rgba>>8&16777215,me=50331648,St=!0,$.selectionForeground&&(ot=50331648,$e=$.selectionForeground.rgba>>8&16777215,We=$.selectionForeground)),St&&ge.push("xterm-decoration-top"),me){case 16777216:case 33554432:ct=$.ansi[Ce],ge.push(`xterm-bg-${Ce}`);break;case 50331648:ct=k.channels.toColor(Ce>>16,Ce>>8&255,255&Ce),this._addStyle(I,`background-color:#${N((Ce>>>0).toString(16),"0",6)}`);break;default:ze?(ct=$.foreground,ge.push(`xterm-bg-${_.INVERTED_DEFAULT_COLOR}`)):ct=$.background}switch(He||Ue.isDim()&&(He=k.color.multiplyOpacity(ct,.5)),ot){case 16777216:case 33554432:Ue.isBold()&&$e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&($e+=8),this._applyMinimumContrast(I,ct,$.ansi[$e],Ue,He,void 0)||ge.push(`xterm-fg-${$e}`);break;case 50331648:const Be=k.channels.toColor($e>>16&255,$e>>8&255,255&$e);this._applyMinimumContrast(I,ct,Be,Ue,He,We)||this._addStyle(I,`color:#${N($e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(I,ct,$.foreground,Ue,He,We)||ze&&ge.push(`xterm-fg-${_.INVERTED_DEFAULT_COLOR}`)}ge.length&&(I.className=ge.join(" "),ge.length=0),wt||Ye||Ht?I.textContent=V:q++,le!==this.defaultSpacing&&(I.style.letterSpacing=`${le}px`),Z.push(I),Ee=Me}return I&&q&&(I.textContent=V),Z}_applyMinimumContrast(z,A,j,M,D,L){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let U;if(D||L||(U=B.getColor(A.rgba,j.rgba)),U===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);U=k.color.ensureContrastRatio(D||A,L||j,H),B.setColor((D||A).rgba,(L||j).rgba,U??null)}return!!U&&(this._addStyle(z,`color:${U.css}`),!0)}_getContrastCache(z){return z.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(z,A){z.setAttribute("style",`${z.getAttribute("style")||""}${A};`)}_isCellInSelection(z,A){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?z>=j[0]&&A>=j[1]&&z=j[1]&&z>=M[0]&&A<=M[1]:A>j[1]&&A=j[0]&&z=j[0])}};function N(z,A,j){for(;z.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=c.createElement("span");d.classList.add("xterm-char-measure-element");const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[d,_,p,m],this._container.appendChild(d),this._container.appendChild(_),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,d,_){c===this._font&&u===this._fontSize&&d===this._weight&&_===this._weightBold||(this._font=c,this._fontSize=u,this._weight=d,this._weightBold=_,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${_}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${_}`,this.clear())}get(c,u,d){let _=0;if(!u&&!d&&c.length===1&&(_=c.charCodeAt(0))<256){if(this._flat[_]!==-9999)return this._flat[_];const w=this._measure(c,0);return w>0&&(this._flat[_]=w),w}let p=c;u&&(p+="B"),d&&(p+="I");let m=this._holey.get(p);if(m===void 0){let w=0;u&&(w|=1),d&&(w|=2),m=this._measure(c,w),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const d=this._measureElements[u];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function c(d){return 57508<=d&&d<=57558}function u(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},o.isEmoji=u,o.allowRescaling=function(d,_,p,m){return _===1&&p>Math.ceil(1.5*m)&&d!==void 0&&d>255&&!u(d)&&!c(d)&&!(function(w){return 57344<=w&&w<=63743})(d)},o.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(_){return 9472<=_&&_<=9631})(d)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(d,_,p=0){return(d-(2*Math.round(_)-p))%(2*Math.round(_))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,_,p,m=!1){if(this.selectionStart=_,this.selectionEnd=p,!_||!p||_[0]===p[0]&&_[1]===p[1])return void this.clear();const w=d.buffers.active.ydisp,k=_[1]-w,v=p[1]-w,y=Math.max(k,0),x=Math.min(v,d.rows-1);y>=d.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=y,this.viewportCappedEndRow=x,this.startCol=_[0],this.endCol=p[0])}isCellSelected(d,_,p){return!!this.hasSelection&&(p-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?_>=this.startCol&&p>=this.viewportCappedStartRow&&_=this.viewportCappedStartRow&&_>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&_=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const _=c(2585),p=c(8460),m=c(844);let w=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,b,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new y(this._optionsService))}catch{this._measureStrategy=this.register(new v(x,b,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=u([d(2,_.IOptionsService)],w);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(b,C){b!==void 0&&b>0&&C!==void 0&&C>0&&(this._result.width=b,this._result.height=C)}}class v extends k{constructor(b,C,N){super(),this._document=b,this._parentElement=C,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class y extends k{constructor(b){super(),this._optionsService=b,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const b=this._ctx.measureText("W");return this._validateAndSet(b.width,b.fontBoundingBoxAscent+b.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(y,x,b,C){var N,z=arguments.length,A=z<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,b,C);else for(var j=y.length-1;j>=0;j--)(N=y[j])&&(A=(z<3?N(A):z>3?N(x,b,A):N(x,b))||A);return z>3&&A&&Object.defineProperty(x,b,A),A},d=this&&this.__param||function(y,x){return function(b,C){x(b,C,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const _=c(3734),p=c(643),m=c(511),w=c(2585);class k extends _.AttributeData{constructor(x,b,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=b,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class $${constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(x){const b={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(b),b.id}deregister(x){for(let b=0;b1){const B=this._getJoinedRanges(N,j,A,b,z);for(let U=0;U1){const L=this._getJoinedRanges(N,j,A,b,z);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),d=c(8460),_=c(3656);class p extends u.Disposable{constructor(k,v,y){super(),this._textarea=k,this._window=v,this.mainDocument=y,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(k){this._window!==k&&(this._window=k,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=p;class m extends u.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,_.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=c(844);class d extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}o.LinkProviderService=d},8934:function(a,o,c){var u=this&&this.__decorate||function(w,k,v,y){var x,b=arguments.length,C=b<3?k:y===null?y=Object.getOwnPropertyDescriptor(k,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,k,v,y);else for(var N=w.length-1;N>=0;N--)(x=w[N])&&(C=(b<3?x(C):b>3?x(k,v,C):x(k,v))||C);return b>3&&C&&Object.defineProperty(k,v,C),C},d=this&&this.__param||function(w,k){return function(v,y){k(v,y,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const _=c(4725),p=c(9806);let m=o.MouseService=class{constructor(w,k){this._renderService=w,this._charSizeService=k}getCoords(w,k,v,y,x){return(0,p.getCoords)(window,w,k,v,y,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(w,k){const v=(0,p.getCoordsRelativeToElement)(window,w,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([d(0,_.IRenderService),d(1,_.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const _=c(6193),p=c(4725),m=c(8460),w=c(844),k=c(7226),v=c(2585);let y=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,b,C,N,z,A,j,M){super(),this._rowCount=x,this._charSizeService=N,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new w.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new _.RenderDebouncer(((D,L)=>this._renderRows(D,L)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var D;return(D=this._renderer.value)==null?void 0:D.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(z.onDecorationRegistered((()=>this._fullRefresh()))),this.register(z.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,b),this.register(j.onWindowChange((D=>this._registerIntersectionObserver(D,b))))}_registerIntersectionObserver(x,b){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(b),this._observerDisposable.value=(0,w.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,b,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,b,this._rowCount))}_renderRows(x,b){this._renderer.value&&(x=Math.min(x,this._rowCount-1),b=Math.min(b,this._rowCount-1),this._renderer.value.renderRows(x,b),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:b}),this._onRender.fire({start:x,end:b}),this._isNextRenderRedrawOnly=!0)}resize(x,b){this._rowCount=b,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((b=>this.refreshRows(b.start,b.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,b;this._renderer.value&&((b=(x=this._renderer.value).clearTextureAtlas)==null||b.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,b){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,b)})):this._renderer.value.handleResize(x,b),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,b,C){var N;this._selectionState.start=x,this._selectionState.end=b,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(x,b,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};o.RenderService=y=u([d(2,v.IOptionsService),d(3,p.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],y)},9312:function(a,o,c){var u=this&&this.__decorate||function(j,M,D,L){var B,U=arguments.length,H=U<3?M:L===null?L=Object.getOwnPropertyDescriptor(M,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(j,M,D,L);else for(var Q=j.length-1;Q>=0;Q--)(B=j[Q])&&(H=(U<3?B(H):U>3?B(M,D,H):B(M,D))||H);return U>3&&H&&Object.defineProperty(M,D,H),H},d=this&&this.__param||function(j,M){return function(D,L){M(D,L,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const _=c(9806),p=c(9504),m=c(456),w=c(4725),k=c(8460),v=c(844),y=c(6114),x=c(4841),b=c(511),C=c(2585),N=" ",z=new RegExp(N,"g");let A=o.SelectionService=class extends v.Disposable{constructor(j,M,D,L,B,U,H,Q,K){super(),this._element=j,this._screenElement=M,this._linkifier=D,this._bufferService=L,this._coreService=B,this._mouseService=U,this._optionsService=H,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new b.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const D=this._bufferService.buffer,L=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const B=j[0]B.replace(z," "))).join(y.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([d(0,p.IBufferService),d(1,p.IOptionsService),d(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,u){this._renderCallback=c,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=c(3614),d=c(3656),f=c(3551),p=c(9042),m=c(3730),w=c(1680),k=c(3107),v=c(5744),y=c(2950),x=c(1296),b=c(428),C=c(4269),N=c(5114),z=c(8934),A=c(3230),j=c(9312),M=c(4725),D=c(6731),L=c(8055),B=c(8969),U=c(8460),H=c(844),Q=c(6114),K=c(8437),Z=c(2584),ee=c(7399),$=c(5941),I=c(9074),F=c(2585),q=c(5435),V=c(4567),ie=c(779);class oe extends B.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ne={}){super(ne),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(I.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ie.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((G,ae)=>this.refresh(G,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((G=>this._reportWindowsOptions(G)))),this.register(this._inputHandler.onColor((G=>this._handleColorEvent(G)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((G=>this._afterResize(G.cols,G.rows)))),this.register((0,H.toDisposable)((()=>{var G,ae;this._customKeyEventHandler=void 0,(ae=(G=this.element)==null?void 0:G.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(ne){if(this._themeService)for(const G of ne){let ae,le="";switch(G.index){case 256:ae="foreground",le="10";break;case 257:ae="background",le="11";break;case 258:ae="cursor",le="12";break;default:ae="ansi",le="4;"+G.index}switch(G.type){case 0:const me=L.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[G.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${le};${(0,$.toRgbString)(me)}${Z.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((ve=>ve.ansi[G.index]=L.channels.toColor(...G.color)));else{const ve=ae;this._themeService.modifyColors((Ee=>Ee[ve]=L.channels.toColor(...G.color)))}break;case 2:this._themeService.restoreColor(G.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ne){ne?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ne){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ne;return(ne=this.textarea)==null?void 0:ne.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const ne=this.buffer.ybase+this.buffer.y,G=this.buffer.lines.get(ne);if(!G)return;const ae=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,me=G.getWidth(ae),ve=this._renderService.dimensions.css.cell.width*me,Ee=this.buffer.y*this._renderService.dimensions.css.cell.height,Fe=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Fe+"px",this.textarea.style.top=Ee+"px",this.textarea.style.width=ve+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(G=>{this.hasSelection()&&(0,u.copyHandler)(G,this._selectionService)})));const ne=G=>(0,u.handlePasteEvent)(G,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",ne)),this.register((0,d.addDisposableDomListener)(this.element,"paste",ne)),Q.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(G=>{G.button===2&&(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(G=>{(0,u.rightClickHandler)(G,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(G=>{G.button===1&&(0,u.moveTextAreaUnderMouseCursor)(G,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(ne=>this._keyUp(ne)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(ne=>this._keyDown(ne)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(ne=>this._keyPress(ne)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(ne=>this._compositionHelper.compositionupdate(ne)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(ne=>this._inputEvent(ne)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ne){var ae;if(!ne)throw new Error("Terminal requires a parent element.");if(ne.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ae=this.element)==null?void 0:ae.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ne.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),ne.appendChild(this.element);const G=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),G.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),G.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Q.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,ne.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(D.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(A.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(y.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(z.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(G);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(j.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ne=this,G=this.element;function ae(ve){const Ee=ne._mouseService.getMouseReportCoords(ve,ne.screenElement);if(!Ee)return!1;let Fe,We;switch(ve.overrideType||ve.type){case"mousemove":We=32,ve.buttons===void 0?(Fe=3,ve.button!==void 0&&(Fe=ve.button<3?ve.button:3)):Fe=1&ve.buttons?0:4&ve.buttons?1:2&ve.buttons?2:3;break;case"mouseup":We=0,Fe=ve.button<3?ve.button:3;break;case"mousedown":We=1,Fe=ve.button<3?ve.button:3;break;case"wheel":if(ne._customWheelEventHandler&&ne._customWheelEventHandler(ve)===!1||ne.viewport.getLinesScrolled(ve)===0)return!1;We=ve.deltaY<0?0:1,Fe=4;break;default:return!1}return!(We===void 0||Fe===void 0||Fe>4)&&ne.coreMouseService.triggerMouseEvent({col:Ee.col,row:Ee.row,x:Ee.x,y:Ee.y,button:Fe,action:We,ctrl:ve.ctrlKey,alt:ve.altKey,shift:ve.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:ve=>(ae(ve),ve.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ve)),wheel:ve=>(ae(ve),this.cancel(ve,!0)),mousedrag:ve=>{ve.buttons&&ae(ve)},mousemove:ve=>{ve.buttons||ae(ve)}};this.register(this.coreMouseService.onProtocolChange((ve=>{ve?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ve)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ve?le.mousemove||(G.addEventListener("mousemove",me.mousemove),le.mousemove=me.mousemove):(G.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ve?le.wheel||(G.addEventListener("wheel",me.wheel,{passive:!1}),le.wheel=me.wheel):(G.removeEventListener("wheel",le.wheel),le.wheel=null),2&ve?le.mouseup||(le.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ve?le.mousedrag||(le.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(G,"mousedown",(ve=>{if(ve.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ve))return ae(ve),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ve)}))),this.register((0,d.addDisposableDomListener)(G,"wheel",(ve=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ve)===!1)return!1;if(!this.buffer.hasScrollback){const Ee=this.viewport.getLinesScrolled(ve);if(Ee===0)return;const Fe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ve.deltaY<0?"A":"B");let We="";for(let Oe=0;Oe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ve),this.cancel(ve)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(G,"touchmove",(ve=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ve)?void 0:this.cancel(ve)}),{passive:!1}))}refresh(ne,G){var ae;(ae=this._renderService)==null||ae.refreshRows(ne,G)}updateCursorStyle(ne){var G;(G=this._selectionService)!=null&&G.shouldColumnSelect(ne)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(ne,G,ae=0){var le;ae===1?(super.scrollLines(ne,G,ae),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ne)}paste(ne){(0,u.paste)(ne,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ne){this._customKeyEventHandler=ne}attachCustomWheelEventHandler(ne){this._customWheelEventHandler=ne}registerLinkProvider(ne){return this._linkProviderService.registerLinkProvider(ne)}registerCharacterJoiner(ne){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const G=this._characterJoinerService.register(ne);return this.refresh(0,this.rows-1),G}deregisterCharacterJoiner(ne){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ne)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ne){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ne)}registerDecoration(ne){return this._decorationService.registerDecoration(ne)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ne,G,ae){this._selectionService.setSelection(ne,G,ae)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var ne;(ne=this._selectionService)==null||ne.clearSelection()}selectAll(){var ne;(ne=this._selectionService)==null||ne.selectAll()}selectLines(ne,G){var ae;(ae=this._selectionService)==null||ae.selectLines(ne,G)}_keyDown(ne){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1)return!1;const G=this.browser.isMac&&this.options.macOptionIsMeta&&ne.altKey;if(!G&&!this._compositionHelper.keydown(ne))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;G||ne.key!=="Dead"&&ne.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,ee.evaluateKeyboardEvent)(ne,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ne),ae.type===3||ae.type===2){const le=this.rows-1;return this.scrollLines(ae.type===2?-le:le),this.cancel(ne,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ne)||(ae.cancel&&this.cancel(ne,!0),!ae.key||!!(ne.key&&!ne.ctrlKey&&!ne.altKey&&!ne.metaKey&&ne.key.length===1&&ne.key.charCodeAt(0)>=65&&ne.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ae.key!==Z.C0.ETX&&ae.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:ne}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||ne.altKey||ne.ctrlKey?this.cancel(ne,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ne,G){const ae=ne.isMac&&!this.options.macOptionIsMeta&&G.altKey&&!G.ctrlKey&&!G.metaKey||ne.isWindows&&G.altKey&&G.ctrlKey&&!G.metaKey||ne.isWindows&&G.getModifierState("AltGraph");return G.type==="keypress"?ae:ae&&(!G.keyCode||G.keyCode>47)}_keyUp(ne){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1||((function(G){return G.keyCode===16||G.keyCode===17||G.keyCode===18})(ne)||this.focus(),this.updateCursorStyle(ne),this._keyPressHandled=!1)}_keyPress(ne){let G;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1)return!1;if(this.cancel(ne),ne.charCode)G=ne.charCode;else if(ne.which===null||ne.which===void 0)G=ne.keyCode;else{if(ne.which===0||ne.charCode===0)return!1;G=ne.which}return!(!G||(ne.altKey||ne.ctrlKey||ne.metaKey)&&!this._isThirdLevelShift(this.browser,ne)||(G=String.fromCharCode(G),this._onKey.fire({key:G,domEvent:ne}),this._showCursor(),this.coreService.triggerDataEvent(G,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ne){if(ne.data&&ne.inputType==="insertText"&&(!ne.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const G=ne.data;return this.coreService.triggerDataEvent(G,!0),this.cancel(ne),!0}return!1}resize(ne,G){ne!==this.cols||G!==this.rows?super.resize(ne,G):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ne,G){var ae,le;(ae=this._charSizeService)==null||ae.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ne;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let G=1;G{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,u=1e3){this._renderCallback=c,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,u,d){this._rowCount=d,c=c!==void 0?c:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=f-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,u)}}},1680:function(a,o,c){var u=this&&this.__decorate||function(y,x,b,C){var N,z=arguments.length,A=z<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,b,C);else for(var j=y.length-1;j>=0;j--)(N=y[j])&&(A=(z<3?N(A):z>3?N(x,b,A):N(x,b))||A);return z>3&&A&&Object.defineProperty(x,b,A),A},d=this&&this.__param||function(y,x){return function(b,C){x(b,C,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const f=c(3656),p=c(4725),m=c(8460),w=c(844),k=c(2585);let v=o.Viewport=class extends w.Disposable{constructor(y,x,b,C,N,z,A,j){super(),this._viewportElement=y,this._scrollArea=x,this._bufferService=b,this._optionsService=C,this._charSizeService=N,this._renderService=z,this._coreBrowserService=A,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(j.colors),this.register(j.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(y){this._viewportElement.style.backgroundColor=y.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(y){if(y)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const y=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==y&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=y),this._refreshAnimationFrame=null}syncScrollArea(y=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(y);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(y)}_handleScroll(y){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const y=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(y*(this._smoothScrollState.target-this._smoothScrollState.origin)),y<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(y,x){const b=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&b0&&(b=B),C=""}}return{bufferElements:N,cursorElement:b}}getLinesScrolled(y){if(y.deltaY===0||y.shiftKey)return 0;let x=this._applyScrollModifier(y.deltaY,y);return y.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):y.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(y,x){const b=this._optionsService.rawOptions.fastScrollModifier;return b==="alt"&&x.altKey||b==="ctrl"&&x.ctrlKey||b==="shift"&&x.shiftKey?y*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:y*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(y){this._lastTouchY=y.touches[0].pageY}handleTouchMove(y){const x=this._lastTouchY-y.touches[0].pageY;return this._lastTouchY=y.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(y,x))}};o.Viewport=v=u([d(2,k.IBufferService),d(3,k.IOptionsService),d(4,p.ICharSizeService),d(5,p.IRenderService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,y,x){var b,C=arguments.length,N=C<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,y,x);else for(var z=k.length-1;z>=0;z--)(b=k[z])&&(N=(C<3?b(N):C>3?b(v,y,N):b(v,y))||N);return C>3&&N&&Object.defineProperty(v,y,N),N},d=this&&this.__param||function(k,v){return function(y,x){v(y,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const f=c(4725),p=c(844),m=c(2585);let w=o.BufferDecorationRenderer=class extends p.Disposable{constructor(k,v,y,x,b){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=y,this._decorationService=x,this._renderService=b,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((C=>this._removeDecoration(C)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var x;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),v.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,v.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",v.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",v.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const y=k.options.x??0;return y&&y>this._bufferService.cols&&(v.style.display="none"),this._refreshXPosition(k,v),v}_refreshStyle(k){const v=k.marker.line-this._bufferService.buffers.active.ydisp;if(v<0||v>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let y=this._decorationElements.get(k);y||(y=this._createElement(k),k.element=y,this._decorationElements.set(k,y),this._container.appendChild(y),k.onDispose((()=>{this._decorationElements.delete(k),y.remove()}))),y.style.top=v*this._renderService.dimensions.css.cell.height+"px",y.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(y)}}_refreshXPosition(k,v=k.element){if(!v)return;const y=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=y?y*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=y?y*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var v;(v=this._decorationElements.get(k))==null||v.remove(),this._decorationElements.delete(k),k.dispose()}};o.BufferDecorationRenderer=w=u([d(1,m.IBufferService),d(2,f.ICoreBrowserService),d(3,m.IDecorationService),d(4,f.IRenderService)],w)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const u of this._zones)if(u.color===c.options.overviewRulerOptions.color&&u.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,c.marker.line))return;if(this._lineAdjacentToZone(u,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(u,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&u<=c.endBufferLine}_lineAdjacentToZone(c,u,d){return u>=c.startBufferLine-this._linePadding[d||"full"]&&u<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,u){c.startBufferLine=Math.min(c.startBufferLine,u),c.endBufferLine=Math.max(c.endBufferLine,u)}}},5744:function(a,o,c){var u=this&&this.__decorate||function(b,C,N,z){var A,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,C,N,z);else for(var D=b.length-1;D>=0;D--)(A=b[D])&&(M=(j<3?A(M):j>3?A(C,N,M):A(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},d=this&&this.__param||function(b,C){return function(N,z){C(N,z,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const f=c(5871),p=c(4725),m=c(844),w=c(2585),k={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0},y={full:0,left:0,center:0,right:0};let x=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(b,C,N,z,A,j,M){var L;super(),this._viewportElement=b,this._screenElement=C,this._bufferService=N,this._decorationService=z,this._renderService=A,this._optionsService=j,this._coreBrowserService=M,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(L=this._viewportElement.parentElement)==null||L.insertBefore(this._canvas,this._viewportElement);const D=this._canvas.getContext("2d");if(!D)throw new Error("Ctx cannot be null");this._ctx=D,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var B;(B=this._canvas)==null||B.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const b=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=b,v.center=C,v.right=b,this._refreshDrawHeightConstants(),y.full=0,y.left=0,y.center=v.left,y.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const b=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(b,12),6)*this._coreBrowserService.dpr);k.left=C,k.center=C,k.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*k.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const b=this._colorZoneStore.zones;for(const C of b)C.position!=="full"&&this._renderColorZone(C);for(const C of b)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(b){this._ctx.fillStyle=b.color,this._ctx.fillRect(y[b.position||"full"],Math.round((this._canvas.height-1)*(b.startBufferLine/this._bufferService.buffers.active.lines.length)-k[b.position||"full"]/2),v[b.position||"full"],Math.round((this._canvas.height-1)*((b.endBufferLine-b.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[b.position||"full"]))}_queueRefresh(b,C){this._shouldUpdateDimensions=b||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=x=u([d(2,w.IBufferService),d(3,w.IDecorationService),d(4,p.IRenderService),d(5,w.IOptionsService),d(6,p.ICoreBrowserService)],x)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,y,x){var b,C=arguments.length,N=C<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,y,x);else for(var z=k.length-1;z>=0;z--)(b=k[z])&&(N=(C<3?b(N):C>3?b(v,y,N):b(v,y))||N);return C>3&&N&&Object.defineProperty(v,y,N),N},d=this&&this.__param||function(k,v){return function(y,x){v(y,x,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const f=c(4725),p=c(2585),m=c(2584);let w=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,v,y,x,b,C){this._textarea=k,this._compositionView=v,this._bufferService=y,this._optionsService=x,this._coreService=b,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(k){this._compositionView.textContent=k.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(k){if(this._isComposing||this._isSendingComposition){if(k.keyCode===229||k.keyCode===16||k.keyCode===17||k.keyCode===18)return!1;this._finalizeComposition(!1)}return k.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(k){if(this._compositionView.classList.remove("active"),this._isComposing=!1,k){const v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let y;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,y=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),y.length>0&&this._coreService.triggerDataEvent(y,!0)}}),0)}else{this._isSendingComposition=!1;const v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const v=this._textarea.value,y=v.replace(k,"");this._dataAlreadySent=y,v.length>k.length?this._coreService.triggerDataEvent(y,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=w=u([d(2,p.IBufferService),d(3,p.IOptionsService),d(4,p.ICoreService),d(5,f.IRenderService)],w)},9806:(a,o)=>{function c(u,d,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),w=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[d.clientX-p.left-w,d.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,d,f,p,m,w,k,v,y){if(!w)return;const x=c(u,d,f);return x?(x[0]=Math.ceil((x[0]+(y?k/2:0))/k),x[1]=Math.ceil(x[1]/v),x[0]=Math.min(Math.max(x[0],1),p+(y?1:0)),x[1]=Math.min(Math.max(x[1],1),m),x):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function d(v,y,x,b){const C=v-f(v,x),N=y-f(y,x),z=Math.abs(C-N)-(function(A,j,M){let D=0;const L=A-f(A,M),B=j-f(j,M);for(let U=0;U=0&&vy?"A":"B"}function m(v,y,x,b,C,N){let z=v,A=y,j="";for(;z!==x||A!==b;)z+=C?1:-1,C&&z>N.cols-1?(j+=N.buffer.translateBufferLineToString(A,!1,v,z),z=0,v=0,A++):!C&&z<0&&(j+=N.buffer.translateBufferLineToString(A,!1,0,v+1),z=N.cols-1,v=z,A--);return j+N.buffer.translateBufferLineToString(A,!1,v,z)}function w(v,y){const x=y?"O":"[";return u.C0.ESC+x+v}function k(v,y){v=Math.floor(v);let x="";for(let b=0;b0?L-f(L,B):M;const Q=L,K=(function(Z,ee,$,I,F,q){let V;return V=d($,I,F,q).length>0?I-f(I,F):ee,Z<$&&V<=I||Z>=$&&Vv?"D":"C",k(Math.abs(C-v),w(z,b));z=N>y?"D":"C";const A=Math.abs(N-y);return k((function(j,M){return M.cols-j})(N>y?v:C,x)+(A-1)*x.cols+1+((N>y?C:v)-1),w(z,b))}},1296:function(a,o,c){var u=this&&this.__decorate||function(U,H,Q,K){var Z,ee=arguments.length,$=ee<3?H:K===null?K=Object.getOwnPropertyDescriptor(H,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(U,H,Q,K);else for(var I=U.length-1;I>=0;I--)(Z=U[I])&&($=(ee<3?Z($):ee>3?Z(H,Q,$):Z(H,Q))||$);return ee>3&&$&&Object.defineProperty(H,Q,$),$},d=this&&this.__param||function(U,H){return function(Q,K){H(Q,K,U)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const f=c(3787),p=c(2550),m=c(2223),w=c(6171),k=c(6052),v=c(4725),y=c(8055),x=c(8460),b=c(844),C=c(2585),N="xterm-dom-renderer-owner-",z="xterm-rows",A="xterm-fg-",j="xterm-bg-",M="xterm-focus",D="xterm-selection";let L=1,B=o.DomRenderer=class extends b.Disposable{constructor(U,H,Q,K,Z,ee,$,I,F,q,V,ie,oe){super(),this._terminal=U,this._document=H,this._element=Q,this._screenElement=K,this._viewportElement=Z,this._helperContainer=ee,this._linkifier2=$,this._charSizeService=F,this._optionsService=q,this._bufferService=V,this._coreBrowserService=ie,this._themeService=oe,this._terminalClass=L++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(z),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(D),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ce=>this._injectCss(ce)))),this._injectCss(this._themeService.colors),this._rowFactory=I.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ce=>this._handleLinkHover(ce)))),this.register(this._linkifier2.onHideLinkUnderline((ce=>this._handleLinkLeave(ce)))),this.register((0,b.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Q of this._rowElements)Q.style.width=`${this.dimensions.css.canvas.width}px`,Q.style.height=`${this.dimensions.css.cell.height}px`,Q.style.lineHeight=`${this.dimensions.css.cell.height}px`,Q.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${z} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${z} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${z} .xterm-dim { color: ${y.color.multiplyOpacity(U.foreground,.5).css};}`,H+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Q=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${K} { 50% { box-shadow: none; }}`,H+=`@keyframes ${Z} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,H+=`${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${z}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${z} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,$]of U.ansi.entries())H+=`${this._terminalSelector} .${A}${ee} { color: ${$.css}; }${this._terminalSelector} .${A}${ee}.xterm-dim { color: ${y.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${j}${ee} { background-color: ${$.css}; }`;H+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${y.color.opaque(U.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${y.color.multiplyOpacity(y.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,H){for(let Q=this._rowElements.length;Q<=H;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,H){this._refreshRowElements(U,H),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,H,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,H,Q),this.renderRows(0,this._bufferService.rows-1),!U||!H)return;this._selectionRenderModel.update(this._terminal,U,H,Q);const K=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||$<0)return;const I=this._document.createDocumentFragment();if(Q){const F=U[0]>H[0];I.appendChild(this._createSelectionElement(ee,F?H[0]:U[0],F?U[0]:H[0],$-ee+1))}else{const F=K===ee?U[0]:0,q=ee===Z?H[0]:this._bufferService.cols;I.appendChild(this._createSelectionElement(ee,F,q));const V=$-ee-1;if(I.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,V)),ee!==$){const ie=Z===$?H[0]:this._bufferService.cols;I.appendChild(this._createSelectionElement($,0,ie))}}this._selectionContainer.appendChild(I)}_createSelectionElement(U,H,Q,K=1){const Z=this._document.createElement("div"),ee=H*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Q-H);return ee+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-ee),Z.style.height=K*this.dimensions.css.cell.height+"px",Z.style.top=U*this.dimensions.css.cell.height+"px",Z.style.left=`${ee}px`,Z.style.width=`${$}px`,Z}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const U of this._rowElements)U.replaceChildren()}renderRows(U,H){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,Z=Math.min(Q.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,I=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=U;F<=H;F++){const q=F+Q.ydisp,V=this._rowElements[F],ie=Q.lines.get(q);if(!V||!ie)break;V.replaceChildren(...this._rowFactory.createRow(ie,q,q===K,$,I,Z,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,H,Q,K,Z,ee){Q<0&&(U=0),K<0&&(H=0);const $=this._bufferService.rows-1;Q=Math.max(Math.min(Q,$),0),K=Math.max(Math.min(K,$),0),Z=Math.min(Z,this._bufferService.cols);const I=this._bufferService.buffer,F=I.ybase+I.y,q=Math.min(I.x,Z-1),V=this._optionsService.rawOptions.cursorBlink,ie=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let ce=Q;ce<=K;++ce){const ne=ce+I.ydisp,G=this._rowElements[ce],ae=I.lines.get(ne);if(!G||!ae)break;G.replaceChildren(...this._rowFactory.createRow(ae,ne,ne===F,ie,oe,q,V,this.dimensions.css.cell.width,this._widthCache,ee?ce===Q?U:0:-1,ee?(ce===K?H:Z)-1:-1))}}};o.DomRenderer=B=u([d(7,C.IInstantiationService),d(8,v.ICharSizeService),d(9,C.IOptionsService),d(10,C.IBufferService),d(11,v.ICoreBrowserService),d(12,v.IThemeService)],B)},3787:function(a,o,c){var u=this&&this.__decorate||function(z,A,j,M){var D,L=arguments.length,B=L<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,j):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(z,A,j,M);else for(var U=z.length-1;U>=0;U--)(D=z[U])&&(B=(L<3?D(B):L>3?D(A,j,B):D(A,j))||B);return L>3&&B&&Object.defineProperty(A,j,B),B},d=this&&this.__param||function(z,A){return function(j,M){A(j,M,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const f=c(2223),p=c(643),m=c(511),w=c(2585),k=c(8055),v=c(4725),y=c(4269),x=c(6171),b=c(3734);let C=o.DomRendererRowFactory=class{constructor(z,A,j,M,D,L,B){this._document=z,this._characterJoinerService=A,this._optionsService=j,this._coreBrowserService=M,this._coreService=D,this._decorationService=L,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(z,A,j){this._selectionStart=z,this._selectionEnd=A,this._columnSelectMode=j}createRow(z,A,j,M,D,L,B,U,H,Q,K){const Z=[],ee=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let I,F=z.getNoBgTrimmedLength();j&&F0&&Ee===ee[0][0]){We=!0;const je=ee.shift();He=new y.JoinedCellData(this._workCell,z.translateToString(!0,je[0],je[1]),je[1]-je[0]),Oe=je[1]-1,Fe=He.getWidth()}const ht=this._isCellInSelection(Ee,A),xt=j&&Ee===L,Kt=ve&&Ee>=Q&&Ee<=K;let Ut=!1;this._decorationService.forEachDecorationAtCell(Ee,A,void 0,(je=>{Ut=!0}));let Ht=He.getChars()||p.WHITESPACE_CELL_CHAR;if(Ht===" "&&(He.isUnderline()||He.isOverline())&&(Ht=" "),le=Fe*U-H.get(Ht,He.isBold(),He.isItalic()),I){if(q&&(ht&&ae||!ht&&!ae&&He.bg===ie)&&(ht&&ae&&$.selectionForeground||He.fg===oe)&&He.extended.ext===ce&&Kt===ne&&le===G&&!xt&&!We&&!Ut){He.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=Ht,q++;continue}q&&(I.textContent=V),I=this._document.createElement("span"),q=0,V=""}else I=this._document.createElement("span");if(ie=He.bg,oe=He.fg,ce=He.extended.ext,ne=Kt,G=le,ae=ht,We&&L>=Ee&&L<=Oe&&(L=Ee),!this._coreService.isCursorHidden&&xt&&this._coreService.isCursorInitialized){if(me.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&me.push("xterm-cursor-blink"),me.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":me.push("xterm-cursor-outline");break;case"block":me.push("xterm-cursor-block");break;case"bar":me.push("xterm-cursor-bar");break;case"underline":me.push("xterm-cursor-underline")}}if(He.isBold()&&me.push("xterm-bold"),He.isItalic()&&me.push("xterm-italic"),He.isDim()&&me.push("xterm-dim"),V=He.isInvisible()?p.WHITESPACE_CELL_CHAR:He.getChars()||p.WHITESPACE_CELL_CHAR,He.isUnderline()&&(me.push(`xterm-underline-${He.extended.underlineStyle}`),V===" "&&(V=" "),!He.isUnderlineColorDefault()))if(He.isUnderlineColorRGB())I.style.textDecorationColor=`rgb(${b.AttributeData.toColorRGB(He.getUnderlineColor()).join(",")})`;else{let je=He.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&He.isBold()&&je<8&&(je+=8),I.style.textDecorationColor=$.ansi[je].css}He.isOverline()&&(me.push("xterm-overline"),V===" "&&(V=" ")),He.isStrikethrough()&&me.push("xterm-strikethrough"),Kt&&(I.style.textDecoration="underline");let $e=He.getFgColor(),ot=He.getFgColorMode(),ct=He.getBgColor(),ye=He.getBgColorMode();const Be=!!He.isInverse();if(Be){const je=$e;$e=ct,ct=je;const Gt=ot;ot=ye,ye=Gt}let Ke,Ce,Ye,lt=!1;switch(this._decorationService.forEachDecorationAtCell(Ee,A,void 0,(je=>{je.options.layer!=="top"&<||(je.backgroundColorRGB&&(ye=50331648,ct=je.backgroundColorRGB.rgba>>8&16777215,Ke=je.backgroundColorRGB),je.foregroundColorRGB&&(ot=50331648,$e=je.foregroundColorRGB.rgba>>8&16777215,Ce=je.foregroundColorRGB),lt=je.options.layer==="top")})),!lt&&ht&&(Ke=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ct=Ke.rgba>>8&16777215,ye=50331648,lt=!0,$.selectionForeground&&(ot=50331648,$e=$.selectionForeground.rgba>>8&16777215,Ce=$.selectionForeground)),lt&&me.push("xterm-decoration-top"),ye){case 16777216:case 33554432:Ye=$.ansi[ct],me.push(`xterm-bg-${ct}`);break;case 50331648:Ye=k.channels.toColor(ct>>16,ct>>8&255,255&ct),this._addStyle(I,`background-color:#${N((ct>>>0).toString(16),"0",6)}`);break;default:Be?(Ye=$.foreground,me.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):Ye=$.background}switch(Ke||He.isDim()&&(Ke=k.color.multiplyOpacity(Ye,.5)),ot){case 16777216:case 33554432:He.isBold()&&$e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&($e+=8),this._applyMinimumContrast(I,Ye,$.ansi[$e],He,Ke,void 0)||me.push(`xterm-fg-${$e}`);break;case 50331648:const je=k.channels.toColor($e>>16&255,$e>>8&255,255&$e);this._applyMinimumContrast(I,Ye,je,He,Ke,Ce)||this._addStyle(I,`color:#${N($e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(I,Ye,$.foreground,He,Ke,Ce)||Be&&me.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}me.length&&(I.className=me.join(" "),me.length=0),xt||We||Ut?I.textContent=V:q++,le!==this.defaultSpacing&&(I.style.letterSpacing=`${le}px`),Z.push(I),Ee=Oe}return I&&q&&(I.textContent=V),Z}_applyMinimumContrast(z,A,j,M,D,L){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let U;if(D||L||(U=B.getColor(A.rgba,j.rgba)),U===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);U=k.color.ensureContrastRatio(D||A,L||j,H),B.setColor((D||A).rgba,(L||j).rgba,U??null)}return!!U&&(this._addStyle(z,`color:${U.css}`),!0)}_getContrastCache(z){return z.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(z,A){z.setAttribute("style",`${z.getAttribute("style")||""}${A};`)}_isCellInSelection(z,A){const j=this._selectionStart,M=this._selectionEnd;return!(!j||!M)&&(this._columnSelectMode?j[0]<=M[0]?z>=j[0]&&A>=j[1]&&z=j[1]&&z>=M[0]&&A<=M[1]:A>j[1]&&A=j[0]&&z=j[0])}};function N(z,A,j){for(;z.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=c.createElement("span");d.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[d,f,p,m],this._container.appendChild(d),this._container.appendChild(f),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(c,u,d,f){c===this._font&&u===this._fontSize&&d===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=d,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,d){let f=0;if(!u&&!d&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const w=this._measure(c,0);return w>0&&(this._flat[f]=w),w}let p=c;u&&(p+="B"),d&&(p+="I");let m=this._holey.get(p);if(m===void 0){let w=0;u&&(w|=1),d&&(w|=2),m=this._measure(c,w),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const d=this._measureElements[u];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function c(d){return 57508<=d&&d<=57558}function u(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},o.isEmoji=u,o.allowRescaling=function(d,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&d!==void 0&&d>255&&!u(d)&&!c(d)&&!(function(w){return 57344<=w&&w<=63743})(d)},o.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(f){return 9472<=f&&f<=9631})(d)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(d,f,p=0){return(d-(2*Math.round(f)-p))%(2*Math.round(f))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,f,p,m=!1){if(this.selectionStart=f,this.selectionEnd=p,!f||!p||f[0]===p[0]&&f[1]===p[1])return void this.clear();const w=d.buffers.active.ydisp,k=f[1]-w,v=p[1]-w,y=Math.max(k,0),x=Math.min(v,d.rows-1);y>=d.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=y,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=p[0])}isCellSelected(d,f,p){return!!this.hasSelection&&(p-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&p>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&f=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,u=this.selectionEnd;return!(!c||!u)&&(c[1]>u[1]||c[1]===u[1]&&c[0]>u[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const f=c(2585),p=c(8460),m=c(844);let w=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,b,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new y(this._optionsService))}catch{this._measureStrategy=this.register(new v(x,b,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=u([d(2,f.IOptionsService)],w);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(b,C){b!==void 0&&b>0&&C!==void 0&&C>0&&(this._result.width=b,this._result.height=C)}}class v extends k{constructor(b,C,N){super(),this._document=b,this._parentElement=C,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class y extends k{constructor(b){super(),this._optionsService=b,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const b=this._ctx.measureText("W");return this._validateAndSet(b.width,b.fontBoundingBoxAscent+b.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(y,x,b,C){var N,z=arguments.length,A=z<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,b):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(y,x,b,C);else for(var j=y.length-1;j>=0;j--)(N=y[j])&&(A=(z<3?N(A):z>3?N(x,b,A):N(x,b))||A);return z>3&&A&&Object.defineProperty(x,b,A),A},d=this&&this.__param||function(y,x){return function(b,C){x(b,C,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const f=c(3734),p=c(643),m=c(511),w=c(2585);class k extends f.AttributeData{constructor(x,b,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=b,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class $${constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(x){const b={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(b),b.id}deregister(x){for(let b=0;b1){const B=this._getJoinedRanges(N,j,A,b,z);for(let U=0;U1){const L=this._getJoinedRanges(N,j,A,b,z);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),d=c(8460),f=c(3656);class p extends u.Disposable{constructor(k,v,y){super(),this._textarea=k,this._window=v,this.mainDocument=y,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,d.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(k){this._window!==k&&(this._window=k,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=p;class m extends u.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(k){this._parentWindow=k,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var k;this._outerListener&&((k=this._resolutionMediaMatchList)==null||k.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=c(844);class d extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}o.LinkProviderService=d},8934:function(a,o,c){var u=this&&this.__decorate||function(w,k,v,y){var x,b=arguments.length,C=b<3?k:y===null?y=Object.getOwnPropertyDescriptor(k,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,k,v,y);else for(var N=w.length-1;N>=0;N--)(x=w[N])&&(C=(b<3?x(C):b>3?x(k,v,C):x(k,v))||C);return b>3&&C&&Object.defineProperty(k,v,C),C},d=this&&this.__param||function(w,k){return function(v,y){k(v,y,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const f=c(4725),p=c(9806);let m=o.MouseService=class{constructor(w,k){this._renderService=w,this._charSizeService=k}getCoords(w,k,v,y,x){return(0,p.getCoords)(window,w,k,v,y,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(w,k){const v=(0,p.getCoordsRelativeToElement)(window,w,k);if(this._charSizeService.hasValidSize)return v[0]=Math.min(Math.max(v[0],0),this._renderService.dimensions.css.canvas.width-1),v[1]=Math.min(Math.max(v[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(v[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(v[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(v[0]),y:Math.floor(v[1])}}};o.MouseService=m=u([d(0,f.IRenderService),d(1,f.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const f=c(6193),p=c(4725),m=c(8460),w=c(844),k=c(7226),v=c(2585);let y=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,b,C,N,z,A,j,M){super(),this._rowCount=x,this._charSizeService=N,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new w.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((D,L)=>this._renderRows(D,L)),j),this.register(this._renderDebouncer),this.register(j.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(A.onResize((()=>this._fullRefresh()))),this.register(A.buffers.onBufferActivate((()=>{var D;return(D=this._renderer.value)==null?void 0:D.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(z.onDecorationRegistered((()=>this._fullRefresh()))),this.register(z.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(A.cols,A.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(A.buffer.y,A.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(j.window,b),this.register(j.onWindowChange((D=>this._registerIntersectionObserver(D,b))))}_registerIntersectionObserver(x,b){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(b),this._observerDisposable.value=(0,w.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,b,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,b,this._rowCount))}_renderRows(x,b){this._renderer.value&&(x=Math.min(x,this._rowCount-1),b=Math.min(b,this._rowCount-1),this._renderer.value.renderRows(x,b),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:b}),this._onRender.fire({start:x,end:b}),this._isNextRenderRedrawOnly=!0)}resize(x,b){this._rowCount=b,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((b=>this.refreshRows(b.start,b.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,b;this._renderer.value&&((b=(x=this._renderer.value).clearTextureAtlas)==null||b.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,b){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,b)})):this._renderer.value.handleResize(x,b),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,b,C){var N;this._selectionState.start=x,this._selectionState.end=b,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(x,b,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};o.RenderService=y=u([d(2,v.IOptionsService),d(3,p.ICharSizeService),d(4,v.IDecorationService),d(5,v.IBufferService),d(6,p.ICoreBrowserService),d(7,p.IThemeService)],y)},9312:function(a,o,c){var u=this&&this.__decorate||function(j,M,D,L){var B,U=arguments.length,H=U<3?M:L===null?L=Object.getOwnPropertyDescriptor(M,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(j,M,D,L);else for(var Q=j.length-1;Q>=0;Q--)(B=j[Q])&&(H=(U<3?B(H):U>3?B(M,D,H):B(M,D))||H);return U>3&&H&&Object.defineProperty(M,D,H),H},d=this&&this.__param||function(j,M){return function(D,L){M(D,L,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const f=c(9806),p=c(9504),m=c(456),w=c(4725),k=c(8460),v=c(844),y=c(6114),x=c(4841),b=c(511),C=c(2585),N=" ",z=new RegExp(N,"g");let A=o.SelectionService=class extends v.Disposable{constructor(j,M,D,L,B,U,H,Q,K){super(),this._element=j,this._screenElement=M,this._linkifier=D,this._bufferService=L,this._coreService=B,this._mouseService=U,this._optionsService=H,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new b.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new k.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new k.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new k.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,v.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!j||!M||j[0]===M[0]&&j[1]===M[1])}get selectionText(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!j||!M)return"";const D=this._bufferService.buffer,L=[];if(this._activeSelectionMode===3){if(j[0]===M[0])return"";const B=j[0]B.replace(z," "))).join(y.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),y.isLinux&&j&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(j){const M=this._getMouseBufferCoords(j),D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(D&&L&&M)&&this._areCoordsInSelection(M,D,L)}isCellInSelection(j,M){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!D||!L)&&this._areCoordsInSelection([j,M],D,L)}_areCoordsInSelection(j,M,D){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var B,U;const D=(U=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:U.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const L=this._getMouseBufferCoords(j);return!!L&&(this._selectWordAt(L,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,_.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=D?0:(M>D&&(M-=D),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return y.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(y.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(j),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const D=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const L=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(L,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);D?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,D)}_fireOnSelectionChange(j,M,D){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let D=M;for(let L=0;M>=L;L++){const B=j.loadCell(L,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:B>1&&M!==L&&(D+=B-1)}return D}setSelection(j,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,D=!0,L=!0){if(j[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,U=B.lines.get(j[1]);if(!U)return;const H=B.translateBufferLineToString(j[1],!1);let Q=this._convertViewportColToCharacterIndex(U,j[0]),K=Q;const Z=j[0]-Q;let ee=0,$=0,I=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ce-1,K+=ce-1);ie>0&&Q>0&&!this._isCharWordSeparator(U.loadCell(ie-1,this._workCell));){U.loadCell(ie-1,this._workCell);const ne=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,ie--):ne>1&&(I+=ne-1,Q-=ne-1),Q--,ie--}for(;oe1&&(F+=ne-1,K+=ne-1),K++,oe++}}K++;let q=Q+Z-ee+I,V=Math.min(this._bufferService.cols,K-Q+ee+$-I-F);if(M||H.slice(Q,K).trim()!==""){if(D&&q===0&&U.getCodePoint(0)!==32){const ie=B.lines.get(j[1]-1);if(ie&&U.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(oe){const ce=this._bufferService.cols-oe.start;q-=ce,V+=ce}}}if(L&&q+V===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ie=B.lines.get(j[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const oe=this._getWordAt([0,j[1]+1],!1,!1,!0);oe&&(V+=oe.length)}}return{start:q,length:V}}}_selectWordAt(j,M){const D=this._getWordAt(j,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[D.start,j[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let D=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,D]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),D={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=A=u([d(3,C.IBufferService),d(4,C.ICoreService),d(5,w.IMouseService),d(6,C.IOptionsService),d(7,w.IRenderService),d(8,w.ICoreBrowserService)],A)},4725:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=c(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService"),o.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,o,c){var u=this&&this.__decorate||function(A,j,M,D){var L,B=arguments.length,U=B<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(A,j,M,D);else for(var H=A.length-1;H>=0;H--)(L=A[H])&&(U=(B<3?L(U):B>3?L(j,M,U):L(j,M))||U);return B>3&&U&&Object.defineProperty(j,M,U),U},d=this&&this.__param||function(A,j){return function(M,D){j(M,D,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const _=c(7239),p=c(8055),m=c(8460),w=c(844),k=c(2585),v=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),x=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=j[M/36%6|0],L=j[M/6%6|0],B=j[M%6];A.push({css:p.channels.toCss(D,L,B),rgba:p.channels.toRgba(D,L,B)})}for(let M=0;M<24;M++){const D=8+10*M;A.push({css:p.channels.toCss(D,D,D),rgba:p.channels.toRgba(D,D,D)})}return A})());let N=o.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new _.ColorContrastCache,this._halfContrastCache=new _.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:y,cursor:x,cursorAccent:b,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(y,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(y,C),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const j=this._colors;if(j.foreground=z(A.foreground,v),j.background=z(A.background,y),j.cursor=z(A.cursor,x),j.cursorAccent=z(A.cursorAccent,b),j.selectionBackgroundTransparent=z(A.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=z(A.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=A.selectionForeground?z(A.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=z(A.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=z(A.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=z(A.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=z(A.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=z(A.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=z(A.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=z(A.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=z(A.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=z(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=z(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=z(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=z(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=z(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=z(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=z(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=z(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(j.ansi.length-16,A.extendedAnsi.length);for(let D=0;D{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const w=new Array(m);for(let k=0;kthis._length)for(let w=this._length;w=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,w,k){if(!(w<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let y=w-1;y>=0;y--)this.set(m+y+k,this.get(m+y));const v=m+w+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,d=5){if(typeof u!="object")return u;const _=Array.isArray(u)?[]:{};for(const p in u)_[p]=d<=1?u[p]:u[p]&&c(u[p],d-1);return _}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let c=0,u=0,d=0,_=0;var p,m,w,k,v;function y(b){const C=b.toString(16);return C.length<2?"0"+C:C}function x(b,C){return b>>0},b.toColor=function(C,N,z,A){return{css:b.toCss(C,N,z,A),rgba:b.toRgba(C,N,z,A)}}})(p||(o.channels=p={})),(function(b){function C(N,z){return _=Math.round(255*z),[c,u,d]=v.toChannels(N.rgba),{css:p.toCss(c,u,d,_),rgba:p.toRgba(c,u,d,_)}}b.blend=function(N,z){if(_=(255&z.rgba)/255,_===1)return{css:z.css,rgba:z.rgba};const A=z.rgba>>24&255,j=z.rgba>>16&255,M=z.rgba>>8&255,D=N.rgba>>24&255,L=N.rgba>>16&255,B=N.rgba>>8&255;return c=D+Math.round((A-D)*_),u=L+Math.round((j-L)*_),d=B+Math.round((M-B)*_),{css:p.toCss(c,u,d),rgba:p.toRgba(c,u,d)}},b.isOpaque=function(N){return(255&N.rgba)==255},b.ensureContrastRatio=function(N,z,A){const j=v.ensureContrastRatio(N.rgba,z.rgba,A);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},b.opaque=function(N){const z=(255|N.rgba)>>>0;return[c,u,d]=v.toChannels(z),{css:p.toCss(c,u,d),rgba:z}},b.opacity=C,b.multiplyOpacity=function(N,z){return _=255&N.rgba,C(N,_*z/255)},b.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(b){let C,N;try{const z=document.createElement("canvas");z.width=1,z.height=1;const A=z.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}b.toColor=function(z){if(z.match(/#[\da-f]{3,8}/i))switch(z.length){case 4:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),d=parseInt(z.slice(3,4).repeat(2),16),p.toColor(c,u,d);case 5:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),d=parseInt(z.slice(3,4).repeat(2),16),_=parseInt(z.slice(4,5).repeat(2),16),p.toColor(c,u,d,_);case 7:return{css:z,rgba:(parseInt(z.slice(1),16)<<8|255)>>>0};case 9:return{css:z,rgba:parseInt(z.slice(1),16)>>>0}}const A=z.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),d=parseInt(A[3]),_=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,d,_);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=z,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,d,_]=C.getImageData(0,0,1,1).data,_!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,d,_),css:z}}})(w||(o.css=w={})),(function(b){function C(N,z,A){const j=N/255,M=z/255,D=A/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))}b.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},b.relativeLuminance2=C})(k||(o.rgb=k={})),(function(b){function C(z,A,j){const M=z>>24&255,D=z>>16&255,L=z>>8&255;let B=A>>24&255,U=A>>16&255,H=A>>8&255,Q=x(k.relativeLuminance2(B,U,H),k.relativeLuminance2(M,D,L));for(;Q0||U>0||H>0);)B-=Math.max(0,Math.ceil(.1*B)),U-=Math.max(0,Math.ceil(.1*U)),H-=Math.max(0,Math.ceil(.1*H)),Q=x(k.relativeLuminance2(B,U,H),k.relativeLuminance2(M,D,L));return(B<<24|U<<16|H<<8|255)>>>0}function N(z,A,j){const M=z>>24&255,D=z>>16&255,L=z>>8&255;let B=A>>24&255,U=A>>16&255,H=A>>8&255,Q=x(k.relativeLuminance2(B,U,H),k.relativeLuminance2(M,D,L));for(;Q>>0}b.blend=function(z,A){if(_=(255&A)/255,_===1)return A;const j=A>>24&255,M=A>>16&255,D=A>>8&255,L=z>>24&255,B=z>>16&255,U=z>>8&255;return c=L+Math.round((j-L)*_),u=B+Math.round((M-B)*_),d=U+Math.round((D-U)*_),p.toRgba(c,u,d)},b.ensureContrastRatio=function(z,A,j){const M=k.relativeLuminance(z>>8),D=k.relativeLuminance(A>>8);if(x(M,D)>8));if(Hx(M,k.relativeLuminance(Q>>8))?U:Q}return U}const L=N(z,A,j),B=x(M,k.relativeLuminance(L>>8));if(Bx(M,k.relativeLuminance(U>>8))?L:U}return L}},b.reduceLuminance=C,b.increaseLuminance=N,b.toChannels=function(z){return[z>>24&255,z>>16&255,z>>8&255,255&z]}})(v||(o.rgba=v={})),o.toPaddedHex=y,o.contrastRatio=x},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),d=c(2585),_=c(4348),p=c(7866),m=c(744),w=c(7302),k=c(6975),v=c(8460),y=c(1753),x=c(1480),b=c(7994),C=c(9282),N=c(5435),z=c(5981),A=c(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((L=>{var B;(B=this._onScrollApi)==null||B.fire(L.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(L){for(const B in L)this.optionsService.options[B]=L[B]}constructor(L){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new _.InstantiationService,this.optionsService=this.register(new w.OptionsService(L)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(y.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(b.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((B=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((B=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new z.WriteBuffer(((B,U)=>this._inputHandler.parse(B,U)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(L,B){this._writeBuffer.write(L,B)}writeSync(L,B){this._logService.logLevel<=d.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(L,B)}input(L,B=!0){this.coreService.triggerDataEvent(L,B)}resize(L,B){isNaN(L)||isNaN(B)||(L=Math.max(L,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(L,B))}scroll(L,B=!1){this._bufferService.scroll(L,B)}scrollLines(L,B,U){this._bufferService.scrollLines(L,B,U)}scrollPages(L){this.scrollLines(L*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(L){const B=L-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(L,B){return this._inputHandler.registerEscHandler(L,B)}registerDcsHandler(L,B){return this._inputHandler.registerDcsHandler(L,B)}registerCsiHandler(L,B){return this._inputHandler.registerCsiHandler(L,B)}registerOscHandler(L,B){return this._inputHandler.registerOscHandler(L,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let L=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?L=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(L=!0),L?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const L=[];L.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of L)B.dispose()}))}}}o.CoreTerminal=M},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(d)))},o.runAndSubscribe=function(c,u){return u(void 0),c((d=>u(d)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(ee,$,I,F){var q,V=arguments.length,ie=V<3?$:F===null?F=Object.getOwnPropertyDescriptor($,I):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(ee,$,I,F);else for(var oe=ee.length-1;oe>=0;oe--)(q=ee[oe])&&(ie=(V<3?q(ie):V>3?q($,I,ie):q($,I))||ie);return V>3&&ie&&Object.defineProperty($,I,ie),ie},d=this&&this.__param||function(ee,$){return function(I,F){$(I,F,ee)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const _=c(2584),p=c(7116),m=c(2015),w=c(844),k=c(482),v=c(8437),y=c(8460),x=c(643),b=c(511),C=c(3734),N=c(2585),z=c(1480),A=c(6242),j=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function B(ee,$){if(ee>24)return $.setWinLines||!1;switch(ee){case 1:return!!$.restoreWin;case 2:return!!$.minimizeWin;case 3:return!!$.setWinPosition;case 4:return!!$.setWinSizePixels;case 5:return!!$.raiseWin;case 6:return!!$.lowerWin;case 7:return!!$.refreshWin;case 8:return!!$.setWinSizeChars;case 9:return!!$.maximizeWin;case 10:return!!$.fullscreenWin;case 11:return!!$.getWinState;case 13:return!!$.getWinPosition;case 14:return!!$.getWinSizePixels;case 15:return!!$.getScreenSizePixels;case 16:return!!$.getCellSizePixels;case 18:return!!$.getWinSizeChars;case 19:return!!$.getScreenSizeChars;case 20:return!!$.getIconTitle;case 21:return!!$.getWinTitle;case 22:return!!$.pushTitle;case 23:return!!$.popTitle;case 24:return!!$.setWinLines}return!1}var U;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(o.WindowsOptionsReportType=U={}));let H=0;class Q extends w.Disposable{getAttrData(){return this._curAttrData}constructor($,I,F,q,V,ie,oe,ce,ne=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=I,this._coreService=F,this._logService=q,this._optionsService=V,this._oscLinkService=ie,this._coreMouseService=oe,this._unicodeService=ce,this._parser=ne,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new b.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new y.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new y.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new y.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new y.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new y.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new y.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new y.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new y.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new y.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new y.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new y.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new y.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:ae.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,ae,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:ae,data:le})})),this._parser.setDcsHandlerFallback(((G,ae,le)=>{ae==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:ae,payload:le})})),this._parser.setPrintHandler(((G,ae,le)=>this.print(G,ae,le))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(_.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(_.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(_.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(_.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(_.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(_.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(_.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(_.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(_.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(_.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new A.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new A.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new A.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new A.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new A.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new A.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new A.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new A.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new A.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new A.OscHandler((G=>this.restoreCursorColor(G)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const G in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((G,ae)=>this.requestStatusString(G,ae))))}_preserveStack($,I,F,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=I,this._parseStack.decodedLength=F,this._parseStack.position=q}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((I,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((I=>{if(I!=="#SLOW_TIMEOUT")throw I;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,I){let F,q=this._activeBuffer.x,V=this._activeBuffer.y,ie=0;const oe=this._parseStack.paused;if(oe){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,I))return this._logSlowResolvingAsync(F),F;q=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>L&&(ie=this._parseStack.position+L)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(G=>String.fromCharCode(G))).join("")}"`),typeof $=="string"?$.split("").map((G=>G.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthL)for(let G=ie;G<$.length;G+=L){const ae=G+L<$.length?G+L:$.length,le=typeof $=="string"?this._stringDecoder.decode($.substring(G,ae),this._parseBuffer):this._utf8Decoder.decode($.subarray(G,ae),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,le))return this._preserveStack(q,V,le,G),this._logSlowResolvingAsync(F),F}else if(!oe){const G=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,G))return this._preserveStack(q,V,G,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===q&&this._activeBuffer.y===V||this._onCursorMove.fire();const ce=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ne=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ne0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let ge=this._parser.precedingJoinState;for(let be=I;bece){if(ne){const Me=le;let Ue=this._activeBuffer.x-Ye;for(this._activeBuffer.x=Ye,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&le instanceof v.BufferLine&&le.copyCellsFrom(Me,Ue,0,Ye,!1);Ue=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(G&&(le.insertCells(this._activeBuffer.x,V-Ye,this._activeBuffer.getNullCell(ae)),le.getWidth(ce-1)===2&&le.setCellFromCodepoint(ce-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,ae)),le.setCellFromCodepoint(this._activeBuffer.x++,q,V,ae),V>0)for(;--V;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=ge,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,I){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,I):this._parser.registerCsiHandler($,(F=>!B(F.params[0],this._optionsService.rawOptions.windowOptions)||I(F)))}registerDcsHandler($,I){return this._parser.registerDcsHandler($,new j.DcsHandler(I))}registerEscHandler($,I){return this._parser.registerEscHandler($,I)}registerOscHandler($,I){return this._parser.registerOscHandler($,new A.OscHandler(I))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var $;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&$.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);I.hasWidth(this._activeBuffer.x)&&!I.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor($=this._bufferService.cols-1){this._activeBuffer.x=Math.min($,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor($,I){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+I):(this._activeBuffer.x=$,this._activeBuffer.y=I),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,I){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+I)}cursorUp($){const I=this._activeBuffer.y-this._activeBuffer.scrollTop;return I>=0?this._moveCursor(0,-Math.min(I,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const I=this._activeBuffer.scrollBottom-this._activeBuffer.y;return I>=0?this._moveCursor(0,Math.min(I,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0}cursorForward($){return this._moveCursor($.params[0]||1,0),!0}cursorBackward($){return this._moveCursor(-($.params[0]||1),0),!0}cursorNextLine($){return this.cursorDown($),this._activeBuffer.x=0,!0}cursorPrecedingLine($){return this.cursorUp($),this._activeBuffer.x=0,!0}cursorCharAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0}charPosAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative($){return this._moveCursor($.params[0]||1,0),!0}linePosAbsolute($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0}vPositionRelative($){return this._moveCursor(0,$.params[0]||1),!0}hVPosition($){return this.cursorPosition($),!0}tabClear($){const I=$.params[0];return I===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:I===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let I=$.params[0]||1;for(;I--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let I=$.params[0]||1;for(;I--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const I=$.params[0];return I===1&&(this._curAttrData.bg|=536870912),I!==2&&I!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,I,F,q=!1,V=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ie.replaceCells(I,F,this._activeBuffer.getNullCell(this._eraseAttrData()),V),q&&(ie.isWrapped=!1)}_resetBufferLine($,I=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),I),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),F.isWrapped=!1)}eraseInDisplay($,I=!1){let F;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,I);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,I);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,I);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine($,I=!1){switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,I);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,I);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,I)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let I=$.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let ne=ce;for(let G=1;G0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(_.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(_.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(_.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(_.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(_.C0.ESC+"[>83;40003;0c")),!0}_is($){return(this._optionsService.rawOptions.termName+"").indexOf($)===0}setMode($){for(let I=0;I<$.length;I++)switch($.params[I]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let I=0;I<$.length;I++)switch($.params[I]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode($){for(let I=0;I<$.length;I++)switch($.params[I]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let I=0;I<$.length;I++)switch($.params[I]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[I]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode($,I){const F=this._coreService.decPrivateModes,{activeProtocol:q,activeEncoding:V}=this._coreMouseService,ie=this._coreService,{buffers:oe,cols:ce}=this._bufferService,{active:ne,alt:G}=oe,ae=this._optionsService.rawOptions,le=Fe=>Fe?1:2,ge=$.params[0];return be=ge,Ee=I?ge===2?4:ge===4?le(ie.modes.insertMode):ge===12?3:ge===20?le(ae.convertEol):0:ge===1?le(F.applicationCursorKeys):ge===3?ae.windowOptions.setWinLines?ce===80?2:ce===132?1:0:0:ge===6?le(F.origin):ge===7?le(F.wraparound):ge===8?3:ge===9?le(q==="X10"):ge===12?le(ae.cursorBlink):ge===25?le(!ie.isCursorHidden):ge===45?le(F.reverseWraparound):ge===66?le(F.applicationKeypad):ge===67?4:ge===1e3?le(q==="VT200"):ge===1002?le(q==="DRAG"):ge===1003?le(q==="ANY"):ge===1004?le(F.sendFocus):ge===1005?4:ge===1006?le(V==="SGR"):ge===1015?4:ge===1016?le(V==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?le(ne===G):ge===2004?le(F.bracketedPasteMode):0,ie.triggerDataEvent(`${_.C0.ESC}[${I?"":"?"}${be};${Ee}$y`),!0;var be,Ee}_updateAttrColor($,I,F,q,V){return I===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([F,q,V])):I===5&&($&=-50331904,$|=33554432|255&F),$}_extractColor($,I,F){const q=[0,0,-1,0,0,0];let V=0,ie=0;do{if(q[ie+V]=$.params[I+ie],$.hasSubParams(I+ie)){const oe=$.getSubParams(I+ie);let ce=0;do q[1]===5&&(V=1),q[ie+ce+1+V]=oe[ce];while(++ce=2||q[1]===2&&ie+V>=5)break;q[1]&&(V=1)}while(++ie+I<$.length&&ie+V5)&&($=1),I.extended.underlineStyle=$,I.fg|=268435456,$===0&&(I.fg&=-268435457),I.updateExtended()}_processSGR0($){$.fg=v.DEFAULT_ATTR_DATA.fg,$.bg=v.DEFAULT_ATTR_DATA.bg,$.extended=$.extended.clone(),$.extended.underlineStyle=0,$.extended.underlineColor&=-67108864,$.updateExtended()}charAttributes($){if($.length===1&&$.params[0]===0)return this._processSGR0(this._curAttrData),!0;const I=$.length;let F;const q=this._curAttrData;for(let V=0;V=30&&F<=37?(q.fg&=-50331904,q.fg|=16777216|F-30):F>=40&&F<=47?(q.bg&=-50331904,q.bg|=16777216|F-40):F>=90&&F<=97?(q.fg&=-50331904,q.fg|=16777224|F-90):F>=100&&F<=107?(q.bg&=-50331904,q.bg|=16777224|F-100):F===0?this._processSGR0(q):F===1?q.fg|=134217728:F===3?q.bg|=67108864:F===4?(q.fg|=268435456,this._processUnderline($.hasSubParams(V)?$.getSubParams(V)[0]:1,q)):F===5?q.fg|=536870912:F===7?q.fg|=67108864:F===8?q.fg|=1073741824:F===9?q.fg|=2147483648:F===2?q.bg|=134217728:F===21?this._processUnderline(2,q):F===22?(q.fg&=-134217729,q.bg&=-134217729):F===23?q.bg&=-67108865:F===24?(q.fg&=-268435457,this._processUnderline(0,q)):F===25?q.fg&=-536870913:F===27?q.fg&=-67108865:F===28?q.fg&=-1073741825:F===29?q.fg&=2147483647:F===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?V+=this._extractColor($,V,q):F===53?q.bg|=1073741824:F===55?q.bg&=-1073741825:F===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):F===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${_.C0.ESC}[0n`);break;case 6:const I=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[${I};${F}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const I=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${_.C0.ESC}[?${I};${F}R`)}return!0}softReset($){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle($){const I=$.params[0]||1;switch(I){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=I%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion($){const I=$.params[0]||1;let F;return($.length<2||(F=$.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>I&&(this._activeBuffer.scrollTop=I-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const I=$.length>1?$.params[1]:0;switch($.params[0]){case 14:I!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${_.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:I!==0&&I!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),I!==0&&I!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:I!==0&&I!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),I!==0&&I!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor($){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor($){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle($){return this._windowTitle=$,this._onTitleChange.fire($),!0}setIconName($){return this._iconName=$,!0}setOrReportIndexedColor($){const I=[],F=$.split(";");for(;F.length>1;){const q=F.shift(),V=F.shift();if(/^\d+$/.exec(q)){const ie=parseInt(q);if(Z(ie))if(V==="?")I.push({type:0,index:ie});else{const oe=(0,M.parseColor)(V);oe&&I.push({type:1,index:ie,color:oe})}}}return I.length&&this._onColor.fire(I),!0}setHyperlink($){const I=$.split(";");return!(I.length<2)&&(I[1]?this._createHyperlink(I[0],I[1]):!I[0]&&this._finishHyperlink())}_createHyperlink($,I){this._getCurrentLinkId()&&this._finishHyperlink();const F=$.split(":");let q;const V=F.findIndex((ie=>ie.startsWith("id=")));return V!==-1&&(q=F[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:I}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,I){const F=$.split(";");for(let q=0;q=this._specialColors.length);++q,++I)if(F[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[I]}]);else{const V=(0,M.parseColor)(F[q]);V&&this._onColor.fire([{type:1,index:this._specialColors[I],color:V}])}return!0}setOrReportFgColor($){return this._setOrReportSpecialColor($,0)}setOrReportBgColor($){return this._setOrReportSpecialColor($,1)}setOrReportCursorColor($){return this._setOrReportSpecialColor($,2)}restoreIndexedColor($){if(!$)return this._onColor.fire([{type:2}]),!0;const I=[],F=$.split(";");for(let q=0;q=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel($){return this._charsetService.setgLevel($),!0}screenAlignmentPattern(){const $=new b.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let I=0;I(this._coreService.triggerDataEvent(`${_.C0.ESC}${V}${_.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,I){this._dirtyRowTracker.markRangeDirty($,I)}}o.InputHandler=Q;let K=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){eethis.end&&(this.end=ee)}markRangeDirty(ee,$){ee>$&&(H=ee,ee=$,$=H),eethis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(ee){return 0<=ee&&ee<256}K=u([d(0,N.IBufferService)],K)},844:(a,o)=>{function c(u){for(const d of u)d.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const d=this._disposables.indexOf(u);d!==-1&&this._disposables.splice(d,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var d;this._isDisposed||u===this._value||((d=this._value)==null||d.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,_,p){this._data[d]||(this._data[d]={}),this._data[d][_]=p}get(d,_){return this._data[d]?this._data[d][_]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,d,_,p,m){this._data.get(u,d)||this._data.set(u,d,new c),this._data.get(u,d).set(_,p,m)}get(u,d,_,p){var m;return(m=this._data.get(u,d))==null?void 0:m.get(_,p)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const d=this._getKey(u);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do d(this._array[c]);while(++c=d;){let p=d+_>>1;const m=this._getKey(this._array[p]);if(m>u)_=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}d=p+1}}return d}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._iy)return v-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-w))}ms`),void this._start();v=y}this.clear()}}class _ extends d{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const w=Date.now()+m;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}o.PriorityTaskQueue=_,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:_,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(d){const _=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),p=_==null?void 0:_.get(d.cols-1),m=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(_){return[_>>>16&255,_>>>8&255,255&_]}static fromColorRGB(_){return(255&_[0])<<16|(255&_[1])<<8|255&_[2]}clone(){const _=new c;return _.fg=this.fg,_.bg=this.bg,_.extended=this.extended.clone(),_}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(_){this._ext=_}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(_){this._ext&=-469762049,this._ext|=_<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(_){this._ext&=-67108864,this._ext|=67108863&_}get urlId(){return this._urlId}set urlId(_){this._urlId=_}get underlineVariantOffset(){const _=(3758096384&this._ext)>>29;return _<0?4294967288^_:_}set underlineVariantOffset(_){this._ext&=536870911,this._ext|=_<<29&3758096384}constructor(_=0,p=0){this._ext=0,this._urlId=0,this._ext=_,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),d=c(7226),_=c(3734),p=c(8437),m=c(4634),w=c(511),k=c(643),v=c(4863),y=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(x,b,C){this._hasScrollback=x,this._optionsService=b,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=y.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new _.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new _.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,b){return new p.BufferLine(this._bufferService.cols,this.getNullCell(x),b)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:b}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=p.DEFAULT_ATTR_DATA);let b=this._rows;for(;b--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,b){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const z=this._getCorrectBufferLength(b);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(x,C)));else for(let j=this._rows;j>b;j--)this.lines.length>b+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=z}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,b-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(x,b),this._cols>x))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let b=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,b){this._cols!==x&&(x>this._cols?this._reflowLarger(x,b):this._reflowSmaller(x,b))}_reflowLarger(x,b){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const N=(0,m.reflowLargerCreateNewLayout)(this.lines,C);(0,m.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(x,b,N.countRemoved)}}_reflowLargerAdjustViewport(x,b,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=C;for(;z-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let j=this.lines.get(A);if(!j||!j.isWrapped&&j.getTrimmedLength()<=x)continue;const M=[j];for(;j.isWrapped&&A>0;)j=this.lines.get(--A),M.unshift(j);const D=this.ybase+this.y;if(D>=A&&D0&&(N.push({start:A+M.length+z,newLines:Q}),z+=Q.length),M.push(...Q);let K=B.length-1,Z=B[K];Z===0&&(K--,Z=B[K]);let ee=M.length-U-1,$=L;for(;ee>=0;){const F=Math.min($,Z);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[ee],$-F,Z-F,F,!0),Z-=F,Z===0&&(K--,Z=B[K]),$-=F,$===0){ee--;const q=Math.max(ee,0);$=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],j=[];for(let K=0;K=0;K--)if(B&&B.start>D+U){for(let Z=B.newLines.length-1;Z>=0;Z--)this.lines.set(K--,B.newLines[Z]);K++,A.push({index:D+1,amount:B.newLines.length}),U+=B.newLines.length,B=N[++L]}else this.lines.set(K,j[D--]);let H=0;for(let K=A.length-1;K>=0;K--)A[K].index+=H,this.lines.onInsertEmitter.fire(A[K]),H+=A[K].amount;const Q=Math.max(0,M+z-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(x,b,C=0,N){const z=this.lines.get(x);return z?z.translateToString(b,C,N):""}getWrappedRangeForLine(x){let b=x,C=x;for(;b>0&&this.lines.get(b).isWrapped;)b--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let b=0;b{b.line-=C,b.line<0&&b.dispose()}))),b.register(this.lines.onInsert((C=>{b.line>=C.index&&(b.line+=C.amount)}))),b.register(this.lines.onDelete((C=>{b.line>=C.index&&b.lineC.index&&(b.line-=C.amount)}))),b.register(b.onDispose((()=>this._removeMarker(b)))),b}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),d=c(511),_=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class w{constructor(v,y,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const b=y||d.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]);for(let C=0;C>22,2097152&y?this._combined[v].charCodeAt(this._combined[v].length-1):x]}set(v,y){this._data[3*v+1]=y[_.CHAR_DATA_ATTR_INDEX],y[_.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=y[1],this._data[3*v+0]=2097152|v|y[_.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const y=this._data[3*v+0];return 2097152&y?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&y}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const y=this._data[3*v+0];return 2097152&y?this._combined[v]:2097151&y?(0,p.stringFromCodePoint)(2097151&y):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,y){return m=3*v,y.content=this._data[m+0],y.fg=this._data[m+1],y.bg=this._data[m+2],2097152&y.content&&(y.combinedData=this._combined[v]),268435456&y.bg&&(y.extended=this._extendedAttrs[v]),y}setCell(v,y){2097152&y.content&&(this._combined[v]=y.combinedData),268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=y.content,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}setCellFromCodepoint(v,y,x,b){268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=y|x<<22,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}addCodepointToCell(v,y,x){let b=this._data[3*v+0];2097152&b?this._combined[v]+=(0,p.stringFromCodePoint)(y):2097151&b?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&b)+(0,p.stringFromCodePoint)(y),b&=-2097152,b|=2097152):b=y|4194304,x&&(b&=-12582913,b|=x<<22),this._data[3*v+0]=b}insertCells(v,y,x){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),y=0;--C)this.setCell(v+y+C,this.loadCell(v+C,b));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const b=new Uint32Array(x);b.set(this._data),this._data=b}for(let b=this.length;b=v&&delete this._combined[z]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[z]}}return this.length=v,4*x*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,y,x,b,C){const N=v._data;if(C)for(let A=b-1;A>=0;A--){for(let j=0;j<3;j++)this._data[3*(x+A)+j]=N[3*(y+A)+j];268435456&N[3*(y+A)+2]&&(this._extendedAttrs[x+A]=v._extendedAttrs[y+A])}else for(let A=0;A=y&&(this._combined[j-y+x]=v._combined[j])}}translateToString(v,y,x,b){y=y??0,x=x??this.length,v&&(x=Math.min(x,this.getTrimmedLength())),b&&(b.length=0);let C="";for(;y>22||1}return b&&b.push(y),C}}o.BufferLine=w},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,o)=>{function c(u,d,_){if(d===u.length-1)return u[d].getTrimmedLength();const p=!u[d].hasContent(_-1)&&u[d].getWidth(_-1)===1,m=u[d+1].getWidth(0)===2;return p&&m?_-1:_}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,d,_,p,m){const w=[];for(let k=0;k=k&&p0&&(j>b||x[j].getTrimmedLength()===0);j--)A++;A>0&&(w.push(k+x.length-A),w.push(A)),k+=x.length-1}return w},o.reflowLargerCreateNewLayout=function(u,d){const _=[];let p=0,m=d[p],w=0;for(let k=0;kc(u,x,d))).reduce(((y,x)=>y+x));let w=0,k=0,v=0;for(;vy&&(w-=y,k++);const x=u[k].getWidth(w-1)===2;x&&w--;const b=x?_-1:_;p.push(b),v+=b}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),d=c(844),_=c(9092);class p extends d.Disposable{constructor(w,k){super(),this._optionsService=w,this._bufferService=k,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new _.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new _.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(w,k){this._normal.resize(w,k),this._alt.resize(w,k),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}o.BufferSet=p},511:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),d=c(643),_=c(3734);class p extends _.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new _.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const k=new p;return k.setFromCharData(w),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(w[d.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(w[d.CHAR_DATA_CHAR_INDEX].length===2){const v=w[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const y=w[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(v-55296)+y-56320+65536|w[d.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=w[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[d.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=w[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),d=c(844);class _{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=_._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=_,_._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var c,u,d;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=` -`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL=""})(c||(o.C0=c={})),(function(_){_.PAD="€",_.HOP="",_.BPH="‚",_.NBH="ƒ",_.IND="„",_.NEL="…",_.SSA="†",_.ESA="‡",_.HTS="ˆ",_.HTJ="‰",_.VTS="Š",_.PLD="‹",_.PLU="Œ",_.RI="",_.SS2="Ž",_.SS3="",_.DCS="",_.PU1="‘",_.PU2="’",_.STS="“",_.CCH="”",_.MW="•",_.SPA="–",_.EPA="—",_.SOS="˜",_.SGCI="™",_.SCI="š",_.CSI="›",_.ST="œ",_.OSC="",_.PM="ž",_.APC="Ÿ"})(u||(o.C1=u={})),(function(_){_.ST=`${c.ESC}\\`})(d||(o.C1_ESCAPED=d={}))},7399:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(_,p,m,w){const k={type:0,cancel:!1,key:void 0},v=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:k.key=_.ctrlKey?"\b":u.C0.DEL,_.altKey&&(k.key=u.C0.ESC+k.key);break;case 9:if(_.shiftKey){k.key=u.C0.ESC+"[Z";break}k.key=u.C0.HT,k.cancel=!0;break;case 13:k.key=_.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,k.cancel=!0;break;case 27:k.key=u.C0.ESC,_.altKey&&(k.key=u.C0.ESC+u.C0.ESC),k.cancel=!0;break;case 37:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"D",k.key===u.C0.ESC+"[1;3D"&&(k.key=u.C0.ESC+(m?"b":"[1;5D"))):k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"C",k.key===u.C0.ESC+"[1;3C"&&(k.key=u.C0.ESC+(m?"f":"[1;5C"))):k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"A",m||k.key!==u.C0.ESC+"[1;3A"||(k.key=u.C0.ESC+"[1;5A")):k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(_.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"B",m||k.key!==u.C0.ESC+"[1;3B"||(k.key=u.C0.ESC+"[1;5B")):k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(k.key=u.C0.ESC+"[2~");break;case 46:k.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:k.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:k.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:_.shiftKey?k.type=2:_.ctrlKey?k.key=u.C0.ESC+"[5;"+(v+1)+"~":k.key=u.C0.ESC+"[5~";break;case 34:_.shiftKey?k.type=3:_.ctrlKey?k.key=u.C0.ESC+"[6;"+(v+1)+"~":k.key=u.C0.ESC+"[6~";break;case 112:k.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:k.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:k.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:k.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:k.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:k.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:k.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:k.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:k.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:k.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:k.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:k.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(m&&!w||!_.altKey||_.metaKey)!m||_.altKey||_.ctrlKey||_.shiftKey||!_.metaKey?_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?k.key=_.key:_.key&&_.ctrlKey&&(_.key==="_"&&(k.key=u.C0.US),_.key==="@"&&(k.key=u.C0.NUL)):_.keyCode===65&&(k.type=1);else{const y=d[_.keyCode],x=y==null?void 0:y[_.shiftKey?1:0];if(x)k.key=u.C0.ESC+x;else if(_.keyCode>=65&&_.keyCode<=90){const b=_.ctrlKey?_.keyCode-64:_.keyCode+32;let C=String.fromCharCode(b);_.shiftKey&&(C=C.toUpperCase()),k.key=u.C0.ESC+C}else if(_.keyCode===32)k.key=u.C0.ESC+(_.ctrlKey?u.C0.NUL:" ");else if(_.key==="Dead"&&_.code.startsWith("Key")){let b=_.code.slice(3,4);_.shiftKey||(b=b.toLowerCase()),k.key=u.C0.ESC+b,k.cancel=!0}}else _.keyCode>=65&&_.keyCode<=90?k.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?k.key=u.C0.NUL:_.keyCode>=51&&_.keyCode<=55?k.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?k.key=u.C0.DEL:_.keyCode===219?k.key=u.C0.ESC:_.keyCode===220?k.key=u.C0.FS:_.keyCode===221&&(k.key=u.C0.GS)}return k}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,u=0,d=c.length){let _="";for(let p=u;p65535?(m-=65536,_+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):_+=String.fromCharCode(m)}return _},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const d=c.length;if(!d)return 0;let _=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[_++]=1024*(this._interim-55296)+m-56320+65536:(u[_++]=this._interim,u[_++]=m),this._interim=0}for(let m=p;m=d)return this._interim=w,_;const k=c.charCodeAt(m);56320<=k&&k<=57343?u[_++]=1024*(w-55296)+k-56320+65536:(u[_++]=w,u[_++]=k)}else w!==65279&&(u[_++]=w)}return _}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const d=c.length;if(!d)return 0;let _,p,m,w,k=0,v=0,y=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let z,A=0;for(;(z=63&this.interim[++A])&&A<4;)N<<=6,N|=z;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=j-A;for(;y=d)return 0;if(z=c[y++],(192&z)!=128){y--,C=!0;break}this.interim[A++]=z,N<<=6,N|=63&z}C||(j===2?N<128?y--:u[k++]=N:j===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const x=d-4;let b=y;for(;b=d)return this.interim[0]=_,k;if(p=c[b++],(192&p)!=128){b--;continue}if(v=(31&_)<<6|63&p,v<128){b--;continue}u[k++]=v}else if((240&_)==224){if(b>=d)return this.interim[0]=_,k;if(p=c[b++],(192&p)!=128){b--;continue}if(b>=d)return this.interim[0]=_,this.interim[1]=p,k;if(m=c[b++],(192&m)!=128){b--;continue}if(v=(15&_)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[k++]=v}else if((248&_)==240){if(b>=d)return this.interim[0]=_,k;if(p=c[b++],(192&p)!=128){b--;continue}if(b>=d)return this.interim[0]=_,this.interim[1]=p,k;if(m=c[b++],(192&m)!=128){b--;continue}if(b>=d)return this.interim[0]=_,this.interim[1]=p,this.interim[2]=m,k;if(w=c[b++],(192&w)!=128){b--;continue}if(v=(7&_)<<18|(63&p)<<12|(63&m)<<6|63&w,v<65536||v>1114111)continue;u[k++]=v}}return k}}},225:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],_=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mk[x][1])return!1;for(;x>=y;)if(v=y+x>>1,w>k[v][1])y=v+1;else{if(!(w=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,w){let k=this.wcwidth(m),v=k===0&&w!==0;if(v){const y=u.UnicodeService.extractWidth(w);y===0?v=!1:y>k&&(k=y)}return u.UnicodeService.createPropertyValue(0,k,v)}}},5981:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=c(8460),d=c(844);class _ extends d.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,w){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(w),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(w)}_innerWrite(m=0,w=!0){const k=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],y=this._action(v,w);if(y){const b=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void y.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(b)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-k>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=_},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function d(_,p){const m=_.toString(16),w=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}o.parseColor=function(_){if(!_)return;let p=_.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.exec(p);if(m){const w=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/w*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/w*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/w*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,w=[0,0,0];for(let k=0;k<3;++k){const v=parseInt(p.slice(m*k,m*k+m),16);w[k]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return w}},o.toRgbString=function(_,p=16){const[m,w,k]=_;return`rgb:${d(m,p)}/${d(w,p)}/${d(k,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=c(482),d=c(8742),_=c(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(w,k){this._handlers[w]===void 0&&(this._handlers[w]=[]);const v=this._handlers[w];return v.push(k),{dispose:()=>{const y=v.indexOf(k);y!==-1&&v.splice(y,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(w,k){if(this.reset(),this._ident=w,this._active=this._handlers[w]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(w,k,v){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(w,k,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(w,k,v))}unhook(w,k=!0){if(this._active.length){let v=!1,y=this._active.length-1,x=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,v=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&v===!1){for(;y>=0&&(v=this._active[y].unhook(w),v!==!0);y--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,v;y--}for(;y>=0;y--)if(v=this._active[y].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const m=new d.Params;m.addParam(0),o.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=m,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():m,this._data="",this._hitLimit=!1}put(w,k,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(w,k,v),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let k=!1;if(this._hitLimit)k=!1;else if(w&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,k}}},2015:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=c(844),d=c(8742),_=c(6242),p=c(6351);class m{constructor(y){this.table=new Uint8Array(y)}setDefault(y,x){this.table.fill(y<<4|x)}add(y,x,b,C){this.table[x<<8|y]=b<<4|C}addMany(y,x,b,C){for(let N=0;Nj)),x=(A,j)=>y.slice(A,j),b=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const N=x(0,14);let z;for(z in v.setDefault(1,0),v.addMany(b,0,2,0),N)v.addMany([24,26,153,154],z,3,0),v.addMany(x(128,144),z,3,0),v.addMany(x(144,152),z,3,0),v.add(156,z,0,0),v.add(27,z,11,1),v.add(157,z,4,8),v.addMany([152,158,159],z,0,7),v.add(155,z,11,3),v.add(144,z,11,9);return v.addMany(C,0,3,0),v.addMany(C,1,3,1),v.add(127,1,0,1),v.addMany(C,8,0,8),v.addMany(C,3,3,3),v.add(127,3,0,3),v.addMany(C,4,3,4),v.add(127,4,0,4),v.addMany(C,6,3,6),v.addMany(C,5,3,5),v.add(127,5,0,5),v.addMany(C,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(b,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(x(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(b,7,0,7),v.addMany(C,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(x(64,127),3,7,0),v.addMany(x(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(x(48,60),4,8,4),v.addMany(x(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(x(32,64),6,0,6),v.add(127,6,0,6),v.addMany(x(64,127),6,0,0),v.addMany(x(32,48),3,9,5),v.addMany(x(32,48),5,9,5),v.addMany(x(48,64),5,0,6),v.addMany(x(64,127),5,7,0),v.addMany(x(32,48),4,9,5),v.addMany(x(32,48),1,9,2),v.addMany(x(32,48),2,9,2),v.addMany(x(48,127),2,10,0),v.addMany(x(48,80),1,10,0),v.addMany(x(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(x(96,127),1,10,0),v.add(80,1,11,9),v.addMany(C,9,0,9),v.add(127,9,0,9),v.addMany(x(28,32),9,0,9),v.addMany(x(32,48),9,9,12),v.addMany(x(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(x(32,128),11,0,11),v.addMany(x(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(x(28,32),10,0,10),v.addMany(x(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(x(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(x(28,32),12,0,12),v.addMany(x(32,48),12,9,12),v.addMany(x(48,64),12,0,11),v.addMany(x(64,127),12,12,13),v.addMany(x(64,127),10,12,13),v.addMany(x(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(b,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(w,0,2,0),v.add(w,8,5,8),v.add(w,6,0,6),v.add(w,11,0,11),v.add(w,13,13,13),v})();class k extends u.Disposable{constructor(y=o.VT500_TRANSITION_TABLE){super(),this._transitions=y,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,b,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,b)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new _.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(y,x=[64,126]){let b=0;if(y.prefix){if(y.prefix.length>1)throw new Error("only one byte as prefix supported");if(b=y.prefix.charCodeAt(0),b&&60>b||b>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(y.intermediates){if(y.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;Nz||z>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");b<<=8,b|=z}}if(y.final.length!==1)throw new Error("final must be a single byte");const C=y.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return b<<=8,b|=C,b}identToString(y){const x=[];for(;y;)x.push(String.fromCharCode(255&y)),y>>=8;return x.reverse().join("")}setPrintHandler(y){this._printHandler=y}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(y,x){const b=this._identifier(y,[48,126]);this._escHandlers[b]===void 0&&(this._escHandlers[b]=[]);const C=this._escHandlers[b];return C.push(x),{dispose:()=>{const N=C.indexOf(x);N!==-1&&C.splice(N,1)}}}clearEscHandler(y){this._escHandlers[this._identifier(y,[48,126])]&&delete this._escHandlers[this._identifier(y,[48,126])]}setEscHandlerFallback(y){this._escHandlerFb=y}setExecuteHandler(y,x){this._executeHandlers[y.charCodeAt(0)]=x}clearExecuteHandler(y){this._executeHandlers[y.charCodeAt(0)]&&delete this._executeHandlers[y.charCodeAt(0)]}setExecuteHandlerFallback(y){this._executeHandlerFb=y}registerCsiHandler(y,x){const b=this._identifier(y);this._csiHandlers[b]===void 0&&(this._csiHandlers[b]=[]);const C=this._csiHandlers[b];return C.push(x),{dispose:()=>{const N=C.indexOf(x);N!==-1&&C.splice(N,1)}}}clearCsiHandler(y){this._csiHandlers[this._identifier(y)]&&delete this._csiHandlers[this._identifier(y)]}setCsiHandlerFallback(y){this._csiHandlerFb=y}registerDcsHandler(y,x){return this._dcsParser.registerHandler(this._identifier(y),x)}clearDcsHandler(y){this._dcsParser.clearHandler(this._identifier(y))}setDcsHandlerFallback(y){this._dcsParser.setHandlerFallback(y)}registerOscHandler(y,x){return this._oscParser.registerHandler(y,x)}clearOscHandler(y){this._oscParser.clearHandler(y)}setOscHandlerFallback(y){this._oscParser.setHandlerFallback(y)}setErrorHandler(y){this._errorHandler=y}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(y,x,b,C,N){this._parseStack.state=y,this._parseStack.handlers=x,this._parseStack.handlerPos=b,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(y,x,b){let C,N=0,z=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(b===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(b===!1&&M>-1){for(;M>=0&&(C=j[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(b===!1&&M>-1){for(;M>=0&&(C=j[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=y[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,b),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=y[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,b),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=A;j>4){case 2:for(let U=j+1;;++U){if(U>=x||(N=y[U])<32||N>126&&N=x||(N=y[U])<32||N>126&&N=x||(N=y[U])<32||N>126&&N=x||(N=y[U])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,z,j),C;D<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++j47&&N<60);j--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const L=this._escHandlers[this._collect<<8|N];let B=L?L.length-1:-1;for(;B>=0&&(C=L[B](),C!==!0);B--)if(C instanceof Promise)return this._preserveStack(4,L,B,z,j),C;B<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let U=j+1;;++U)if(U>=x||(N=y[U])===24||N===26||N===27||N>127&&N=x||(N=y[U])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),d=c(482),_=[];o.OscParser=class{constructor(){this._state=0,this._active=_,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const w=this._handlers[p];return w.push(m),{dispose:()=>{const k=w.indexOf(m);k!==-1&&w.splice(k,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=_,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||_,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,w){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(p,m,w);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(p,m,w))}start(){this.reset(),this._state=1}put(p,m,w){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,w)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,w=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&w===!1){for(;k>=0&&(w=this._active[k].end(p),w!==!0);k--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,w;k--}for(;k>=0;k--)if(w=this._active[k].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=_,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,w){this._hitLimit||(this._data+=(0,d.utf32ToString)(p,m,w),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((w=>(this._data="",this._hitLimit=!1,w)));return this._data="",this._hitLimit=!1,m}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class u{static fromArray(_){const p=new u;if(!_.length)return p;for(let m=Array.isArray(_[0])?1:0;m<_.length;++m){const w=_[m];if(Array.isArray(w))for(let k=0;k256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const _=new u(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_}toArray(){const _=[];for(let p=0;p>8,w=255&this._subParamsIdx[p];w-m>0&&_.push(Array.prototype.slice.call(this._subParams,m,w))}return _}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>c?c:_}}addSubParam(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>c?c:_,this._subParamsIdx[this.length-1]++}}hasSubParams(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0}getSubParams(_){const p=this._subParamsIdx[_]>>8,m=255&this._subParamsIdx[_];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const _={};for(let p=0;p>8,w=255&this._subParamsIdx[p];w-m>0&&(_[p]=this._subParams.slice(m,w))}return _}addDigit(_){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,w=m[p-1];m[p-1]=~w?Math.min(10*w+_,c):_}}o.Params=u},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const d={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(d),u.dispose=()=>this._wrappedAddonDispose(d),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let d=0;d{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),d=c(511);o.BufferApiView=class{constructor(_,p){this._buffer=_,this.type=p}init(_){return this._buffer=_,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(_){const p=this._buffer.lines.get(_);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new d.CellData}}},3785:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,_){if(!(d<0||d>=this._line.length))return _?(this._line.loadCell(d,_),_):this._line.loadCell(d,new u.CellData)}translateToString(d,_,p){return this._line.translateToString(d,_,p)}}},8285:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),d=c(8460),_=c(844);class p extends _.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=p},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(d=>u(d.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((d,_)=>u(d,_.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,o,c){var u=this&&this.__decorate||function(v,y,x,b){var C,N=arguments.length,z=N<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,y,x,b);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(z=(N<3?C(z):N>3?C(y,x,z):C(y,x))||z);return N>3&&z&&Object.defineProperty(y,x,z),z},d=this&&this.__param||function(v,y){return function(x,b){y(x,b,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const _=c(8460),p=c(844),m=c(5295),w=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,y){this.cols=v,this.rows=y,this.buffers.resize(v,y),this._onResize.fire({cols:v,rows:y})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,y=!1){const x=this.buffer;let b;b=this._cachedBlankLine,b&&b.length===this.cols&&b.getFg(0)===v.fg&&b.getBg(0)===v.bg||(b=x.getBlankLine(v,y),this._cachedBlankLine=b),b.isWrapped=y;const C=x.ybase+x.scrollTop,N=x.ybase+x.scrollBottom;if(x.scrollTop===0){const z=x.lines.isFull;N===x.lines.length-1?z?x.lines.recycle().copyFrom(b):x.lines.push(b.clone()):x.lines.splice(N+1,0,b.clone()),z?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const z=N-C+1;x.lines.shiftElements(C+1,z-1,-1),x.lines.set(N,b.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(v,y,x){const b=this.buffer;if(v<0){if(b.ydisp===0)return;this.isUserScrolling=!0}else v+b.ydisp>=b.ybase&&(this.isUserScrolling=!1);const C=b.ydisp;b.ydisp=Math.max(Math.min(b.ydisp+v,b.ybase),0),C!==b.ydisp&&(y||this._onScroll.fire(b.ydisp))}};o.BufferService=k=u([d(0,w.IOptionsService)],k)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,o,c){var u=this&&this.__decorate||function(b,C,N,z){var A,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,C,N,z);else for(var D=b.length-1;D>=0;D--)(A=b[D])&&(M=(j<3?A(M):j>3?A(C,N,M):A(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},d=this&&this.__param||function(b,C){return function(N,z){C(N,z,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const _=c(2585),p=c(8460),m=c(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:b=>b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)},VT200:{events:19,restrict:b=>b.action!==32},DRAG:{events:23,restrict:b=>b.action!==32||b.button!==3},ANY:{events:31,restrict:b=>!0}};function k(b,C){let N=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(N|=64,N|=b.action):(N|=3&b.button,4&b.button&&(N|=64),8&b.button&&(N|=128),b.action===32?N|=32:b.action!==0||C||(N|=3)),N}const v=String.fromCharCode,y={DEFAULT:b=>{const C=[k(b,!1)+32,b.col+32,b.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:b=>{const C=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${k(b,!0)};${b.col};${b.row}${C}`},SGR_PIXELS:b=>{const C=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${k(b,!0)};${b.x};${b.y}${C}`}};let x=o.CoreMouseService=class extends m.Disposable{constructor(b,C){super(),this._bufferService=b,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(w))this.addProtocol(N,w[N]);for(const N of Object.keys(y))this.addEncoding(N,y[N]);this.reset()}addProtocol(b,C){this._protocols[b]=C}addEncoding(b,C){this._encodings[b]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(b){if(!this._protocols[b])throw new Error(`unknown protocol "${b}"`);this._activeProtocol=b,this._onProtocolChange.fire(this._protocols[b].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(b){if(!this._encodings[b])throw new Error(`unknown encoding "${b}"`);this._activeEncoding=b}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(b){if(b.col<0||b.col>=this._bufferService.cols||b.row<0||b.row>=this._bufferService.rows||b.button===4&&b.action===32||b.button===3&&b.action!==32||b.button!==4&&(b.action===2||b.action===3)||(b.col++,b.row++,b.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,b,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(b))return!1;const C=this._encodings[this._activeEncoding](b);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=b,!0}explainEvents(b){return{down:!!(1&b),up:!!(2&b),drag:!!(4&b),move:!!(8&b),wheel:!!(16&b)}}_equalEvents(b,C,N){if(N){if(b.x!==C.x||b.y!==C.y)return!1}else if(b.col!==C.col||b.row!==C.row)return!1;return b.button===C.button&&b.action===C.action&&b.ctrl===C.ctrl&&b.alt===C.alt&&b.shift===C.shift}};o.CoreMouseService=x=u([d(0,_.IBufferService),d(1,_.ICoreService)],x)},6975:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const _=c(1439),p=c(8460),m=c(844),w=c(2585),k=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let y=o.CoreService=class extends m.Disposable{constructor(x,b,C){super(),this._bufferService=x,this._logService=b,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}reset(){this.modes=(0,_.clone)(k),this.decPrivateModes=(0,_.clone)(v)}triggerDataEvent(x,b=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;b&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),b&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((b=>b.charCodeAt(0))))),this._onBinary.fire(x))}};o.CoreService=y=u([d(0,w.IBufferService),d(1,w.ILogService),d(2,w.IOptionsService)],y)},9074:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),d=c(8460),_=c(844),p=c(6106);let m=0,w=0;class k extends _.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,_.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const b=new v(x);if(b){const C=b.marker.onDispose((()=>b.dispose()));b.onDispose((()=>{b&&(this._decorations.delete(b)&&this._onDecorationRemoved.fire(b),C.dispose())})),this._decorations.insert(b),this._onDecorationRegistered.fire(b)}return b}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,b,C){let N=0,z=0;for(const A of this._decorations.getKeyIterator(b))N=A.options.x??0,z=N+(A.options.width??1),x>=N&&x{m=z.options.x??0,w=m+(z.options.width??1),x>=m&&x{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),d=c(8343);class _{constructor(...m){this._entries=new Map;for(const[w,k]of m)this.set(w,k)}set(m,w){const k=this._entries.get(m);return this._entries.set(m,w),k}forEach(m){for(const[w,k]of this._entries.entries())m(w,k)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=_,o.InstantiationService=class{constructor(){this._services=new _,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const w=(0,d.getServiceDependencies)(p).sort(((y,x)=>y.index-x.index)),k=[];for(const y of w){const x=this._services.get(y.id);if(!x)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${y.id}.`);k.push(x)}const v=w.length>0?w[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...k)}}},7866:function(a,o,c){var u=this&&this.__decorate||function(v,y,x,b){var C,N=arguments.length,z=N<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,y,x,b);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(z=(N<3?C(z):N>3?C(y,x,z):C(y,x))||z);return N>3&&z&&Object.defineProperty(y,x,z),z},d=this&&this.__param||function(v,y){return function(x,b){y(x,b,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const _=c(844),p=c(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let w,k=o.LogService=class extends _.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let y=0;yJSON.stringify(z))).join(", ")})`);const N=b.apply(this,C);return w.trace(`GlyphRenderer#${b.name} return`,N),N}}},7302:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=c(8460),d=c(844),_=c(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:_.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends d.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const y in k)if(y in v)try{const x=k[y];v[y]=this._sanitizeAndValidateOption(y,x)}catch(x){console.error(x)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((y=>{y===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((y=>{k.indexOf(y)!==-1&&v()}))}_setupOptions(){const k=y=>{if(!(y in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);return this.rawOptions[y]},v=(y,x)=>{if(!(y in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);x=this._sanitizeAndValidateOption(y,x),this.rawOptions[y]!==x&&(this.rawOptions[y]=x,this._onOptionChange.fire(y))};for(const y in this.rawOptions){const x={get:k.bind(this,y),set:v.bind(this,y)};Object.defineProperty(this.options,y,x)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(y){return y==="block"||y==="underline"||y==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${k}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${k} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${k} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=m},2660:function(a,o,c){var u=this&&this.__decorate||function(m,w,k,v){var y,x=arguments.length,b=x<3?w:v===null?v=Object.getOwnPropertyDescriptor(w,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(m,w,k,v);else for(var C=m.length-1;C>=0;C--)(y=m[C])&&(b=(x<3?y(b):x>3?y(w,k,b):y(w,k))||b);return x>3&&b&&Object.defineProperty(w,k,b),b},d=this&&this.__param||function(m,w){return function(k,v){w(k,v,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const _=c(2585);let p=o.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const w=this._bufferService.buffer;if(m.id===void 0){const C=w.addMarker(w.ybase+w.y),N={data:m,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(N,C))),this._dataByLinkId.set(N.id,N),N.id}const k=m,v=this._getEntryIdKey(k),y=this._entriesWithId.get(v);if(y)return this.addLineToLink(y.id,w.ybase+w.y),y.id;const x=w.addMarker(w.ybase+w.y),b={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(b,x))),this._entriesWithId.set(b.key,b),this._dataByLinkId.set(b.id,b),b.id}addLineToLink(m,w){const k=this._dataByLinkId.get(m);if(k&&k.lines.every((v=>v.line!==w))){const v=this._bufferService.buffer.addMarker(w);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}getLinkData(m){var w;return(w=this._dataByLinkId.get(m))==null?void 0:w.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,w){const k=m.lines.indexOf(w);k!==-1&&(m.lines.splice(k,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([d(0,_.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(d){return d[u]||[]},o.createDecorator=function(d){if(o.serviceRegistry.has(d))return o.serviceRegistry.get(d);const _=function(p,m,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,v,y){v[c]===v?v[u].push({id:k,index:y}):(v[u]=[{id:k,index:y}],v[c]=v)})(_,p,w)};return _.toString=()=>d,o.serviceRegistry.set(d,_),_}},2585:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=c(8343);var d;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(_){_[_.TRACE=0]="TRACE",_[_.DEBUG=1]="DEBUG",_[_.INFO=2]="INFO",_[_.WARN=3]="WARN",_[_.ERROR=4]="ERROR",_[_.OFF=5]="OFF"})(d||(o.LogLevelEnum=d={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=c(8460),d=c(225);class _{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,w,k=!1){return(16777215&m)<<3|(3&w)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new d.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let w=0,k=0;const v=m.length;for(let y=0;y=v)return w+this.wcwidth(x);const N=m.charCodeAt(y);56320<=N&&N<=57343?x=1024*(x-55296)+N-56320+65536:w+=this.wcwidth(N)}const b=this.charProperties(x,k);let C=_.extractWidth(b);_.extractShouldJoin(b)&&(C-=_.extractWidth(k)),w+=C,k=b}return w}charProperties(m,w){return this._activeProvider.charProperties(m,w)}}o.UnicodeService=_}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var c=r[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),c=s(3236),u=s(844),d=s(5741),_=s(8285),p=s(7975),m=s(7090),w=["cols","rows"];class k extends u.Disposable{constructor(y){super(),this._core=this.register(new c.Terminal(y)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],b=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:x.bind(this,C),set:b.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(y){if(w.includes(y))throw new Error(`Option "${y}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new _.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const y=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:y.applicationCursorKeys,applicationKeypadMode:y.applicationKeypad,bracketedPasteMode:y.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:y.origin,reverseWraparoundMode:y.reverseWraparound,sendFocusMode:y.sendFocus,wraparoundMode:y.wraparound}}get options(){return this._publicOptions}set options(y){for(const x in y)this._publicOptions[x]=y[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(y,x=!0){this._core.input(y,x)}resize(y,x){this._verifyIntegers(y,x),this._core.resize(y,x)}open(y){this._core.open(y)}attachCustomKeyEventHandler(y){this._core.attachCustomKeyEventHandler(y)}attachCustomWheelEventHandler(y){this._core.attachCustomWheelEventHandler(y)}registerLinkProvider(y){return this._core.registerLinkProvider(y)}registerCharacterJoiner(y){return this._checkProposedApi(),this._core.registerCharacterJoiner(y)}deregisterCharacterJoiner(y){this._checkProposedApi(),this._core.deregisterCharacterJoiner(y)}registerMarker(y=0){return this._verifyIntegers(y),this._core.registerMarker(y)}registerDecoration(y){return this._checkProposedApi(),this._verifyPositiveIntegers(y.x??0,y.width??0,y.height??0),this._core.registerDecoration(y)}hasSelection(){return this._core.hasSelection()}select(y,x,b){this._verifyIntegers(y,x,b),this._core.select(y,x,b)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(y,x){this._verifyIntegers(y,x),this._core.selectLines(y,x)}dispose(){super.dispose()}scrollLines(y){this._verifyIntegers(y),this._core.scrollLines(y)}scrollPages(y){this._verifyIntegers(y),this._core.scrollPages(y)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(y){this._verifyIntegers(y),this._core.scrollToLine(y)}clear(){this._core.clear()}write(y,x){this._core.write(y,x)}writeln(y,x){this._core.write(y),this._core.write(`\r -`,x)}paste(y){this._core.paste(y)}refresh(y,x){this._verifyIntegers(y,x),this._core.refresh(y,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(y){this._addonManager.loadAddon(this,y)}static get strings(){return o}_verifyIntegers(...y){for(const x of y)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...y){for(const x of y)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(Mw)),Mw.exports}var B$=BCn();const PCn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function Kj(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of PCn){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function py(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new B$.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:Kj(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=Kj(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new LCn.FitAddon;i.loadAddon(o),t&&i.loadAddon(new $Cn.WebLinksAddon((x,b)=>{let C;try{C=new URL(b)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,d=null;const _=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",_);const p=()=>{var j;const x=i.element,b=x==null?void 0:x.querySelector(".xterm-screen"),C=x==null?void 0:x.querySelector(".xterm-viewport");if(!x||!(b instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let z=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=z;M--)if((j=N.getLine(N.viewportY+M))!=null&&j.translateToString(!0).trim()){z=M+1;break}const A=b.getBoundingClientRect().height;x.style.height=`${Math.max(e.clientHeight,Math.min(z,i.rows)*A/i.rows)}px`,x.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const x=o.proposeDimensions();x&&(i.resize(x.cols,Math.max(x.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=i.onWriteParsed(()=>{var b;const x=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),x){const C=(b=i.element)==null?void 0:b.querySelector(".xterm-screen");if(C instanceof HTMLElement){const N=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,N-e.clientHeight),d=e.scrollTop}}}),v=i.onScroll(p),y=x=>{(x.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function FCn(e){return Zf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||F$(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function HCn(e){return Zf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&F$(e.partitions)&&(e.error===null||typeof e.error=="string")}function qCn(e){return!Zf(e)||e.type!=="complete"?null:e.backend==="ssh"&&FCn(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&HCn(e.result)?{backend:"slurm",result:e.result}:null}function H$(e){return Zf(e)&&e.type==="complete"}function UCn(e){return Zf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function t6({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:i}){const a=new URLSearchParams({host:e,backend:n});return f.jsx(my,{path:`${t}?${a}`,label:fI({host:Ae(e)}),active:r,onError:i,onComplete:o=>{const c=qCn(o);return c?(s(c),!0):!1}})}function GCn({login:e,onComplete:n,onError:t}){return f.jsx(my,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>H$(r)?(n(),!0):!1})}function VCn({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=T.useState("running");return f.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[f.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[f.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),f.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{className:"border-t-accent-amber"})," ",Azt()]}):i==="done"?f.jsxs(f.Fragment,{children:[f.jsx(ti,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",mzt()]}):i==="failed"?f.jsxs(f.Fragment,{children:[f.jsx(ur,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",kzt()]}):lzt()}),f.jsx("button",{type:"button",onClick:s,"aria-label":Wz(),title:Wz(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:f.jsx(ur,{size:14})})]}),f.jsx(my,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>H$(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function my({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:_}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(d),v=T.useRef(_),[y,x]=T.useState(null);return w.current=u,k.current=d,v.current=_,T.useEffect(()=>{const b=p.current;if(!b)return;const{terminal:C,dispose:N}=py(b,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const z=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${z}//${location.host}`),j=new WebSocket(A);j.binaryType="arraybuffer";let M=!1,D=!1,L=!1;const B=(Q,K)=>{var Z;if(D){K||C.writeln(Q);return}D=!0,(!L||a)&&C.writeln(Q),(Z=k.current)==null||Z.call(k,Q,K),!(a&&!K)&&(C.options.disableStdin=!0,C.blur(),x(Q))},U=C.onData(Q=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(Q))}),H=C.onResize(({cols:Q,rows:K})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){L=!0,C.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let K;try{K=JSON.parse(Q.data)}catch{return}if(w.current(K)){M=!0,a||j.close();return}const Z=UCn(K);Z&&(M?C.writeln(Z):B(Z,!a))},j.onerror=()=>B(rb(),!0),j.onclose=()=>{var Q;if(!M&&!D){B(rb(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,U.dispose(),H.dispose(),j.close(),m.current=null,N()}},[e,t,c,i,a]),T.useEffect(()=>{const b=m.current;b&&(b.options.disableStdin=c||!o||y!==null,!c&&o&&y===null?b.focus():b.blur())},[o,y,c]),f.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[f.jsx("div",{className:`${r} ${s==="card"?P$:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:f.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),y?f.jsx("p",{role:"alert",className:"sr-only",children:y}):null]})}function KCn({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=py(r,!0,!0);return s.write(n),i},[n]),f.jsx("div",{className:`mt-3 h-40 ${P$}`,role:"group","aria-label":fI({host:Ae(e)}),children:f.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let db=null,C0=0;const q$=()=>db;function U$(){const e=C0;return I$(async(n,t)=>{if(e!==C0)return;const r=await awn(n,t);e===C0&&Ze.setQueryData(Zm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===C0&&tn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Ks(),onClick:()=>void n6.retry()}})})}let Cv=U$();function WCn(){C0++,db=null,Cv=U$()}const n6={flush:(e=!1)=>Cv.flush(e),retry:()=>Cv.retry(),queue(e,n=0){const t=db;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(db=e,Cv.queue(e,n))}};window.addEventListener("pagehide",()=>void n6.flush(!0));function Ll(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Bo(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function G$(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],i=new Map(s.map(u=>[Ot(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=i.get(u);return d?[d]:[]}),o=Ot(e.rightTab);return{tabs:[...r,...a].map(u=>Ll(u,Ot(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?Ll(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Ot(e.previewTab):null,history:e.tabHistory.map(Ot),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Ot(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function QCn(e,n){const t=s6();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>Ot(Bo(a))===Ot(Bo(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=Bo(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Ot(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Ot(a))}const s=new Map(r.map(i=>{const a=Bo(i);return[Ot(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(i=>{const a=s.get(i);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?Bo(n):e!=null&&e.active?Bo(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,K$(t,n)}const Ow=(e,n)=>e.id===n.id&&e.view===n.view,H_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,r6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,ei=(e,n,t)=>`${e}:${n??""}:${r6(t)}`,V$=e=>({...e,lineScrollRequest:void 0});function O1(e){return typeof e=="object"&&"path"in e?V$(e):e}const $d=(e,n)=>e.branch===n.branch;function Ot(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${r6(e)}`:`experiment:${e.id}:${e.view}`}function u0(e,n){const t=e.filter(r=>Ot(r)!==n);return t.length===e.length?e:t}function XCn(e){return e!==void 0}function s6(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===ef&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===ay){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(Ot),panelOpen:!0}}if(e===oy){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Ot),panelOpen:!0}}return t}function i6(e,n){const t=s6(e,n);return t.panelOpen?G$(t,{},{}):void 0}function K$(e,n){if(!n)return e;const t=Bo(n),r=Ot(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Ot(c)===r),i=(c,u)=>{const d=c.findIndex(_=>Ot(_)===r);return d<0?[...c,u]:JSON.stringify(Ll(c[d]))===JSON.stringify(Ll(u))?c:c.map((_,p)=>p===d?{..._,...u}:_)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=i(e.fileTabs,t):"id"in t?a.expTabs=i(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?a.codeTabs=i(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=i(e.planTabs,t):t.kind==="side"?a.sideTabs=i(e.sideTabs,t):a.subagentTabs=i(e.subagentTabs,t),e.contentTabOrder.includes(r)||(a.contentTabOrder=[...e.contentTabOrder,r]));const o=e.tabHistory.at(-1);return o&&Ot(o)===r&&JSON.stringify(Ll(o))===JSON.stringify(Ll(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Ot(c)!==r),t]),a}let Po=0;const nm=new Map,hb=new Map,y5=new Set,x5=()=>{for(const e of y5)e()},YCn=e=>(y5.add(e),()=>{y5.delete(e)}),rm=new Map,Fo=new Map,W$=e=>Fo.get(e);function ZCn(){Po++,Fo.clear(),rm.clear(),nm.clear(),hb.clear(),x5()}function JCn(e,n){const t=Fo.get(e);if(!(t!=null&&t.tasks.new)||e_(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=Bo(o);if(typeof c=="string"||!("path"in c))return[];const u=ei(e,null,c);return u in a?[[ei(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,rm.set(e,n),Fo.set(e,{...t,tasks:i})}function e7n(e){let n=nm.get(e);if(!n){const t=Po;n=I$(async(r,s)=>{if(t!==Po)return;const i=await iwn(e,r,s);t===Po&&Ze.setQueryData(FS(e).queryKey,i),t===Po&&hb.delete(e)&&x5()},r=>{t===Po&&(hb.set(e,r instanceof Error?r.message:String(r)),x5())}),nm.set(e,n)}return n}function Dw(e,n,t,r){const s=Fo.get(e);if(!s||t==="new"&&rm.has(e))return;const i=hy(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?e_(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const c={...s,lastLocation:i,lastTaskId:a,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=o&&r&&i===s.lastLocation&&JSON.stringify({...o,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});Fo.set(e,c),e7n(e).queue(c,u?250:0)}function Wj(e,n,t,r){const s=new Set(e.state.fileTabs.map(d=>ei(t,r==="new"?null:r,d))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),o=G$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Ot(Bo(c)):null;return o.active=o.tabs.find(d=>Ot(Bo(d))===u)??null,o}function t7n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:d,revision:_}=e,p=T.useRef(qj()),m=T.useSyncExternalStore(YCn,()=>n?hb.get(n)??null:null),[w,k]=T.useState(null),[v,y]=T.useState(0),[x,b]=T.useState(null),[C,N]=T.useState(null),z=T.useRef(null),A=T.useRef(null),j=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),L=JSON.stringify(s??null),B=T.useCallback(()=>{const H=j.current;if(!H)return;const Q=Wj({...M.current,state:H.state,pane:H.pane},e_(Fo.get(H.projectId),H.taskKey),H.projectId,H.taskKey);Dw(H.projectId,H.location,H.taskKey,Q)},[]);T.useEffect(()=>{let H=!0;const Q=Po;if(k(null),b(null),!!n)return Fo.has(n)?b(n):Ze.fetchQuery(FS(n)).then(K=>{!H||Q!==Po||(Fo.set(n,K??qj()),b(n))}).catch(K=>{H&&Q===Po&&k(K instanceof Error?K.message:String(K))}),()=>{H=!1}},[n,v]),T.useLayoutEffect(()=>{if(j.current&&j.current.scope!==D){const K=j.current.projectId;B(),rm.get(K)===t&&rm.delete(K),j.current=null}if(!n||x!==n)return;const H=Fo.get(n);if(!H)return;if(p.current=H,z.current!==D){if(z.current=D,A.current=L,i){const K=e_(H,t)??(Do(n)?i6(t,a):void 0);c(QCn(K,s),K,!0)}N(D);return}if(C!==D)return;let Q=o;A.current!==L&&(A.current=L,i&&s&&(Q=K$(o,s),c(Q,void 0,!1))),i?(Dw(n,r,t,Wj({state:Q,pane:s,getScroll:u,sourceModes:d},e_(H,t),n,t)),j.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):Dw(n,r),p.current=Fo.get(n)??H},[n,t,r,s,L,i,a,o,c,u,d,_,x,D,C,B]),T.useEffect(()=>{const H=Po,Q=Z=>{if(H===Po){B();for(const ee of nm.values())ee.flush(Z)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[B]);const U=T.useCallback(()=>{var H;n&&(w?y(Q=>Q+1):(H=nm.get(n))==null||H.retry())},[n,w]);return{ready:n===null||x===n&&C===D,loaded:n===null||x===n,error:w??m,retry:U,capture:B,workspace:p}}const n7n="data:image/svg+xml,"+encodeURIComponent(''),w5=T.createContext(null);function r7n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function Q$(){const e=T.useContext(w5);if(!e)throw new Error("Runtime is not connected");return e}function s7n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?n7n:"/favicon.svg")}function Qj(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function i7n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!Qj("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&n$(n),!Qj("orx:locale")&&t&&QD(t)&&JI(t)}function a7n(e){return e.includes("ssh ")&&e.includes("failed")}function Xj({host:e,overlay:n=!1}){return f.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:BL({host:Ae(e)})}),f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:H3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Q5t()})]})})}function Yj({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,L;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(L=s.installPaths)==null?void 0:L.cache]);async function _(){if(i){c(!0);try{await w4n(i)}catch(B){tn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function p(B=!1){r(B?s.error:null),c(!0);try{await k4n()}catch(U){tn(U instanceof Error?U.message:String(U),"error")}finally{c(!1)}}async function m(){c(!0);try{await OI()}catch(B){tn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{d(await DI())}catch(B){tn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await LI(u),d(null)}catch(B){d(null),tn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await S4n()}catch(B){tn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const y=s.status==="applying"||o,x=s.status==="needsInstall",b=s.status==="needsUpdate",C=i&&x,N=["connecting","applying","reconnecting"].includes(s.status),z=s.status==="disconnected"&&s.error!==null&&a7n(s.error)&&t!==s.error&&!s.canStartNewHost,A=x?Ikt():b?M7t():s.status==="applying"?m3t({host:Ae(s.host)}):s.status==="reconnecting"?ZSt({host:Ae(s.host)}):s.status==="disconnected"?s.error?H5t({host:Ae(s.host)}):s.canStartNewHost?lkt({host:Ae(s.host)}):BL({host:Ae(s.host)}):X3t({host:Ae(s.host)}),j=s.error??(s.canStartNewHost?nkt():x?sSt({user:Ae(s.user??""),host:Ae(s.host)}):b?E7t({host:Ae(s.host)}):s.status==="applying"?l3t():s.status==="reconnecting"?GSt():s.status==="disconnected"?j5t():q3t());return f.jsxs(f.Fragment,{children:[f.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:f.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[N&&f.jsx(Ct,{className:"mt-2"}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!z&&f.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),z&&f.jsx(t6,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&f.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[f.jsx("p",{className:"m-0 text-sm text-subtext",children:Akt()}),[["binary",mkt()],["database",kkt()]].map(([B,U])=>f.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[U,f.jsx(qr,{value:i[B],onChange:H=>a({...i,[B]:H.target.value}),disabled:y,dir:"ltr"})]},B)),!s.error&&f.jsx("div",{className:"flex justify-end pt-1",children:f.jsx(Oe,{variant:"primary",disabled:y,onClick:()=>void _(),children:y?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{})," ",Ukt()]}):b?Uz():ZL()})})]}),b&&i&&f.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&f.jsx(Oe,{variant:"primary",disabled:y,onClick:()=>void _(),children:y?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{})," ",P7t()]}):Uz()})}),s.status==="disconnected"&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?f.jsxs(Oe,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?f.jsx(Ct,{}):null,s.error?Hz():g6t()]}):f.jsxs(Oe,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Ct,{}):null,Hz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&f.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:f.jsx(Oe,{disabled:o,onClick:()=>void m(),children:K3()})}),b&&s.error&&f.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[f.jsx(Oe,{disabled:o,onClick:()=>void m(),children:K3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?f.jsx(Ct,{}):null,Fz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[o?f.jsx(Ct,{}):null,PL()]})]}),x&&s.error&&f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsxs(Oe,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?f.jsx(Ct,{}):null,Fz()]})})]})}),u&&f.jsx(x$,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||d(null)},onConfirm:()=>void k()})]})}function o7n({children:e}){const n=T.useRef(null);return T.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),f.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function c7n(){T.useSyncExternalStore(CE,nW),T.useEffect(()=>CE(()=>{WCn(),ZCn()}),[]);const e=oX({select:w=>w.pathname==="/remote-launch"}),[n,t]=T.useState(null),[r,s]=T.useState(null),i=T.useRef(!1),a=T.useRef(!1),o=T.useRef(!1),c=T.useRef(null),[u,d]=T.useState(null),_=ft({...q3n(),enabled:!e,refetchInterval:w=>{var k;return w.state.status==="error"||((k=w.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(T.useEffect(()=>{var v,y;if(e)return;const w=_.data;if(!w){s(((v=_.error)==null?void 0:v.message)??null);return}const k=r7n(w);rW(k),c.current!==null&&c.current!==k&&(i.current=!1,a.current=!1,o.current=!1),c.current=k,w.kind==="ssh"&&(o.current||(o.current=!0,i7n(w)),w.session.status==="connected"?(i.current=!0,a.current=!0,d(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((y=_.error)==null?void 0:y.message)??null)},[e,_.data,_.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";s7n(w),w&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return f.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[f.jsx(Ct,{})," ",RSt()]});if(!n)return f.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:r}),f.jsx(Oe,{onClick:()=>location.reload(),children:Ks()})]}):f.jsx(Ct,{})});if(n.kind==="local")return f.jsxs(w5,{value:n,children:[f.jsx(Sj,{}),f.jsx(Q0,{})]},go()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?f.jsx(Xj,{host:n.session.host}):f.jsx(Yj,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:d});const m=n.session.status!=="connected"||r!==null;return f.jsxs("div",{className:"relative h-full",children:[f.jsx("div",{className:"h-full",inert:m,children:f.jsxs(w5,{value:n,children:[f.jsx(Sj,{}),f.jsx(Q0,{})]},go()[1])}),m&&f.jsx(o7n,{children:r?f.jsx(Xj,{host:n.session.host,overlay:!0}):f.jsx(Yj,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:d})})]})}const gy=UQ()({component:c7n}),a6="orx:demo-read-sessions";function X$(){try{const e=JSON.parse(sessionStorage.getItem(a6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function l7n(e){try{const n=X$();n.add(e),sessionStorage.setItem(a6,JSON.stringify([...n]))}catch{}}function u7n(){try{sessionStorage.removeItem(a6)}catch{}}function Y$(e,n){const t=Mf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function _7n(e=Ze){var a;const[n,t]=await Promise.all([e.fetchQuery(Zm()),e.fetchQuery(Af())]),r=hy((a=q$()??n.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?Z$(t[0].id,e):Promise.resolve("/projects");if(!r)return s();const i=Mf(r.split("?")[0]);return!(i!=null&&i.projectId)||!t.some(o=>o.id===i.projectId)||i.sessionId&&!Y$(r,await e.fetchQuery(pi(i.projectId)))?s():r}async function Z$(e,n=Ze){var d;const[t,r]=await Promise.all([n.fetchQuery(FS(e)),n.fetchQuery(pi(e))]),s=W$(e)??t,i=hy(s==null?void 0:s.lastLocation);if(i&&((d=Mf(i.split("?")[0]))==null?void 0:d.projectId)===e&&Y$(i,r))return i;const a=r.find(_=>!_.archived&&!_.sideParentSessionId),o=Do(e)?i6(a==null?void 0:a.id,!(await n.fetchQuery(Zm())).tourCompleted):void 0,c=e_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return Sv(e,(a==null?void 0:a.id)??null,u)}function vy(){return f.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function Lw(){return f.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[f.jsx(vy,{}),"OpenResearch"]})}const Zj="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function f7n({cmd:e,onRun:n}){const[t,r]=T.useState(!1);return f.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[f.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&f.jsx("button",{type:"button",className:`cmd-inline-run ${Zj}`,onClick:n,"aria-label":dN({value:Ae(e)}),title:dN({value:Ae(e)}),children:f.jsx(iCn,{size:11})}),f.jsx("button",{type:"button",className:`cmd-inline-copy ${Zj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?Cf():TY({value:Ae(e)}),title:t?Cf():AS(),children:t?f.jsx(ti,{size:11,strokeWidth:3}):f.jsx(Wf,{size:11})})]})}function s_(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?f.jsx(f7n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function by(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function Ph({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:f.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?f.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[f.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),f.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),f.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),f.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),f.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?f.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:f.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):f.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function k5(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function d7n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function Jj(e,n){return n||e==="preview"}function h7n(e,n){if(!e||e.needsConfigRepair)return null;const t=k5(e);return t===n?null:t}function J$({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>k5(e)),[c,u]=T.useState(0),[d,_]=T.useState(()=>d7n(e,k5(e))),[p,m]=T.useState(d==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,y]=T.useState(e.needsConfigRepair?e.agentNote??null:null),x=d==="running"||d==="checking",b=n[a].includes(` -`)?void 0:n[a];T.useEffect(()=>{i.current=!1;const N=s.current;return N==null||N.showModal(),()=>{i.current=!0,N==null||N.close()}},[]);const C=async()=>{_("checking"),y(null);try{const N=await jf(!0,!0);if(i.current)return;const z=N.find(A=>A.id===e.id);if(k((z==null?void 0:z.needsConfigRepair)??!1),z!=null&&z.agentReady&&(a!=="login"||z.authenticated))t==null||t(z),_("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(z!=null&&z.installed)&&!z.installBroken&&!z.needsConfigRepair&&z.authState==="needsLogin")o("login"),m(!0),_("running");else{const A=h7n(z,a);A&&(o(A),m(!1)),y((z==null?void 0:z.agentNote)??SL()),_("error")}}catch(N){if(i.current)return;y(N instanceof Error?N.message:String(N)),_("error")}};return f.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:N=>{N.key==="Escape"&&x&&N.preventDefault()},onCancel:N=>{N.preventDefault(),x||r()},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Ph,{harness:e.id,size:26}),f.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:mz({agent:e.name})})]}),d==="preview"?f.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?MQe({agent:e.name}):BXe({agent:e.name})}):b&&Jj(d,p)?f.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:s_(bXe({command:b}))}):null,d!=="running"&&d!=="preview"&&f.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&f.jsx(Ct,{}),d==="success"?dQe({agent:e.name}):d==="error"?wL():aQe()]}),a==="install"&&n.requiresNpm&&f.jsx("p",{className:"text-sm text-subtext",children:fXe()}),Jj(d,p)&&f.jsx(my,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:mz({agent:e.name}),command:b,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{y(N),_("error")}},`${a}-${c}`),v&&f.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:s_(v)}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&f.jsx(Oe,{variant:"ghost",onClick:()=>{y(null),C()},children:eb()}),d==="error"&&!w&&f.jsx(Oe,{onClick:()=>{y(null),m(!0),_("running"),u(N=>N+1)},children:Ks()}),f.jsx(Oe,{variant:d==="success"?"primary":"default",onClick:r,children:d==="success"?mI():x?JWe():Z0()}),d==="preview"&&f.jsx(Oe,{variant:"primary",onClick:()=>{m(!0),_("running")},children:VWe()})]})]})}const p7n={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function sm({variant:e="list",className:n,...t}){return f.jsx("span",{className:$s("title",p7n[e],n),...t})}const eA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Xu=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),Iw=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),eB=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),m7n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),g7n=[{id:"AI/ML",label:C_t},{id:"Biology",label:R_t},{id:"Physics",label:V_t},{id:"Other",label:B_t}],v7n=["welcome","environment","profile"];function b7n({onDone:e,preferredAgent:n,remote:t}){var ot;const r=vn({mutationFn:Ce=>cwn(...Ce)}),[s,i]=T.useState(0);T.useEffect(()=>{const Ce=v7n[s];Ce&&Lu({name:"onboarding_step_viewed",step:Ce})},[s]);const a=ft(r_()),o=ft(O0()),c=ft(GI()),[u,d]=T.useState(null),[_,p]=T.useState(!1),m=T.useRef(null),w=T.useRef(""),k=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var Ce;return(Ce=m.current)==null?void 0:Ce.close()},[]);const y=a.data??null,x=(ot=o.data)==null?void 0:ot.gitVersion,[b,C]=T.useState(!1),[N,z]=T.useState(null),[A,j]=T.useState(""),[M,D]=T.useState(null),[L,B]=T.useState(!1),[U,H]=T.useState([]),[Q,K]=T.useState(""),[Z,ee]=T.useState(""),[$,I]=T.useState([]),[F,q]=T.useState(""),[V,ie]=T.useState([]),[oe,ce]=T.useState(!1),ne=T.useRef(0),[G,ae]=T.useState(!1),[le,ge]=T.useState(!1),be=(y==null?void 0:y.some(Ce=>Ce.agentReady&&!Ce.catalogPending))??!1,Ee=(y==null?void 0:y.some(Ce=>Ce.catalogPending))??!1,Fe=x!=null,Ye=T.useRef(0),Me=(Ce,me=!1)=>{const ze=++Ye.current;B(!0),ae(!1),ge(!1);const He=()=>ze===Ye.current;Promise.allSettled([jf(Ce,me),Ze.fetchQuery({...O0(),staleTime:Ce?0:3e4})]).then(([We,ct])=>{He()&&(We.status==="rejected"&&ae(!0),ct.status==="rejected"&&ge(!0))}).finally(()=>He()&&B(!1))};T.useEffect(()=>Me(!1),[]),T.useEffect(()=>{if(y===null)return;const Ce=y.filter(me=>me.agentReady&&!me.catalogPending);D(me=>{var He;if(me&&Ce.some(We=>We.id===me))return me;const ze=n&&Ce.find(We=>We.id===n.harness);return(ze==null?void 0:ze.id)??((He=Ce[0])==null?void 0:He.id)??null})},[y,n]),T.useEffect(()=>ae(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>ge(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{Ze.fetchQuery(G3n()).then(Ce=>{H(Ce.researchAreas),K(Ce.otherArea??""),ee(Ce.background??""),I(Ce.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const Ce=F.trim();if(Ce.length<3){ie([]),ce(!1);return}const me=++ne.current;ce(!0);const ze=setTimeout(()=>{Ze.fetchQuery(ZI(Ce)).then(He=>me===ne.current&&ie(He)).catch(()=>me===ne.current&&ie([])).finally(()=>me===ne.current&&ce(!1))},350);return()=>clearTimeout(ze)},[F]);const Ue=Ce=>{const me=$.some(ze=>ze.paperId===Ce.paperId);I(ze=>ze.some(He=>He.paperId===Ce.paperId)?ze:[...ze,{paperId:Ce.paperId,title:tA(Ce.title)}]),q(""),ie([]),me||Ze.fetchQuery(d5(Ce.paperId)).then(ze=>{var We;const He=(We=ze.title)==null?void 0:We.trim();He&&I(ct=>ct.map(St=>St.paperId===Ce.paperId?{...St,title:He}:St))}).catch(()=>{})},dt=Ce=>I(me=>me.filter(ze=>ze.paperId!==Ce)),wt=Ce=>{H(me=>me.includes(Ce)?me.filter(ze=>ze!==Ce):[...me,Ce])},Ft=U.length>0&&(!U.includes("Other")||Q.trim().length>0),Ht=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const Ce=(async()=>{await new Promise((He,We)=>{const ct=location.protocol==="https:"?"wss:":"ws:",St=new WebSocket(`${ct}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);St.binaryType="arraybuffer";const Be=new TextDecoder,un=new B$.Terminal;un.onData(_n=>{St.readyState===WebSocket.OPEN&&St.send(new TextEncoder().encode(_n))}),m.current=St;let Vt=!1;St.onmessage=_n=>{if(_n.data instanceof ArrayBuffer){un.write(new Uint8Array(_n.data)),w.current=(w.current+Be.decode(_n.data,{stream:!0})).slice(-65536);return}if(typeof _n.data!="string")return;let Gt;try{Gt=JSON.parse(_n.data)}catch{return}typeof Gt!="object"||Gt===null||!("type"in Gt)||(Gt.type==="complete"?(Vt=!0,St.close(),He()):Gt.type==="error"&&(St.close(),We(new Error("error"in Gt&&typeof Gt.error=="string"?Gt.error:wL()))))},St.onerror=()=>{St.close(),We(new Error(rb()))},St.onclose=()=>{un.dispose(),m.current=null,Vt||We(new Error(rb()))}});const ze=(await jf(!0,!0)).find(He=>He.id==="opencode"&&He.agentReady);if(!ze)throw new Error(Ept());return D("opencode"),ze})();return k.current=Ce,Ce.catch(()=>{}),Ce};T.useEffect(()=>{t||v.current||!(y!=null&&y.length)||y.some(Ce=>Ce.catalogPending)||!y.every(Ce=>!Ce.installed&&!Ce.installBroken)||Ht()},[y,t]),T.useEffect(()=>{s===1&&_&&i(2)},[s,_]);const qt=()=>{i(_?2:1)},$e=async(Ce="complete")=>{var me;if(!(b||Ce==="complete"&&(!Ft||!Fe))){C(!0),z(null),j("");try{const ze=_?await Ht():y==null?void 0:y.find(ct=>ct.id===M&&ct.agentReady&&!ct.catalogPending);if(!ze)throw new Error(SL());if(Ce==="setup")return;const He=x7n(ze,((me=ze.models[0])==null?void 0:me.id)??null),We=await r.mutateAsync([He,{researchAreas:U,otherArea:U.includes("Other")?Q:null,background:Z||null,papers:$}]);e(We.project,We.selection)}catch(ze){_&&(k.current=null);const He=ze instanceof Error?ze.message:String(ze);z(He),j([w.current,He].filter(Boolean).join(` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(j){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),y.isLinux&&j&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(j){const M=this._getMouseBufferCoords(j),D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(D&&L&&M)&&this._areCoordsInSelection(M,D,L)}isCellInSelection(j,M){const D=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!D||!L)&&this._areCoordsInSelection([j,M],D,L)}_areCoordsInSelection(j,M,D){return j[1]>M[1]&&j[1]=M[0]&&j[0]=M[0]}_selectWordAtCursor(j,M){var B,U;const D=(U=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:U.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const L=this._getMouseBufferCoords(j);return!!L&&(this._selectWordAt(L,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(j,M){this._model.clearSelection(),j=Math.max(j,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,j],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(j){this._model.handleTrim(j)&&this.refresh()}_getMouseBufferCoords(j){const M=this._mouseService.getCoords(j,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(j){let M=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,j,this._screenElement)[1];const D=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=D?0:(M>D&&(M-=D),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(j){return y.isMac?j.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:j.shiftKey}handleMouseDown(j){if(this._mouseDownTimeStamp=j.timeStamp,(j.button!==2||!this.hasSelection)&&j.button===0){if(!this._enabled){if(!this.shouldForceSelection(j))return;j.stopPropagation()}j.preventDefault(),this._dragScrollAmount=0,this._enabled&&j.shiftKey?this._handleIncrementalClick(j):j.detail===1?this._handleSingleClick(j):j.detail===2?this._handleDoubleClick(j):j.detail===3&&this._handleTripleClick(j),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(j){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(j))}_handleSingleClick(j){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(j)?3:0,this._model.selectionStart=this._getMouseBufferCoords(j),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(j){this._selectWordAtCursor(j,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(j){const M=this._getMouseBufferCoords(j);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(j){return j.altKey&&!(y.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(j){if(j.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(j),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const D=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(j.ydisp+this._bufferService.rows,j.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=j.ydisp),this.refresh()}}_handleMouseUp(j){const M=j.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&j.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(j,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const L=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(L,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const j=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!j||!M||j[0]===M[0]&&j[1]===M[1]);D?j&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&j[0]===this._oldSelectionStart[0]&&j[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(j,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(j,M,D)}_fireOnSelectionChange(j,M,D){this._oldSelectionStart=j,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(j){this.clearSelection(),this._trimListener.dispose(),this._trimListener=j.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(j,M){let D=M;for(let L=0;M>=L;L++){const B=j.loadCell(L,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:B>1&&M!==L&&(D+=B-1)}return D}setSelection(j,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[j,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(j){this._isClickInSelection(j)||(this._selectWordAtCursor(j,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(j,M,D=!0,L=!0){if(j[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,U=B.lines.get(j[1]);if(!U)return;const H=B.translateBufferLineToString(j[1],!1);let Q=this._convertViewportColToCharacterIndex(U,j[0]),K=Q;const Z=j[0]-Q;let ee=0,$=0,I=0,F=0;if(H.charAt(Q)===" "){for(;Q>0&&H.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ce-1,K+=ce-1);ie>0&&Q>0&&!this._isCharWordSeparator(U.loadCell(ie-1,this._workCell));){U.loadCell(ie-1,this._workCell);const ne=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,ie--):ne>1&&(I+=ne-1,Q-=ne-1),Q--,ie--}for(;oe1&&(F+=ne-1,K+=ne-1),K++,oe++}}K++;let q=Q+Z-ee+I,V=Math.min(this._bufferService.cols,K-Q+ee+$-I-F);if(M||H.slice(Q,K).trim()!==""){if(D&&q===0&&U.getCodePoint(0)!==32){const ie=B.lines.get(j[1]-1);if(ie&&U.isWrapped&&ie.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,j[1]-1],!1,!0,!1);if(oe){const ce=this._bufferService.cols-oe.start;q-=ce,V+=ce}}}if(L&&q+V===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ie=B.lines.get(j[1]+1);if(ie!=null&&ie.isWrapped&&ie.getCodePoint(0)!==32){const oe=this._getWordAt([0,j[1]+1],!1,!1,!0);oe&&(V+=oe.length)}}return{start:q,length:V}}}_selectWordAt(j,M){const D=this._getWordAt(j,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,j[1]--;this._model.selectionStart=[D.start,j[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(j){const M=this._getWordAt(j,!0);if(M){let D=j[1];for(;M.start<0;)M.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,D]}}_isCharWordSeparator(j){return j.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(j.getChars())>=0}_selectLineAt(j){const M=this._bufferService.buffer.getWrappedRangeForLine(j),D={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=A=u([d(3,C.IBufferService),d(4,C.ICoreService),d(5,w.IMouseService),d(6,C.IOptionsService),d(7,w.IRenderService),d(8,w.ICoreBrowserService)],A)},4725:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=c(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService"),o.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,o,c){var u=this&&this.__decorate||function(A,j,M,D){var L,B=arguments.length,U=B<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(A,j,M,D);else for(var H=A.length-1;H>=0;H--)(L=A[H])&&(U=(B<3?L(U):B>3?L(j,M,U):L(j,M))||U);return B>3&&U&&Object.defineProperty(j,M,U),U},d=this&&this.__param||function(A,j){return function(M,D){j(M,D,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),p=c(8055),m=c(8460),w=c(844),k=c(2585),v=p.css.toColor("#ffffff"),y=p.css.toColor("#000000"),x=p.css.toColor("#ffffff"),b=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const A=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],j=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=j[M/36%6|0],L=j[M/6%6|0],B=j[M%6];A.push({css:p.channels.toCss(D,L,B),rgba:p.channels.toRgba(D,L,B)})}for(let M=0;M<24;M++){const D=8+10*M;A.push({css:p.channels.toCss(D,D,D),rgba:p.channels.toRgba(D,D,D)})}return A})());let N=o.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(A){super(),this._optionsService=A,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:v,background:y,cursor:x,cursorAccent:b,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(y,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(y,C),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(A={}){const j=this._colors;if(j.foreground=z(A.foreground,v),j.background=z(A.background,y),j.cursor=z(A.cursor,x),j.cursorAccent=z(A.cursorAccent,b),j.selectionBackgroundTransparent=z(A.selectionBackground,C),j.selectionBackgroundOpaque=p.color.blend(j.background,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundTransparent=z(A.selectionInactiveBackground,j.selectionBackgroundTransparent),j.selectionInactiveBackgroundOpaque=p.color.blend(j.background,j.selectionInactiveBackgroundTransparent),j.selectionForeground=A.selectionForeground?z(A.selectionForeground,p.NULL_COLOR):void 0,j.selectionForeground===p.NULL_COLOR&&(j.selectionForeground=void 0),p.color.isOpaque(j.selectionBackgroundTransparent)&&(j.selectionBackgroundTransparent=p.color.opacity(j.selectionBackgroundTransparent,.3)),p.color.isOpaque(j.selectionInactiveBackgroundTransparent)&&(j.selectionInactiveBackgroundTransparent=p.color.opacity(j.selectionInactiveBackgroundTransparent,.3)),j.ansi=o.DEFAULT_ANSI_COLORS.slice(),j.ansi[0]=z(A.black,o.DEFAULT_ANSI_COLORS[0]),j.ansi[1]=z(A.red,o.DEFAULT_ANSI_COLORS[1]),j.ansi[2]=z(A.green,o.DEFAULT_ANSI_COLORS[2]),j.ansi[3]=z(A.yellow,o.DEFAULT_ANSI_COLORS[3]),j.ansi[4]=z(A.blue,o.DEFAULT_ANSI_COLORS[4]),j.ansi[5]=z(A.magenta,o.DEFAULT_ANSI_COLORS[5]),j.ansi[6]=z(A.cyan,o.DEFAULT_ANSI_COLORS[6]),j.ansi[7]=z(A.white,o.DEFAULT_ANSI_COLORS[7]),j.ansi[8]=z(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),j.ansi[9]=z(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),j.ansi[10]=z(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),j.ansi[11]=z(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),j.ansi[12]=z(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),j.ansi[13]=z(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),j.ansi[14]=z(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),j.ansi[15]=z(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(j.ansi.length-16,A.extendedAnsi.length);for(let D=0;D{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=c(8460),d=c(844);class f extends d.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const w=new Array(m);for(let k=0;kthis._length)for(let w=this._length;w=m;v--)this._array[this._getCyclicIndex(v+k.length)]=this._array[this._getCyclicIndex(v)];for(let v=0;vthis._maxLength){const v=this._length+k.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=k.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,w,k){if(!(w<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let y=w-1;y>=0;y--)this.set(m+y+k,this.get(m+y));const v=m+w+k-this._length;if(v>0)for(this._length+=v;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let v=0;v{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(u,d=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=d<=1?u[p]:u[p]&&c(u[p],d-1);return f}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let c=0,u=0,d=0,f=0;var p,m,w,k,v;function y(b){const C=b.toString(16);return C.length<2?"0"+C:C}function x(b,C){return b>>0},b.toColor=function(C,N,z,A){return{css:b.toCss(C,N,z,A),rgba:b.toRgba(C,N,z,A)}}})(p||(o.channels=p={})),(function(b){function C(N,z){return f=Math.round(255*z),[c,u,d]=v.toChannels(N.rgba),{css:p.toCss(c,u,d,f),rgba:p.toRgba(c,u,d,f)}}b.blend=function(N,z){if(f=(255&z.rgba)/255,f===1)return{css:z.css,rgba:z.rgba};const A=z.rgba>>24&255,j=z.rgba>>16&255,M=z.rgba>>8&255,D=N.rgba>>24&255,L=N.rgba>>16&255,B=N.rgba>>8&255;return c=D+Math.round((A-D)*f),u=L+Math.round((j-L)*f),d=B+Math.round((M-B)*f),{css:p.toCss(c,u,d),rgba:p.toRgba(c,u,d)}},b.isOpaque=function(N){return(255&N.rgba)==255},b.ensureContrastRatio=function(N,z,A){const j=v.ensureContrastRatio(N.rgba,z.rgba,A);if(j)return p.toColor(j>>24&255,j>>16&255,j>>8&255)},b.opaque=function(N){const z=(255|N.rgba)>>>0;return[c,u,d]=v.toChannels(z),{css:p.toCss(c,u,d),rgba:z}},b.opacity=C,b.multiplyOpacity=function(N,z){return f=255&N.rgba,C(N,f*z/255)},b.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(b){let C,N;try{const z=document.createElement("canvas");z.width=1,z.height=1;const A=z.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}b.toColor=function(z){if(z.match(/#[\da-f]{3,8}/i))switch(z.length){case 4:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),d=parseInt(z.slice(3,4).repeat(2),16),p.toColor(c,u,d);case 5:return c=parseInt(z.slice(1,2).repeat(2),16),u=parseInt(z.slice(2,3).repeat(2),16),d=parseInt(z.slice(3,4).repeat(2),16),f=parseInt(z.slice(4,5).repeat(2),16),p.toColor(c,u,d,f);case 7:return{css:z,rgba:(parseInt(z.slice(1),16)<<8|255)>>>0};case 9:return{css:z,rgba:parseInt(z.slice(1),16)>>>0}}const A=z.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(A)return c=parseInt(A[1]),u=parseInt(A[2]),d=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,d,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=z,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,d,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,d,f),css:z}}})(w||(o.css=w={})),(function(b){function C(N,z,A){const j=N/255,M=z/255,D=A/255;return .2126*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))}b.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},b.relativeLuminance2=C})(k||(o.rgb=k={})),(function(b){function C(z,A,j){const M=z>>24&255,D=z>>16&255,L=z>>8&255;let B=A>>24&255,U=A>>16&255,H=A>>8&255,Q=x(k.relativeLuminance2(B,U,H),k.relativeLuminance2(M,D,L));for(;Q0||U>0||H>0);)B-=Math.max(0,Math.ceil(.1*B)),U-=Math.max(0,Math.ceil(.1*U)),H-=Math.max(0,Math.ceil(.1*H)),Q=x(k.relativeLuminance2(B,U,H),k.relativeLuminance2(M,D,L));return(B<<24|U<<16|H<<8|255)>>>0}function N(z,A,j){const M=z>>24&255,D=z>>16&255,L=z>>8&255;let B=A>>24&255,U=A>>16&255,H=A>>8&255,Q=x(k.relativeLuminance2(B,U,H),k.relativeLuminance2(M,D,L));for(;Q>>0}b.blend=function(z,A){if(f=(255&A)/255,f===1)return A;const j=A>>24&255,M=A>>16&255,D=A>>8&255,L=z>>24&255,B=z>>16&255,U=z>>8&255;return c=L+Math.round((j-L)*f),u=B+Math.round((M-B)*f),d=U+Math.round((D-U)*f),p.toRgba(c,u,d)},b.ensureContrastRatio=function(z,A,j){const M=k.relativeLuminance(z>>8),D=k.relativeLuminance(A>>8);if(x(M,D)>8));if(Hx(M,k.relativeLuminance(Q>>8))?U:Q}return U}const L=N(z,A,j),B=x(M,k.relativeLuminance(L>>8));if(Bx(M,k.relativeLuminance(U>>8))?L:U}return L}},b.reduceLuminance=C,b.increaseLuminance=N,b.toChannels=function(z){return[z>>24&255,z>>16&255,z>>8&255,255&z]}})(v||(o.rgba=v={})),o.toPaddedHex=y,o.contrastRatio=x},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),d=c(2585),f=c(4348),p=c(7866),m=c(744),w=c(7302),k=c(6975),v=c(8460),y=c(1753),x=c(1480),b=c(7994),C=c(9282),N=c(5435),z=c(5981),A=c(2660);let j=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((L=>{var B;(B=this._onScrollApi)==null||B.fire(L.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(L){for(const B in L)this.optionsService.options[B]=L[B]}constructor(L){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new v.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new v.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new v.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new w.OptionsService(L)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(y.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(b.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,v.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,v.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,v.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,v.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((B=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((B=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new z.WriteBuffer(((B,U)=>this._inputHandler.parse(B,U)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(L,B){this._writeBuffer.write(L,B)}writeSync(L,B){this._logService.logLevel<=d.LogLevelEnum.WARN&&!j&&(this._logService.warn("writeSync is unreliable and will be removed soon."),j=!0),this._writeBuffer.writeSync(L,B)}input(L,B=!0){this.coreService.triggerDataEvent(L,B)}resize(L,B){isNaN(L)||isNaN(B)||(L=Math.max(L,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(L,B))}scroll(L,B=!1){this._bufferService.scroll(L,B)}scrollLines(L,B,U){this._bufferService.scrollLines(L,B,U)}scrollPages(L){this.scrollLines(L*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(L){const B=L-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(L,B){return this._inputHandler.registerEscHandler(L,B)}registerDcsHandler(L,B){return this._inputHandler.registerDcsHandler(L,B)}registerCsiHandler(L,B){return this._inputHandler.registerCsiHandler(L,B)}registerOscHandler(L,B){return this._inputHandler.registerOscHandler(L,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let L=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?L=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(L=!0),L?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const L=[];L.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of L)B.dispose()}))}}}o.CoreTerminal=M},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(d)))},o.runAndSubscribe=function(c,u){return u(void 0),c((d=>u(d)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(ee,$,I,F){var q,V=arguments.length,ie=V<3?$:F===null?F=Object.getOwnPropertyDescriptor($,I):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ie=Reflect.decorate(ee,$,I,F);else for(var oe=ee.length-1;oe>=0;oe--)(q=ee[oe])&&(ie=(V<3?q(ie):V>3?q($,I,ie):q($,I))||ie);return V>3&&ie&&Object.defineProperty($,I,ie),ie},d=this&&this.__param||function(ee,$){return function(I,F){$(I,F,ee)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const f=c(2584),p=c(7116),m=c(2015),w=c(844),k=c(482),v=c(8437),y=c(8460),x=c(643),b=c(511),C=c(3734),N=c(2585),z=c(1480),A=c(6242),j=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},L=131072;function B(ee,$){if(ee>24)return $.setWinLines||!1;switch(ee){case 1:return!!$.restoreWin;case 2:return!!$.minimizeWin;case 3:return!!$.setWinPosition;case 4:return!!$.setWinSizePixels;case 5:return!!$.raiseWin;case 6:return!!$.lowerWin;case 7:return!!$.refreshWin;case 8:return!!$.setWinSizeChars;case 9:return!!$.maximizeWin;case 10:return!!$.fullscreenWin;case 11:return!!$.getWinState;case 13:return!!$.getWinPosition;case 14:return!!$.getWinSizePixels;case 15:return!!$.getScreenSizePixels;case 16:return!!$.getCellSizePixels;case 18:return!!$.getWinSizeChars;case 19:return!!$.getScreenSizeChars;case 20:return!!$.getIconTitle;case 21:return!!$.getWinTitle;case 22:return!!$.pushTitle;case 23:return!!$.popTitle;case 24:return!!$.setWinLines}return!1}var U;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(o.WindowsOptionsReportType=U={}));let H=0;class Q extends w.Disposable{getAttrData(){return this._curAttrData}constructor($,I,F,q,V,ie,oe,ce,ne=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=I,this._coreService=F,this._logService=q,this._optionsService=V,this._oscLinkService=ie,this._coreMouseService=oe,this._unicodeService=ce,this._parser=ne,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new b.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new y.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new y.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new y.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new y.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new y.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new y.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new y.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new y.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new y.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new y.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new y.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new y.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new y.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((G=>this._activeBuffer=G.activeBuffer))),this._parser.setCsiHandlerFallback(((G,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(G),params:ae.toArray()})})),this._parser.setEscHandlerFallback((G=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(G)})})),this._parser.setExecuteHandlerFallback((G=>{this._logService.debug("Unknown EXECUTE code: ",{code:G})})),this._parser.setOscHandlerFallback(((G,ae,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:G,action:ae,data:le})})),this._parser.setDcsHandlerFallback(((G,ae,le)=>{ae==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(G),action:ae,payload:le})})),this._parser.setPrintHandler(((G,ae,le)=>this.print(G,ae,le))),this._parser.registerCsiHandler({final:"@"},(G=>this.insertChars(G))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(G=>this.scrollLeft(G))),this._parser.registerCsiHandler({final:"A"},(G=>this.cursorUp(G))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(G=>this.scrollRight(G))),this._parser.registerCsiHandler({final:"B"},(G=>this.cursorDown(G))),this._parser.registerCsiHandler({final:"C"},(G=>this.cursorForward(G))),this._parser.registerCsiHandler({final:"D"},(G=>this.cursorBackward(G))),this._parser.registerCsiHandler({final:"E"},(G=>this.cursorNextLine(G))),this._parser.registerCsiHandler({final:"F"},(G=>this.cursorPrecedingLine(G))),this._parser.registerCsiHandler({final:"G"},(G=>this.cursorCharAbsolute(G))),this._parser.registerCsiHandler({final:"H"},(G=>this.cursorPosition(G))),this._parser.registerCsiHandler({final:"I"},(G=>this.cursorForwardTab(G))),this._parser.registerCsiHandler({final:"J"},(G=>this.eraseInDisplay(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(G=>this.eraseInDisplay(G,!0))),this._parser.registerCsiHandler({final:"K"},(G=>this.eraseInLine(G,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(G=>this.eraseInLine(G,!0))),this._parser.registerCsiHandler({final:"L"},(G=>this.insertLines(G))),this._parser.registerCsiHandler({final:"M"},(G=>this.deleteLines(G))),this._parser.registerCsiHandler({final:"P"},(G=>this.deleteChars(G))),this._parser.registerCsiHandler({final:"S"},(G=>this.scrollUp(G))),this._parser.registerCsiHandler({final:"T"},(G=>this.scrollDown(G))),this._parser.registerCsiHandler({final:"X"},(G=>this.eraseChars(G))),this._parser.registerCsiHandler({final:"Z"},(G=>this.cursorBackwardTab(G))),this._parser.registerCsiHandler({final:"`"},(G=>this.charPosAbsolute(G))),this._parser.registerCsiHandler({final:"a"},(G=>this.hPositionRelative(G))),this._parser.registerCsiHandler({final:"b"},(G=>this.repeatPrecedingCharacter(G))),this._parser.registerCsiHandler({final:"c"},(G=>this.sendDeviceAttributesPrimary(G))),this._parser.registerCsiHandler({prefix:">",final:"c"},(G=>this.sendDeviceAttributesSecondary(G))),this._parser.registerCsiHandler({final:"d"},(G=>this.linePosAbsolute(G))),this._parser.registerCsiHandler({final:"e"},(G=>this.vPositionRelative(G))),this._parser.registerCsiHandler({final:"f"},(G=>this.hVPosition(G))),this._parser.registerCsiHandler({final:"g"},(G=>this.tabClear(G))),this._parser.registerCsiHandler({final:"h"},(G=>this.setMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(G=>this.setModePrivate(G))),this._parser.registerCsiHandler({final:"l"},(G=>this.resetMode(G))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(G=>this.resetModePrivate(G))),this._parser.registerCsiHandler({final:"m"},(G=>this.charAttributes(G))),this._parser.registerCsiHandler({final:"n"},(G=>this.deviceStatus(G))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(G=>this.deviceStatusPrivate(G))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(G=>this.softReset(G))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(G=>this.setCursorStyle(G))),this._parser.registerCsiHandler({final:"r"},(G=>this.setScrollRegion(G))),this._parser.registerCsiHandler({final:"s"},(G=>this.saveCursor(G))),this._parser.registerCsiHandler({final:"t"},(G=>this.windowOptions(G))),this._parser.registerCsiHandler({final:"u"},(G=>this.restoreCursor(G))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(G=>this.insertColumns(G))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(G=>this.deleteColumns(G))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(G=>this.selectProtected(G))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(G=>this.requestMode(G,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(G=>this.requestMode(G,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new A.OscHandler((G=>(this.setTitle(G),this.setIconName(G),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((G=>this.setIconName(G)))),this._parser.registerOscHandler(2,new A.OscHandler((G=>this.setTitle(G)))),this._parser.registerOscHandler(4,new A.OscHandler((G=>this.setOrReportIndexedColor(G)))),this._parser.registerOscHandler(8,new A.OscHandler((G=>this.setHyperlink(G)))),this._parser.registerOscHandler(10,new A.OscHandler((G=>this.setOrReportFgColor(G)))),this._parser.registerOscHandler(11,new A.OscHandler((G=>this.setOrReportBgColor(G)))),this._parser.registerOscHandler(12,new A.OscHandler((G=>this.setOrReportCursorColor(G)))),this._parser.registerOscHandler(104,new A.OscHandler((G=>this.restoreIndexedColor(G)))),this._parser.registerOscHandler(110,new A.OscHandler((G=>this.restoreFgColor(G)))),this._parser.registerOscHandler(111,new A.OscHandler((G=>this.restoreBgColor(G)))),this._parser.registerOscHandler(112,new A.OscHandler((G=>this.restoreCursorColor(G)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const G in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:G},(()=>this.selectCharset("("+G))),this._parser.registerEscHandler({intermediates:")",final:G},(()=>this.selectCharset(")"+G))),this._parser.registerEscHandler({intermediates:"*",final:G},(()=>this.selectCharset("*"+G))),this._parser.registerEscHandler({intermediates:"+",final:G},(()=>this.selectCharset("+"+G))),this._parser.registerEscHandler({intermediates:"-",final:G},(()=>this.selectCharset("-"+G))),this._parser.registerEscHandler({intermediates:".",final:G},(()=>this.selectCharset("."+G))),this._parser.registerEscHandler({intermediates:"/",final:G},(()=>this.selectCharset("/"+G)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((G=>(this._logService.error("Parsing error: ",G),G))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new j.DcsHandler(((G,ae)=>this.requestStatusString(G,ae))))}_preserveStack($,I,F,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=I,this._parseStack.decodedLength=F,this._parseStack.position=q}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((I,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((I=>{if(I!=="#SLOW_TIMEOUT")throw I;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,I){let F,q=this._activeBuffer.x,V=this._activeBuffer.y,ie=0;const oe=this._parseStack.paused;if(oe){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,I))return this._logSlowResolvingAsync(F),F;q=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>L&&(ie=this._parseStack.position+L)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(G=>String.fromCharCode(G))).join("")}"`),typeof $=="string"?$.split("").map((G=>G.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthL)for(let G=ie;G<$.length;G+=L){const ae=G+L<$.length?G+L:$.length,le=typeof $=="string"?this._stringDecoder.decode($.substring(G,ae),this._parseBuffer):this._utf8Decoder.decode($.subarray(G,ae),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,le))return this._preserveStack(q,V,le,G),this._logSlowResolvingAsync(F),F}else if(!oe){const G=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,G))return this._preserveStack(q,V,G,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===q&&this._activeBuffer.y===V||this._onCursorMove.fire();const ce=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ne=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ne0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let me=this._parser.precedingJoinState;for(let ve=I;vece){if(ne){const Oe=le;let He=this._activeBuffer.x-We;for(this._activeBuffer.x=We,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),We>0&&le instanceof v.BufferLine&&le.copyCellsFrom(Oe,He,0,We,!1);He=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(G&&(le.insertCells(this._activeBuffer.x,V-We,this._activeBuffer.getNullCell(ae)),le.getWidth(ce-1)===2&&le.setCellFromCodepoint(ce-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,ae)),le.setCellFromCodepoint(this._activeBuffer.x++,q,V,ae),V>0)for(;--V;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=me,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,I){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,I):this._parser.registerCsiHandler($,(F=>!B(F.params[0],this._optionsService.rawOptions.windowOptions)||I(F)))}registerDcsHandler($,I){return this._parser.registerDcsHandler($,new j.DcsHandler(I))}registerEscHandler($,I){return this._parser.registerEscHandler($,I)}registerOscHandler($,I){return this._parser.registerOscHandler($,new A.OscHandler(I))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var $;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&$.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);I.hasWidth(this._activeBuffer.x)&&!I.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor($=this._bufferService.cols-1){this._activeBuffer.x=Math.min($,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor($,I){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+I):(this._activeBuffer.x=$,this._activeBuffer.y=I),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,I){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+I)}cursorUp($){const I=this._activeBuffer.y-this._activeBuffer.scrollTop;return I>=0?this._moveCursor(0,-Math.min(I,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const I=this._activeBuffer.scrollBottom-this._activeBuffer.y;return I>=0?this._moveCursor(0,Math.min(I,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0}cursorForward($){return this._moveCursor($.params[0]||1,0),!0}cursorBackward($){return this._moveCursor(-($.params[0]||1),0),!0}cursorNextLine($){return this.cursorDown($),this._activeBuffer.x=0,!0}cursorPrecedingLine($){return this.cursorUp($),this._activeBuffer.x=0,!0}cursorCharAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0}charPosAbsolute($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative($){return this._moveCursor($.params[0]||1,0),!0}linePosAbsolute($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0}vPositionRelative($){return this._moveCursor(0,$.params[0]||1),!0}hVPosition($){return this.cursorPosition($),!0}tabClear($){const I=$.params[0];return I===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:I===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let I=$.params[0]||1;for(;I--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let I=$.params[0]||1;for(;I--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const I=$.params[0];return I===1&&(this._curAttrData.bg|=536870912),I!==2&&I!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,I,F,q=!1,V=!1){const ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ie.replaceCells(I,F,this._activeBuffer.getNullCell(this._eraseAttrData()),V),q&&(ie.isWrapped=!1)}_resetBufferLine($,I=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),I),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),F.isWrapped=!1)}eraseInDisplay($,I=!1){let F;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(F=this._activeBuffer.y,this._dirtyRowTracker.markDirty(F),this._eraseInBufferLine(F++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,I);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,I);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,I);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine($,I=!1){switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,I);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,I);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,I)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let I=$.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let ne=ce;for(let G=1;G0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is($){return(this._optionsService.rawOptions.termName+"").indexOf($)===0}setMode($){for(let I=0;I<$.length;I++)switch($.params[I]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let I=0;I<$.length;I++)switch($.params[I]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode($){for(let I=0;I<$.length;I++)switch($.params[I]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let I=0;I<$.length;I++)switch($.params[I]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[I]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode($,I){const F=this._coreService.decPrivateModes,{activeProtocol:q,activeEncoding:V}=this._coreMouseService,ie=this._coreService,{buffers:oe,cols:ce}=this._bufferService,{active:ne,alt:G}=oe,ae=this._optionsService.rawOptions,le=Fe=>Fe?1:2,me=$.params[0];return ve=me,Ee=I?me===2?4:me===4?le(ie.modes.insertMode):me===12?3:me===20?le(ae.convertEol):0:me===1?le(F.applicationCursorKeys):me===3?ae.windowOptions.setWinLines?ce===80?2:ce===132?1:0:0:me===6?le(F.origin):me===7?le(F.wraparound):me===8?3:me===9?le(q==="X10"):me===12?le(ae.cursorBlink):me===25?le(!ie.isCursorHidden):me===45?le(F.reverseWraparound):me===66?le(F.applicationKeypad):me===67?4:me===1e3?le(q==="VT200"):me===1002?le(q==="DRAG"):me===1003?le(q==="ANY"):me===1004?le(F.sendFocus):me===1005?4:me===1006?le(V==="SGR"):me===1015?4:me===1016?le(V==="SGR_PIXELS"):me===1048?1:me===47||me===1047||me===1049?le(ne===G):me===2004?le(F.bracketedPasteMode):0,ie.triggerDataEvent(`${f.C0.ESC}[${I?"":"?"}${ve};${Ee}$y`),!0;var ve,Ee}_updateAttrColor($,I,F,q,V){return I===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([F,q,V])):I===5&&($&=-50331904,$|=33554432|255&F),$}_extractColor($,I,F){const q=[0,0,-1,0,0,0];let V=0,ie=0;do{if(q[ie+V]=$.params[I+ie],$.hasSubParams(I+ie)){const oe=$.getSubParams(I+ie);let ce=0;do q[1]===5&&(V=1),q[ie+ce+1+V]=oe[ce];while(++ce=2||q[1]===2&&ie+V>=5)break;q[1]&&(V=1)}while(++ie+I<$.length&&ie+V5)&&($=1),I.extended.underlineStyle=$,I.fg|=268435456,$===0&&(I.fg&=-268435457),I.updateExtended()}_processSGR0($){$.fg=v.DEFAULT_ATTR_DATA.fg,$.bg=v.DEFAULT_ATTR_DATA.bg,$.extended=$.extended.clone(),$.extended.underlineStyle=0,$.extended.underlineColor&=-67108864,$.updateExtended()}charAttributes($){if($.length===1&&$.params[0]===0)return this._processSGR0(this._curAttrData),!0;const I=$.length;let F;const q=this._curAttrData;for(let V=0;V=30&&F<=37?(q.fg&=-50331904,q.fg|=16777216|F-30):F>=40&&F<=47?(q.bg&=-50331904,q.bg|=16777216|F-40):F>=90&&F<=97?(q.fg&=-50331904,q.fg|=16777224|F-90):F>=100&&F<=107?(q.bg&=-50331904,q.bg|=16777224|F-100):F===0?this._processSGR0(q):F===1?q.fg|=134217728:F===3?q.bg|=67108864:F===4?(q.fg|=268435456,this._processUnderline($.hasSubParams(V)?$.getSubParams(V)[0]:1,q)):F===5?q.fg|=536870912:F===7?q.fg|=67108864:F===8?q.fg|=1073741824:F===9?q.fg|=2147483648:F===2?q.bg|=134217728:F===21?this._processUnderline(2,q):F===22?(q.fg&=-134217729,q.bg&=-134217729):F===23?q.bg&=-67108865:F===24?(q.fg&=-268435457,this._processUnderline(0,q)):F===25?q.fg&=-536870913:F===27?q.fg&=-67108865:F===28?q.fg&=-1073741825:F===29?q.fg&=2147483647:F===39?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?V+=this._extractColor($,V,q):F===53?q.bg|=1073741824:F===55?q.bg&=-1073741825:F===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):F===100?(q.fg&=-67108864,q.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",F);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const I=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${I};${F}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const I=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${I};${F}R`)}return!0}softReset($){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle($){const I=$.params[0]||1;switch(I){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const F=I%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion($){const I=$.params[0]||1;let F;return($.length<2||(F=$.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>I&&(this._activeBuffer.scrollTop=I-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const I=$.length>1?$.params[1]:0;switch($.params[0]){case 14:I!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:I!==0&&I!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),I!==0&&I!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:I!==0&&I!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),I!==0&&I!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor($){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor($){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle($){return this._windowTitle=$,this._onTitleChange.fire($),!0}setIconName($){return this._iconName=$,!0}setOrReportIndexedColor($){const I=[],F=$.split(";");for(;F.length>1;){const q=F.shift(),V=F.shift();if(/^\d+$/.exec(q)){const ie=parseInt(q);if(Z(ie))if(V==="?")I.push({type:0,index:ie});else{const oe=(0,M.parseColor)(V);oe&&I.push({type:1,index:ie,color:oe})}}}return I.length&&this._onColor.fire(I),!0}setHyperlink($){const I=$.split(";");return!(I.length<2)&&(I[1]?this._createHyperlink(I[0],I[1]):!I[0]&&this._finishHyperlink())}_createHyperlink($,I){this._getCurrentLinkId()&&this._finishHyperlink();const F=$.split(":");let q;const V=F.findIndex((ie=>ie.startsWith("id=")));return V!==-1&&(q=F[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:I}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,I){const F=$.split(";");for(let q=0;q=this._specialColors.length);++q,++I)if(F[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[I]}]);else{const V=(0,M.parseColor)(F[q]);V&&this._onColor.fire([{type:1,index:this._specialColors[I],color:V}])}return!0}setOrReportFgColor($){return this._setOrReportSpecialColor($,0)}setOrReportBgColor($){return this._setOrReportSpecialColor($,1)}setOrReportCursorColor($){return this._setOrReportSpecialColor($,2)}restoreIndexedColor($){if(!$)return this._onColor.fire([{type:2}]),!0;const I=[],F=$.split(";");for(let q=0;q=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=v.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=v.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel($){return this._charsetService.setgLevel($),!0}screenAlignmentPattern(){const $=new b.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let I=0;I(this._coreService.triggerDataEvent(`${f.C0.ESC}${V}${f.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${F.scrollTop+1};${F.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,I){this._dirtyRowTracker.markRangeDirty($,I)}}o.InputHandler=Q;let K=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){eethis.end&&(this.end=ee)}markRangeDirty(ee,$){ee>$&&(H=ee,ee=$,$=H),eethis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(ee){return 0<=ee&&ee<256}K=u([d(0,N.IBufferService)],K)},844:(a,o)=>{function c(u){for(const d of u)d.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const d=this._disposables.indexOf(u);d!==-1&&this._disposables.splice(d,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var d;this._isDisposed||u===this._value||((d=this._value)==null||d.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=c,o.getDisposeArrayDisposable=function(u){return{dispose:()=>c(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,f,p){this._data[d]||(this._data[d]={}),this._data[d][f]=p}get(d,f){return this._data[d]?this._data[d][f]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,d,f,p,m){this._data.get(u,d)||this._data.set(u,d,new c),this._data.get(u,d).set(f,p,m)}get(u,d,f,p){var m;return(m=this._data.get(u,d))==null?void 0:m.get(f,p)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const c=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(c=this._search(this._getKey(u)),this._array.splice(c,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const d=this._getKey(u);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===u)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===u))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===u))do d(this._array[c]);while(++c=d;){let p=d+f>>1;const m=this._getKey(this._array[p]);if(m>u)f=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}d=p+1}}return d}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._iy)return v-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-w))}ms`),void this._start();v=y}this.clear()}}class f extends d{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const w=Date.now()+m;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}o.PriorityTaskQueue=f,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:f,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=c(643);o.updateWindowsModeWrappedState=function(d){const f=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),p=f==null?void 0:f.get(d.cols-1),m=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new c;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=c;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,p=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=c(6349),d=c(7226),f=c(3734),p=c(8437),m=c(4634),w=c(511),k=c(643),v=c(4863),y=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(x,b,C){this._hasScrollback=x,this._optionsService=b,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=y.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,b){return new p.BufferLine(this._bufferService.cols,this.getNullCell(x),b)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:b}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=p.DEFAULT_ATTR_DATA);let b=this._rows;for(;b--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,b){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const z=this._getCorrectBufferLength(b);if(z>this.lines.maxLength&&(this.lines.maxLength=z),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+A+1?(this.ybase--,A++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(x,C)));else for(let j=this._rows;j>b;j--)this.lines.length>b+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(z0&&(this.lines.trimStart(j),this.ybase=Math.max(this.ybase-j,0),this.ydisp=Math.max(this.ydisp-j,0),this.savedY=Math.max(this.savedY-j,0)),this.lines.maxLength=z}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,b-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(x,b),this._cols>x))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let b=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,b){this._cols!==x&&(x>this._cols?this._reflowLarger(x,b):this._reflowSmaller(x,b))}_reflowLarger(x,b){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const N=(0,m.reflowLargerCreateNewLayout)(this.lines,C);(0,m.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(x,b,N.countRemoved)}}_reflowLargerAdjustViewport(x,b,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let z=C;for(;z-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let j=this.lines.get(A);if(!j||!j.isWrapped&&j.getTrimmedLength()<=x)continue;const M=[j];for(;j.isWrapped&&A>0;)j=this.lines.get(--A),M.unshift(j);const D=this.ybase+this.y;if(D>=A&&D0&&(N.push({start:A+M.length+z,newLines:Q}),z+=Q.length),M.push(...Q);let K=B.length-1,Z=B[K];Z===0&&(K--,Z=B[K]);let ee=M.length-U-1,$=L;for(;ee>=0;){const F=Math.min($,Z);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[ee],$-F,Z-F,F,!0),Z-=F,Z===0&&(K--,Z=B[K]),$-=F,$===0){ee--;const q=Math.max(ee,0);$=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],j=[];for(let K=0;K=0;K--)if(B&&B.start>D+U){for(let Z=B.newLines.length-1;Z>=0;Z--)this.lines.set(K--,B.newLines[Z]);K++,A.push({index:D+1,amount:B.newLines.length}),U+=B.newLines.length,B=N[++L]}else this.lines.set(K,j[D--]);let H=0;for(let K=A.length-1;K>=0;K--)A[K].index+=H,this.lines.onInsertEmitter.fire(A[K]),H+=A[K].amount;const Q=Math.max(0,M+z-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(x,b,C=0,N){const z=this.lines.get(x);return z?z.translateToString(b,C,N):""}getWrappedRangeForLine(x){let b=x,C=x;for(;b>0&&this.lines.get(b).isWrapped;)b--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let b=0;b{b.line-=C,b.line<0&&b.dispose()}))),b.register(this.lines.onInsert((C=>{b.line>=C.index&&(b.line+=C.amount)}))),b.register(this.lines.onDelete((C=>{b.line>=C.index&&b.lineC.index&&(b.line-=C.amount)}))),b.register(b.onDispose((()=>this._removeMarker(b)))),b}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),d=c(511),f=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class w{constructor(v,y,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const b=y||d.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&y?this._combined[v].charCodeAt(this._combined[v].length-1):x]}set(v,y){this._data[3*v+1]=y[f.CHAR_DATA_ATTR_INDEX],y[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=y[1],this._data[3*v+0]=2097152|v|y[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=y[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(v){return this._data[3*v+0]>>22}hasWidth(v){return 12582912&this._data[3*v+0]}getFg(v){return this._data[3*v+1]}getBg(v){return this._data[3*v+2]}hasContent(v){return 4194303&this._data[3*v+0]}getCodePoint(v){const y=this._data[3*v+0];return 2097152&y?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&y}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const y=this._data[3*v+0];return 2097152&y?this._combined[v]:2097151&y?(0,p.stringFromCodePoint)(2097151&y):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,y){return m=3*v,y.content=this._data[m+0],y.fg=this._data[m+1],y.bg=this._data[m+2],2097152&y.content&&(y.combinedData=this._combined[v]),268435456&y.bg&&(y.extended=this._extendedAttrs[v]),y}setCell(v,y){2097152&y.content&&(this._combined[v]=y.combinedData),268435456&y.bg&&(this._extendedAttrs[v]=y.extended),this._data[3*v+0]=y.content,this._data[3*v+1]=y.fg,this._data[3*v+2]=y.bg}setCellFromCodepoint(v,y,x,b){268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=y|x<<22,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}addCodepointToCell(v,y,x){let b=this._data[3*v+0];2097152&b?this._combined[v]+=(0,p.stringFromCodePoint)(y):2097151&b?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&b)+(0,p.stringFromCodePoint)(y),b&=-2097152,b|=2097152):b=y|4194304,x&&(b&=-12582913,b|=x<<22),this._data[3*v+0]=b}insertCells(v,y,x){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,x),y=0;--C)this.setCell(v+y+C,this.loadCell(v+C,b));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const b=new Uint32Array(x);b.set(this._data),this._data=b}for(let b=this.length;b=v&&delete this._combined[z]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[z]}}return this.length=v,4*x*2=0;--v)if(4194303&this._data[3*v+0])return v+(this._data[3*v+0]>>22);return 0}getNoBgTrimmedLength(){for(let v=this.length-1;v>=0;--v)if(4194303&this._data[3*v+0]||50331648&this._data[3*v+2])return v+(this._data[3*v+0]>>22);return 0}copyCellsFrom(v,y,x,b,C){const N=v._data;if(C)for(let A=b-1;A>=0;A--){for(let j=0;j<3;j++)this._data[3*(x+A)+j]=N[3*(y+A)+j];268435456&N[3*(y+A)+2]&&(this._extendedAttrs[x+A]=v._extendedAttrs[y+A])}else for(let A=0;A=y&&(this._combined[j-y+x]=v._combined[j])}}translateToString(v,y,x,b){y=y??0,x=x??this.length,v&&(x=Math.min(x,this.getTrimmedLength())),b&&(b.length=0);let C="";for(;y>22||1}return b&&b.push(y),C}}o.BufferLine=w},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,u){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return u*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(a,o)=>{function c(u,d,f){if(d===u.length-1)return u[d].getTrimmedLength();const p=!u[d].hasContent(f-1)&&u[d].getWidth(f-1)===1,m=u[d+1].getWidth(0)===2;return p&&m?f-1:f}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,d,f,p,m){const w=[];for(let k=0;k=k&&p0&&(j>b||x[j].getTrimmedLength()===0);j--)A++;A>0&&(w.push(k+x.length-A),w.push(A)),k+=x.length-1}return w},o.reflowLargerCreateNewLayout=function(u,d){const f=[];let p=0,m=d[p],w=0;for(let k=0;kc(u,x,d))).reduce(((y,x)=>y+x));let w=0,k=0,v=0;for(;vy&&(w-=y,k++);const x=u[k].getWidth(w-1)===2;x&&w--;const b=x?f-1:f;p.push(b),v+=b}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),d=c(844),f=c(9092);class p extends d.Disposable{constructor(w,k){super(),this._optionsService=w,this._bufferService=k,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(w,k){this._normal.resize(w,k),this._alt.resize(w,k),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}o.BufferSet=p},511:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=c(482),d=c(643),f=c(3734);class p extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const k=new p;return k.setFromCharData(w),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(w[d.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(w[d.CHAR_DATA_CHAR_INDEX].length===2){const v=w[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const y=w[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=y&&y<=57343?this.content=1024*(v-55296)+y-56320+65536|w[d.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=w[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[d.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=w[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=c(8460),d=c(844);class f{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=f,f._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var c,u,d;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=` +`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(c||(o.C0=c={})),(function(f){f.PAD="€",f.HOP="",f.BPH="‚",f.NBH="ƒ",f.IND="„",f.NEL="…",f.SSA="†",f.ESA="‡",f.HTS="ˆ",f.HTJ="‰",f.VTS="Š",f.PLD="‹",f.PLU="Œ",f.RI="",f.SS2="Ž",f.SS3="",f.DCS="",f.PU1="‘",f.PU2="’",f.STS="“",f.CCH="”",f.MW="•",f.SPA="–",f.EPA="—",f.SOS="˜",f.SGCI="™",f.SCI="š",f.CSI="›",f.ST="œ",f.OSC="",f.PM="ž",f.APC="Ÿ"})(u||(o.C1=u={})),(function(f){f.ST=`${c.ESC}\\`})(d||(o.C1_ESCAPED=d={}))},7399:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(f,p,m,w){const k={type:0,cancel:!1,key:void 0},v=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:k.key=f.ctrlKey?"\b":u.C0.DEL,f.altKey&&(k.key=u.C0.ESC+k.key);break;case 9:if(f.shiftKey){k.key=u.C0.ESC+"[Z";break}k.key=u.C0.HT,k.cancel=!0;break;case 13:k.key=f.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,k.cancel=!0;break;case 27:k.key=u.C0.ESC,f.altKey&&(k.key=u.C0.ESC+u.C0.ESC),k.cancel=!0;break;case 37:if(f.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"D",k.key===u.C0.ESC+"[1;3D"&&(k.key=u.C0.ESC+(m?"b":"[1;5D"))):k.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(f.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"C",k.key===u.C0.ESC+"[1;3C"&&(k.key=u.C0.ESC+(m?"f":"[1;5C"))):k.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(f.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"A",m||k.key!==u.C0.ESC+"[1;3A"||(k.key=u.C0.ESC+"[1;5A")):k.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(f.metaKey)break;v?(k.key=u.C0.ESC+"[1;"+(v+1)+"B",m||k.key!==u.C0.ESC+"[1;3B"||(k.key=u.C0.ESC+"[1;5B")):k.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(k.key=u.C0.ESC+"[2~");break;case 46:k.key=v?u.C0.ESC+"[3;"+(v+1)+"~":u.C0.ESC+"[3~";break;case 36:k.key=v?u.C0.ESC+"[1;"+(v+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:k.key=v?u.C0.ESC+"[1;"+(v+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:f.shiftKey?k.type=2:f.ctrlKey?k.key=u.C0.ESC+"[5;"+(v+1)+"~":k.key=u.C0.ESC+"[5~";break;case 34:f.shiftKey?k.type=3:f.ctrlKey?k.key=u.C0.ESC+"[6;"+(v+1)+"~":k.key=u.C0.ESC+"[6~";break;case 112:k.key=v?u.C0.ESC+"[1;"+(v+1)+"P":u.C0.ESC+"OP";break;case 113:k.key=v?u.C0.ESC+"[1;"+(v+1)+"Q":u.C0.ESC+"OQ";break;case 114:k.key=v?u.C0.ESC+"[1;"+(v+1)+"R":u.C0.ESC+"OR";break;case 115:k.key=v?u.C0.ESC+"[1;"+(v+1)+"S":u.C0.ESC+"OS";break;case 116:k.key=v?u.C0.ESC+"[15;"+(v+1)+"~":u.C0.ESC+"[15~";break;case 117:k.key=v?u.C0.ESC+"[17;"+(v+1)+"~":u.C0.ESC+"[17~";break;case 118:k.key=v?u.C0.ESC+"[18;"+(v+1)+"~":u.C0.ESC+"[18~";break;case 119:k.key=v?u.C0.ESC+"[19;"+(v+1)+"~":u.C0.ESC+"[19~";break;case 120:k.key=v?u.C0.ESC+"[20;"+(v+1)+"~":u.C0.ESC+"[20~";break;case 121:k.key=v?u.C0.ESC+"[21;"+(v+1)+"~":u.C0.ESC+"[21~";break;case 122:k.key=v?u.C0.ESC+"[23;"+(v+1)+"~":u.C0.ESC+"[23~";break;case 123:k.key=v?u.C0.ESC+"[24;"+(v+1)+"~":u.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(m&&!w||!f.altKey||f.metaKey)!m||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?k.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(k.key=u.C0.US),f.key==="@"&&(k.key=u.C0.NUL)):f.keyCode===65&&(k.type=1);else{const y=d[f.keyCode],x=y==null?void 0:y[f.shiftKey?1:0];if(x)k.key=u.C0.ESC+x;else if(f.keyCode>=65&&f.keyCode<=90){const b=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(b);f.shiftKey&&(C=C.toUpperCase()),k.key=u.C0.ESC+C}else if(f.keyCode===32)k.key=u.C0.ESC+(f.ctrlKey?u.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let b=f.code.slice(3,4);f.shiftKey||(b=b.toLowerCase()),k.key=u.C0.ESC+b,k.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?k.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?k.key=u.C0.NUL:f.keyCode>=51&&f.keyCode<=55?k.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?k.key=u.C0.DEL:f.keyCode===219?k.key=u.C0.ESC:f.keyCode===220?k.key=u.C0.FS:f.keyCode===221&&(k.key=u.C0.GS)}return k}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,u=0,d=c.length){let f="";for(let p=u;p65535?(m-=65536,f+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):f+=String.fromCharCode(m)}return f},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,u){const d=c.length;if(!d)return 0;let f=0,p=0;if(this._interim){const m=c.charCodeAt(p++);56320<=m&&m<=57343?u[f++]=1024*(this._interim-55296)+m-56320+65536:(u[f++]=this._interim,u[f++]=m),this._interim=0}for(let m=p;m=d)return this._interim=w,f;const k=c.charCodeAt(m);56320<=k&&k<=57343?u[f++]=1024*(w-55296)+k-56320+65536:(u[f++]=w,u[f++]=k)}else w!==65279&&(u[f++]=w)}return f}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,u){const d=c.length;if(!d)return 0;let f,p,m,w,k=0,v=0,y=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let z,A=0;for(;(z=63&this.interim[++A])&&A<4;)N<<=6,N|=z;const j=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=j-A;for(;y=d)return 0;if(z=c[y++],(192&z)!=128){y--,C=!0;break}this.interim[A++]=z,N<<=6,N|=63&z}C||(j===2?N<128?y--:u[k++]=N:j===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const x=d-4;let b=y;for(;b=d)return this.interim[0]=f,k;if(p=c[b++],(192&p)!=128){b--;continue}if(v=(31&f)<<6|63&p,v<128){b--;continue}u[k++]=v}else if((240&f)==224){if(b>=d)return this.interim[0]=f,k;if(p=c[b++],(192&p)!=128){b--;continue}if(b>=d)return this.interim[0]=f,this.interim[1]=p,k;if(m=c[b++],(192&m)!=128){b--;continue}if(v=(15&f)<<12|(63&p)<<6|63&m,v<2048||v>=55296&&v<=57343||v===65279)continue;u[k++]=v}else if((248&f)==240){if(b>=d)return this.interim[0]=f,k;if(p=c[b++],(192&p)!=128){b--;continue}if(b>=d)return this.interim[0]=f,this.interim[1]=p,k;if(m=c[b++],(192&m)!=128){b--;continue}if(b>=d)return this.interim[0]=f,this.interim[1]=p,this.interim[2]=m,k;if(w=c[b++],(192&w)!=128){b--;continue}if(v=(7&f)<<18|(63&p)<<12|(63&m)<<6|63&w,v<65536||v>1114111)continue;u[k++]=v}}return k}}},225:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=c(1480),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;mk[x][1])return!1;for(;x>=y;)if(v=y+x>>1,w>k[v][1])y=v+1;else{if(!(w=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,w){let k=this.wcwidth(m),v=k===0&&w!==0;if(v){const y=u.UnicodeService.extractWidth(w);y===0?v=!1:y>k&&(k=y)}return u.UnicodeService.createPropertyValue(0,k,v)}}},5981:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=c(8460),d=c(844);class f extends d.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const v=this._callbacks.shift();v&&v()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,w){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(w),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(w)}_innerWrite(m=0,w=!0){const k=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const v=this._writeBuffer[this._bufferOffset],y=this._action(v,w);if(y){const b=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void y.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(b)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=v.length,Date.now()-k>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=f},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function d(f,p){const m=f.toString(16),w=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}o.parseColor=function(f){if(!f)return;let p=f.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=c.exec(p);if(m){const w=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/w*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/w*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/w*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,w=[0,0,0];for(let k=0;k<3;++k){const v=parseInt(p.slice(m*k,m*k+m),16);w[k]=m===1?v<<4:m===2?v:m===3?v>>4:v>>8}return w}},o.toRgbString=function(f,p=16){const[m,w,k]=f;return`rgb:${d(m,p)}/${d(w,p)}/${d(k,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=c(482),d=c(8742),f=c(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(w,k){this._handlers[w]===void 0&&(this._handlers[w]=[]);const v=this._handlers[w];return v.push(k),{dispose:()=>{const y=v.indexOf(k);y!==-1&&v.splice(y,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(w,k){if(this.reset(),this._ident=w,this._active=this._handlers[w]||p,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(w,k,v){if(this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].put(w,k,v);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(w,k,v))}unhook(w,k=!0){if(this._active.length){let v=!1,y=this._active.length-1,x=!1;if(this._stack.paused&&(y=this._stack.loopPosition-1,v=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&v===!1){for(;y>=0&&(v=this._active[y].unhook(w),v!==!0);y--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!1,v;y--}for(;y>=0;y--)if(v=this._active[y].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=y,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const m=new d.Params;m.addParam(0),o.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=m,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():m,this._data="",this._hitLimit=!1}put(w,k,v){this._hitLimit||(this._data+=(0,u.utf32ToString)(w,k,v),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let k=!1;if(this._hitLimit)k=!1;else if(w&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((v=>(this._params=m,this._data="",this._hitLimit=!1,v)));return this._params=m,this._data="",this._hitLimit=!1,k}}},2015:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=c(844),d=c(8742),f=c(6242),p=c(6351);class m{constructor(y){this.table=new Uint8Array(y)}setDefault(y,x){this.table.fill(y<<4|x)}add(y,x,b,C){this.table[x<<8|y]=b<<4|C}addMany(y,x,b,C){for(let N=0;Nj)),x=(A,j)=>y.slice(A,j),b=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const N=x(0,14);let z;for(z in v.setDefault(1,0),v.addMany(b,0,2,0),N)v.addMany([24,26,153,154],z,3,0),v.addMany(x(128,144),z,3,0),v.addMany(x(144,152),z,3,0),v.add(156,z,0,0),v.add(27,z,11,1),v.add(157,z,4,8),v.addMany([152,158,159],z,0,7),v.add(155,z,11,3),v.add(144,z,11,9);return v.addMany(C,0,3,0),v.addMany(C,1,3,1),v.add(127,1,0,1),v.addMany(C,8,0,8),v.addMany(C,3,3,3),v.add(127,3,0,3),v.addMany(C,4,3,4),v.add(127,4,0,4),v.addMany(C,6,3,6),v.addMany(C,5,3,5),v.add(127,5,0,5),v.addMany(C,2,3,2),v.add(127,2,0,2),v.add(93,1,4,8),v.addMany(b,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(x(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(b,7,0,7),v.addMany(C,7,0,7),v.add(156,7,0,0),v.add(127,7,0,7),v.add(91,1,11,3),v.addMany(x(64,127),3,7,0),v.addMany(x(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(x(48,60),4,8,4),v.addMany(x(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(x(32,64),6,0,6),v.add(127,6,0,6),v.addMany(x(64,127),6,0,0),v.addMany(x(32,48),3,9,5),v.addMany(x(32,48),5,9,5),v.addMany(x(48,64),5,0,6),v.addMany(x(64,127),5,7,0),v.addMany(x(32,48),4,9,5),v.addMany(x(32,48),1,9,2),v.addMany(x(32,48),2,9,2),v.addMany(x(48,127),2,10,0),v.addMany(x(48,80),1,10,0),v.addMany(x(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(x(96,127),1,10,0),v.add(80,1,11,9),v.addMany(C,9,0,9),v.add(127,9,0,9),v.addMany(x(28,32),9,0,9),v.addMany(x(32,48),9,9,12),v.addMany(x(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(x(32,128),11,0,11),v.addMany(x(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(x(28,32),10,0,10),v.addMany(x(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(x(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(x(28,32),12,0,12),v.addMany(x(32,48),12,9,12),v.addMany(x(48,64),12,0,11),v.addMany(x(64,127),12,12,13),v.addMany(x(64,127),10,12,13),v.addMany(x(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(b,13,13,13),v.add(127,13,0,13),v.addMany([27,156,24,26],13,14,0),v.add(w,0,2,0),v.add(w,8,5,8),v.add(w,6,0,6),v.add(w,11,0,11),v.add(w,13,13,13),v})();class k extends u.Disposable{constructor(y=o.VT500_TRANSITION_TABLE){super(),this._transitions=y,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,b,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,b)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(y,x=[64,126]){let b=0;if(y.prefix){if(y.prefix.length>1)throw new Error("only one byte as prefix supported");if(b=y.prefix.charCodeAt(0),b&&60>b||b>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(y.intermediates){if(y.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;Nz||z>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");b<<=8,b|=z}}if(y.final.length!==1)throw new Error("final must be a single byte");const C=y.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return b<<=8,b|=C,b}identToString(y){const x=[];for(;y;)x.push(String.fromCharCode(255&y)),y>>=8;return x.reverse().join("")}setPrintHandler(y){this._printHandler=y}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(y,x){const b=this._identifier(y,[48,126]);this._escHandlers[b]===void 0&&(this._escHandlers[b]=[]);const C=this._escHandlers[b];return C.push(x),{dispose:()=>{const N=C.indexOf(x);N!==-1&&C.splice(N,1)}}}clearEscHandler(y){this._escHandlers[this._identifier(y,[48,126])]&&delete this._escHandlers[this._identifier(y,[48,126])]}setEscHandlerFallback(y){this._escHandlerFb=y}setExecuteHandler(y,x){this._executeHandlers[y.charCodeAt(0)]=x}clearExecuteHandler(y){this._executeHandlers[y.charCodeAt(0)]&&delete this._executeHandlers[y.charCodeAt(0)]}setExecuteHandlerFallback(y){this._executeHandlerFb=y}registerCsiHandler(y,x){const b=this._identifier(y);this._csiHandlers[b]===void 0&&(this._csiHandlers[b]=[]);const C=this._csiHandlers[b];return C.push(x),{dispose:()=>{const N=C.indexOf(x);N!==-1&&C.splice(N,1)}}}clearCsiHandler(y){this._csiHandlers[this._identifier(y)]&&delete this._csiHandlers[this._identifier(y)]}setCsiHandlerFallback(y){this._csiHandlerFb=y}registerDcsHandler(y,x){return this._dcsParser.registerHandler(this._identifier(y),x)}clearDcsHandler(y){this._dcsParser.clearHandler(this._identifier(y))}setDcsHandlerFallback(y){this._dcsParser.setHandlerFallback(y)}registerOscHandler(y,x){return this._oscParser.registerHandler(y,x)}clearOscHandler(y){this._oscParser.clearHandler(y)}setOscHandlerFallback(y){this._oscParser.setHandlerFallback(y)}setErrorHandler(y){this._errorHandler=y}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(y,x,b,C,N){this._parseStack.state=y,this._parseStack.handlers=x,this._parseStack.handlerPos=b,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(y,x,b){let C,N=0,z=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(b===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const j=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(b===!1&&M>-1){for(;M>=0&&(C=j[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(b===!1&&M>-1){for(;M>=0&&(C=j[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=y[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,b),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=y[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,b),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,A=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let j=A;j>4){case 2:for(let U=j+1;;++U){if(U>=x||(N=y[U])<32||N>126&&N=x||(N=y[U])<32||N>126&&N=x||(N=y[U])<32||N>126&&N=x||(N=y[U])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,z,j),C;D<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++j47&&N<60);j--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const L=this._escHandlers[this._collect<<8|N];let B=L?L.length-1:-1;for(;B>=0&&(C=L[B](),C!==!0);B--)if(C instanceof Promise)return this._preserveStack(4,L,B,z,j),C;B<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let U=j+1;;++U)if(U>=x||(N=y[U])===24||N===26||N===27||N>127&&N=x||(N=y[U])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),d=c(482),f=[];o.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const w=this._handlers[p];return w.push(m),{dispose:()=>{const k=w.indexOf(m);k!==-1&&w.splice(k,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,w){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(p,m,w);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(p,m,w))}start(){this.reset(),this._state=1}put(p,m,w){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,w)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,k=this._active.length-1,v=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,w=m,v=this._stack.fallThrough,this._stack.paused=!1),!v&&w===!1){for(;k>=0&&(w=this._active[k].end(p),w!==!0);k--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,w;k--}for(;k>=0;k--)if(w=this._active[k].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=f,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,w){this._hitLimit||(this._data+=(0,d.utf32ToString)(p,m,w),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((w=>(this._data="",this._hitLimit=!1,w)));return this._data="",this._hitLimit=!1,m}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class u{static fromArray(f){const p=new u;if(!f.length)return p;for(let m=Array.isArray(f[0])?1:0;m256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let p=0;p>8,w=255&this._subParamsIdx[p];w-m>0&&f.push(Array.prototype.slice.call(this._subParams,m,w))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>c?c:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>c?c:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const p=this._subParamsIdx[f]>>8,m=255&this._subParamsIdx[f];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const f={};for(let p=0;p>8,w=255&this._subParamsIdx[p];w-m>0&&(f[p]=this._subParams.slice(m,w))}return f}addDigit(f){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,w=m[p-1];m[p-1]=~w?Math.min(10*w+f,c):f}}o.Params=u},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,u){const d={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(d),u.dispose=()=>this._wrappedAddonDispose(d),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let d=0;d{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),d=c(511);o.BufferApiView=class{constructor(f,p){this._buffer=f,this.type=p}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const p=this._buffer.lines.get(f);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new d.CellData}}},3785:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,f){if(!(d<0||d>=this._line.length))return f?(this._line.loadCell(d,f),f):this._line.loadCell(d,new u.CellData)}translateToString(d,f,p){return this._line.translateToString(d,f,p)}}},8285:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),d=c(8460),f=c(844);class p extends f.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=p},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,u){return this._core.registerCsiHandler(c,(d=>u(d.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((d,f)=>u(d,f.toArray())))}addDcsHandler(c,u){return this.registerDcsHandler(c,u)}registerEscHandler(c,u){return this._core.registerEscHandler(c,u)}addEscHandler(c,u){return this.registerEscHandler(c,u)}registerOscHandler(c,u){return this._core.registerOscHandler(c,u)}addOscHandler(c,u){return this.registerOscHandler(c,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(a,o,c){var u=this&&this.__decorate||function(v,y,x,b){var C,N=arguments.length,z=N<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,y,x,b);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(z=(N<3?C(z):N>3?C(y,x,z):C(y,x))||z);return N>3&&z&&Object.defineProperty(y,x,z),z},d=this&&this.__param||function(v,y){return function(x,b){y(x,b,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const f=c(8460),p=c(844),m=c(5295),w=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let k=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(v){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(v.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(v.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(v,this))}resize(v,y){this.cols=v,this.rows=y,this.buffers.resize(v,y),this._onResize.fire({cols:v,rows:y})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,y=!1){const x=this.buffer;let b;b=this._cachedBlankLine,b&&b.length===this.cols&&b.getFg(0)===v.fg&&b.getBg(0)===v.bg||(b=x.getBlankLine(v,y),this._cachedBlankLine=b),b.isWrapped=y;const C=x.ybase+x.scrollTop,N=x.ybase+x.scrollBottom;if(x.scrollTop===0){const z=x.lines.isFull;N===x.lines.length-1?z?x.lines.recycle().copyFrom(b):x.lines.push(b.clone()):x.lines.splice(N+1,0,b.clone()),z?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const z=N-C+1;x.lines.shiftElements(C+1,z-1,-1),x.lines.set(N,b.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(v,y,x){const b=this.buffer;if(v<0){if(b.ydisp===0)return;this.isUserScrolling=!0}else v+b.ydisp>=b.ybase&&(this.isUserScrolling=!1);const C=b.ydisp;b.ydisp=Math.max(Math.min(b.ydisp+v,b.ybase),0),C!==b.ydisp&&(y||this._onScroll.fire(b.ydisp))}};o.BufferService=k=u([d(0,w.IOptionsService)],k)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,u){this._charsets[c]=u,this.glevel===c&&(this.charset=u)}}},1753:function(a,o,c){var u=this&&this.__decorate||function(b,C,N,z){var A,j=arguments.length,M=j<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,N):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(b,C,N,z);else for(var D=b.length-1;D>=0;D--)(A=b[D])&&(M=(j<3?A(M):j>3?A(C,N,M):A(C,N))||M);return j>3&&M&&Object.defineProperty(C,N,M),M},d=this&&this.__param||function(b,C){return function(N,z){C(N,z,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const f=c(2585),p=c(8460),m=c(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:b=>b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)},VT200:{events:19,restrict:b=>b.action!==32},DRAG:{events:23,restrict:b=>b.action!==32||b.button!==3},ANY:{events:31,restrict:b=>!0}};function k(b,C){let N=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(N|=64,N|=b.action):(N|=3&b.button,4&b.button&&(N|=64),8&b.button&&(N|=128),b.action===32?N|=32:b.action!==0||C||(N|=3)),N}const v=String.fromCharCode,y={DEFAULT:b=>{const C=[k(b,!1)+32,b.col+32,b.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:b=>{const C=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${k(b,!0)};${b.col};${b.row}${C}`},SGR_PIXELS:b=>{const C=b.action===0&&b.button!==4?"m":"M";return`\x1B[<${k(b,!0)};${b.x};${b.y}${C}`}};let x=o.CoreMouseService=class extends m.Disposable{constructor(b,C){super(),this._bufferService=b,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(w))this.addProtocol(N,w[N]);for(const N of Object.keys(y))this.addEncoding(N,y[N]);this.reset()}addProtocol(b,C){this._protocols[b]=C}addEncoding(b,C){this._encodings[b]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(b){if(!this._protocols[b])throw new Error(`unknown protocol "${b}"`);this._activeProtocol=b,this._onProtocolChange.fire(this._protocols[b].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(b){if(!this._encodings[b])throw new Error(`unknown encoding "${b}"`);this._activeEncoding=b}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(b){if(b.col<0||b.col>=this._bufferService.cols||b.row<0||b.row>=this._bufferService.rows||b.button===4&&b.action===32||b.button===3&&b.action!==32||b.button!==4&&(b.action===2||b.action===3)||(b.col++,b.row++,b.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,b,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(b))return!1;const C=this._encodings[this._activeEncoding](b);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=b,!0}explainEvents(b){return{down:!!(1&b),up:!!(2&b),drag:!!(4&b),move:!!(8&b),wheel:!!(16&b)}}_equalEvents(b,C,N){if(N){if(b.x!==C.x||b.y!==C.y)return!1}else if(b.col!==C.col||b.row!==C.row)return!1;return b.button===C.button&&b.action===C.action&&b.ctrl===C.ctrl&&b.alt===C.alt&&b.shift===C.shift}};o.CoreMouseService=x=u([d(0,f.IBufferService),d(1,f.ICoreService)],x)},6975:function(a,o,c){var u=this&&this.__decorate||function(x,b,C,N){var z,A=arguments.length,j=A<3?b:N===null?N=Object.getOwnPropertyDescriptor(b,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,b,C,N);else for(var M=x.length-1;M>=0;M--)(z=x[M])&&(j=(A<3?z(j):A>3?z(b,C,j):z(b,C))||j);return A>3&&j&&Object.defineProperty(b,C,j),j},d=this&&this.__param||function(x,b){return function(C,N){b(C,N,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const f=c(1439),p=c(8460),m=c(844),w=c(2585),k=Object.freeze({insertMode:!1}),v=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let y=o.CoreService=class extends m.Disposable{constructor(x,b,C){super(),this._bufferService=x,this._logService=b,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(v)}reset(){this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(v)}triggerDataEvent(x,b=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;b&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),b&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((b=>b.charCodeAt(0))))),this._onBinary.fire(x))}};o.CoreService=y=u([d(0,w.IBufferService),d(1,w.ILogService),d(2,w.IOptionsService)],y)},9074:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),d=c(8460),f=c(844),p=c(6106);let m=0,w=0;class k extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const b=new v(x);if(b){const C=b.marker.onDispose((()=>b.dispose()));b.onDispose((()=>{b&&(this._decorations.delete(b)&&this._onDecorationRemoved.fire(b),C.dispose())})),this._decorations.insert(b),this._onDecorationRegistered.fire(b)}return b}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,b,C){let N=0,z=0;for(const A of this._decorations.getKeyIterator(b))N=A.options.x??0,z=N+(A.options.width??1),x>=N&&x{m=z.options.x??0,w=m+(z.options.width??1),x>=m&&x{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),d=c(8343);class f{constructor(...m){this._entries=new Map;for(const[w,k]of m)this.set(w,k)}set(m,w){const k=this._entries.get(m);return this._entries.set(m,w),k}forEach(m){for(const[w,k]of this._entries.entries())m(w,k)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=f,o.InstantiationService=class{constructor(){this._services=new f,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const w=(0,d.getServiceDependencies)(p).sort(((y,x)=>y.index-x.index)),k=[];for(const y of w){const x=this._services.get(y.id);if(!x)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${y.id}.`);k.push(x)}const v=w.length>0?w[0].index:m.length;if(m.length!==v)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${v+1} conflicts with ${m.length} static arguments`);return new p(...m,...k)}}},7866:function(a,o,c){var u=this&&this.__decorate||function(v,y,x,b){var C,N=arguments.length,z=N<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(v,y,x,b);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(z=(N<3?C(z):N>3?C(y,x,z):C(y,x))||z);return N>3&&z&&Object.defineProperty(y,x,z),z},d=this&&this.__param||function(v,y){return function(x,b){y(x,b,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const f=c(844),p=c(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let w,k=o.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(v){super(),this._optionsService=v,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(v){for(let y=0;yJSON.stringify(z))).join(", ")})`);const N=b.apply(this,C);return w.trace(`GlyphRenderer#${b.name} return`,N),N}}},7302:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=c(8460),d=c(844),f=c(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends d.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const y in k)if(y in v)try{const x=k[y];v[y]=this._sanitizeAndValidateOption(y,x)}catch(x){console.error(x)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((y=>{y===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((y=>{k.indexOf(y)!==-1&&v()}))}_setupOptions(){const k=y=>{if(!(y in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);return this.rawOptions[y]},v=(y,x)=>{if(!(y in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${y}"`);x=this._sanitizeAndValidateOption(y,x),this.rawOptions[y]!==x&&(this.rawOptions[y]=x,this._onOptionChange.fire(y))};for(const y in this.rawOptions){const x={get:k.bind(this,y),set:v.bind(this,y)};Object.defineProperty(this.options,y,x)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(y){return y==="block"||y==="underline"||y==="bar"})(v))throw new Error(`"${v}" is not a valid value for ${k}`);break;case"wordSeparator":v||(v=o.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof v=="number"&&1<=v&&v<=1e3)break;v=p.includes(v)?v:o.DEFAULT_OPTIONS[k];break;case"cursorWidth":v=Math.floor(v);case"lineHeight":case"tabStopWidth":if(v<1)throw new Error(`${k} cannot be less than 1, value: ${v}`);break;case"minimumContrastRatio":v=Math.max(1,Math.min(21,Math.round(10*v)/10));break;case"scrollback":if((v=Math.min(v,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${v}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(v<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${v}`);break;case"rows":case"cols":if(!v&&v!==0)throw new Error(`${k} must be numeric, value: ${v}`);break;case"windowsPty":v=v??{}}return v}}o.OptionsService=m},2660:function(a,o,c){var u=this&&this.__decorate||function(m,w,k,v){var y,x=arguments.length,b=x<3?w:v===null?v=Object.getOwnPropertyDescriptor(w,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(m,w,k,v);else for(var C=m.length-1;C>=0;C--)(y=m[C])&&(b=(x<3?y(b):x>3?y(w,k,b):y(w,k))||b);return x>3&&b&&Object.defineProperty(w,k,b),b},d=this&&this.__param||function(m,w){return function(k,v){w(k,v,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const f=c(2585);let p=o.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const w=this._bufferService.buffer;if(m.id===void 0){const C=w.addMarker(w.ybase+w.y),N={data:m,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(N,C))),this._dataByLinkId.set(N.id,N),N.id}const k=m,v=this._getEntryIdKey(k),y=this._entriesWithId.get(v);if(y)return this.addLineToLink(y.id,w.ybase+w.y),y.id;const x=w.addMarker(w.ybase+w.y),b={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(b,x))),this._entriesWithId.set(b.key,b),this._dataByLinkId.set(b.id,b),b.id}addLineToLink(m,w){const k=this._dataByLinkId.get(m);if(k&&k.lines.every((v=>v.line!==w))){const v=this._bufferService.buffer.addMarker(w);k.lines.push(v),v.onDispose((()=>this._removeMarkerFromLink(k,v)))}}getLinkData(m){var w;return(w=this._dataByLinkId.get(m))==null?void 0:w.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,w){const k=m.lines.indexOf(w);k!==-1&&(m.lines.splice(k,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([d(0,f.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(d){return d[u]||[]},o.createDecorator=function(d){if(o.serviceRegistry.has(d))return o.serviceRegistry.get(d);const f=function(p,m,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,v,y){v[c]===v?v[u].push({id:k,index:y}):(v[u]=[{id:k,index:y}],v[c]=v)})(f,p,w)};return f.toString=()=>d,o.serviceRegistry.set(d,f),f}},2585:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=c(8343);var d;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(d||(o.LogLevelEnum=d={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=c(8460),d=c(225);class f{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,w,k=!1){return(16777215&m)<<3|(3&w)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new d.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let w=0,k=0;const v=m.length;for(let y=0;y=v)return w+this.wcwidth(x);const N=m.charCodeAt(y);56320<=N&&N<=57343?x=1024*(x-55296)+N-56320+65536:w+=this.wcwidth(N)}const b=this.charProperties(x,k);let C=f.extractWidth(b);f.extractShouldJoin(b)&&(C-=f.extractWidth(k)),w+=C,k=b}return w}charProperties(m,w){return this._activeProvider.charProperties(m,w)}}o.UnicodeService=f}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var c=r[a]={exports:{}};return t[a].call(c.exports,c,c.exports,s),c.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),c=s(3236),u=s(844),d=s(5741),f=s(8285),p=s(7975),m=s(7090),w=["cols","rows"];class k extends u.Disposable{constructor(y){super(),this._core=this.register(new c.Terminal(y)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],b=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:x.bind(this,C),set:b.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(y){if(w.includes(y))throw new Error(`Option "${y}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const y=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:y.applicationCursorKeys,applicationKeypadMode:y.applicationKeypad,bracketedPasteMode:y.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:y.origin,reverseWraparoundMode:y.reverseWraparound,sendFocusMode:y.sendFocus,wraparoundMode:y.wraparound}}get options(){return this._publicOptions}set options(y){for(const x in y)this._publicOptions[x]=y[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(y,x=!0){this._core.input(y,x)}resize(y,x){this._verifyIntegers(y,x),this._core.resize(y,x)}open(y){this._core.open(y)}attachCustomKeyEventHandler(y){this._core.attachCustomKeyEventHandler(y)}attachCustomWheelEventHandler(y){this._core.attachCustomWheelEventHandler(y)}registerLinkProvider(y){return this._core.registerLinkProvider(y)}registerCharacterJoiner(y){return this._checkProposedApi(),this._core.registerCharacterJoiner(y)}deregisterCharacterJoiner(y){this._checkProposedApi(),this._core.deregisterCharacterJoiner(y)}registerMarker(y=0){return this._verifyIntegers(y),this._core.registerMarker(y)}registerDecoration(y){return this._checkProposedApi(),this._verifyPositiveIntegers(y.x??0,y.width??0,y.height??0),this._core.registerDecoration(y)}hasSelection(){return this._core.hasSelection()}select(y,x,b){this._verifyIntegers(y,x,b),this._core.select(y,x,b)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(y,x){this._verifyIntegers(y,x),this._core.selectLines(y,x)}dispose(){super.dispose()}scrollLines(y){this._verifyIntegers(y),this._core.scrollLines(y)}scrollPages(y){this._verifyIntegers(y),this._core.scrollPages(y)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(y){this._verifyIntegers(y),this._core.scrollToLine(y)}clear(){this._core.clear()}write(y,x){this._core.write(y,x)}writeln(y,x){this._core.write(y),this._core.write(`\r +`,x)}paste(y){this._core.paste(y)}refresh(y,x){this._verifyIntegers(y,x),this._core.refresh(y,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(y){this._addonManager.loadAddon(this,y)}static get strings(){return o}_verifyIntegers(...y){for(const x of y)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...y){for(const x of y)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(Ow)),Ow.exports}var B$=o7n();const c7n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function Kj(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),i={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of c7n){const o=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();o&&(i[a]=o)}return{...i,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function my(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new B$.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:Kj(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=Kj(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new s7n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new a7n.WebLinksAddon((x,b)=>{let C;try{C=new URL(b)}catch{return}(C.protocol==="http:"||C.protocol==="https:")&&window.open(C,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",i.open(e);let u=!0,d=null;const f=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",f);const p=()=>{var j;const x=i.element,b=x==null?void 0:x.querySelector(".xterm-screen"),C=x==null?void 0:x.querySelector(".xterm-viewport");if(!x||!(b instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let z=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=z;M--)if((j=N.getLine(N.viewportY+M))!=null&&j.translateToString(!0).trim()){z=M+1;break}const A=b.getBoundingClientRect().height;x.style.height=`${Math.max(e.clientHeight,Math.min(z,i.rows)*A/i.rows)}px`,x.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const x=o.proposeDimensions();x&&(i.resize(x.cols,Math.max(x.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=i.onWriteParsed(()=>{var b;const x=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),x){const C=(b=i.element)==null?void 0:b.querySelector(".xterm-screen");if(C instanceof HTMLElement){const N=(i.buffer.active.cursorY+1)*C.getBoundingClientRect().height/i.rows;e.scrollTop=Math.max(0,N-e.clientHeight),d=e.scrollTop}}}),v=i.onScroll(p),y=x=>{(x.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function l7n(e){return Zf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||F$(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function u7n(e){return Zf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&F$(e.partitions)&&(e.error===null||typeof e.error=="string")}function _7n(e){return!Zf(e)||e.type!=="complete"?null:e.backend==="ssh"&&l7n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&u7n(e.result)?{backend:"slurm",result:e.result}:null}function H$(e){return Zf(e)&&e.type==="complete"}function f7n(e){return Zf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function t6({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:i}){const a=new URLSearchParams({host:e,backend:n});return _.jsx(gy,{path:`${t}?${a}`,label:fI({host:Ae(e)}),active:r,onError:i,onComplete:o=>{const c=_7n(o);return c?(s(c),!0):!1}})}function d7n({login:e,onComplete:n,onError:t}){return _.jsx(gy,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>H$(r)?(n(),!0):!1})}function h7n({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[i,a]=T.useState("running");return _.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[_.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[_.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),_.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:i==="running"?_.jsxs(_.Fragment,{children:[_.jsx(Et,{className:"border-t-accent-amber"})," ",Yzt()]}):i==="done"?_.jsxs(_.Fragment,{children:[_.jsx(ti,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",Izt()]}):i==="failed"?_.jsxs(_.Fragment,{children:[_.jsx(_r,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",Uzt()]}):Azt()}),_.jsx("button",{type:"button",onClick:s,"aria-label":Wz(),title:Wz(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:_.jsx(_r,{size:14})})]}),_.jsx(gy,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>H$(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function gy({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:i="dark",shellAfter:a=!1,active:o=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:f}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(d),v=T.useRef(f),[y,x]=T.useState(null);return w.current=u,k.current=d,v.current=f,T.useEffect(()=>{const b=p.current;if(!b)return;const{terminal:C,dispose:N}=my(b,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const z=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${z}//${location.host}`),j=new WebSocket(A);j.binaryType="arraybuffer";let M=!1,D=!1,L=!1;const B=(Q,K)=>{var Z;if(D){K||C.writeln(Q);return}D=!0,(!L||a)&&C.writeln(Q),(Z=k.current)==null||Z.call(k,Q,K),!(a&&!K)&&(C.options.disableStdin=!0,C.blur(),x(Q))},U=C.onData(Q=>{j.readyState===WebSocket.OPEN&&j.send(new TextEncoder().encode(Q))}),H=C.onResize(({cols:Q,rows:K})=>{j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return j.onopen=()=>{t&&C.writeln(`$ ${t}`),j.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},j.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){L=!0,C.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let K;try{K=JSON.parse(Q.data)}catch{return}if(w.current(K)){M=!0,a||j.close();return}const Z=f7n(K);Z&&(M?C.writeln(Z):B(Z,!a))},j.onerror=()=>B(sb(),!0),j.onclose=()=>{var Q;if(!M&&!D){B(sb(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{j.onopen=null,j.onmessage=null,j.onerror=null,j.onclose=null,U.dispose(),H.dispose(),j.close(),m.current=null,N()}},[e,t,c,i,a]),T.useEffect(()=>{const b=m.current;b&&(b.options.disableStdin=c||!o||y!==null,!c&&o&&y===null?b.focus():b.blur())},[o,y,c]),_.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[_.jsx("div",{className:`${r} ${s==="card"?P$:`overflow-hidden p-3 ${i==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:_.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),y?_.jsx("p",{role:"alert",className:"sr-only",children:y}):null]})}function p7n({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=my(r,!0,!0);return s.write(n),i},[n]),_.jsx("div",{className:`mt-3 h-40 ${P$}`,role:"group","aria-label":fI({host:Ae(e)}),children:_.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let hb=null,C0=0;const q$=()=>hb;function U$(){const e=C0;return I$(async(n,t)=>{if(e!==C0)return;const r=await Nwn(n,t);e===C0&&Ze.setQueryData(Jm().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===C0&&sn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Ks(),onClick:()=>void n6.retry()}})})}let Ev=U$();function m7n(){C0++,hb=null,Ev=U$()}const n6={flush:(e=!1)=>Ev.flush(e),retry:()=>Ev.retry(),queue(e,n=0){const t=hb;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(hb=e,Ev.queue(e,n))}};window.addEventListener("pagehide",()=>void n6.flush(!0));function Ll(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Bo(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function G$(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],i=new Map(s.map(u=>[Lt(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=i.get(u);return d?[d]:[]}),o=Lt(e.rightTab);return{tabs:[...r,...a].map(u=>Ll(u,Lt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?Ll(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Lt(e.previewTab):null,history:e.tabHistory.map(Lt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Lt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function g7n(e,n){const t=s6();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>Lt(Bo(a))===Lt(Bo(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=Bo(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Lt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Lt(a))}const s=new Map(r.map(i=>{const a=Bo(i);return[Lt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(i=>{const a=s.get(i);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?Bo(n):e!=null&&e.active?Bo(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,K$(t,n)}const Dw=(e,n)=>e.id===n.id&&e.view===n.view,H_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,r6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,ei=(e,n,t)=>`${e}:${n??""}:${r6(t)}`,V$=e=>({...e,lineScrollRequest:void 0});function D1(e){return typeof e=="object"&&"path"in e?V$(e):e}const $d=(e,n)=>e.branch===n.branch;function Lt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${r6(e)}`:`experiment:${e.id}:${e.view}`}function u0(e,n){const t=e.filter(r=>Lt(r)!==n);return t.length===e.length?e:t}function v7n(e){return e!==void 0}function s6(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===ef&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===oy){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(Lt),panelOpen:!0}}if(e===cy){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Lt),panelOpen:!0}}return t}function i6(e,n){const t=s6(e,n);return t.panelOpen?G$(t,{},{}):void 0}function K$(e,n){if(!n)return e;const t=Bo(n),r=Lt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Lt(c)===r),i=(c,u)=>{const d=c.findIndex(f=>Lt(f)===r);return d<0?[...c,u]:JSON.stringify(Ll(c[d]))===JSON.stringify(Ll(u))?c:c.map((f,p)=>p===d?{...f,...u}:f)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=i(e.fileTabs,t):"id"in t?a.expTabs=i(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?a.codeTabs=i(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=i(e.planTabs,t):t.kind==="side"?a.sideTabs=i(e.sideTabs,t):a.subagentTabs=i(e.subagentTabs,t),e.contentTabOrder.includes(r)||(a.contentTabOrder=[...e.contentTabOrder,r]));const o=e.tabHistory.at(-1);return o&&Lt(o)===r&&JSON.stringify(Ll(o))===JSON.stringify(Ll(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Lt(c)!==r),t]),a}let Po=0;const rm=new Map,pb=new Map,y5=new Set,x5=()=>{for(const e of y5)e()},b7n=e=>(y5.add(e),()=>{y5.delete(e)}),sm=new Map,Fo=new Map,W$=e=>Fo.get(e);function y7n(){Po++,Fo.clear(),sm.clear(),rm.clear(),pb.clear(),x5()}function x7n(e,n){const t=Fo.get(e);if(!(t!=null&&t.tasks.new)||e_(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=Bo(o);if(typeof c=="string"||!("path"in c))return[];const u=ei(e,null,c);return u in a?[[ei(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,sm.set(e,n),Fo.set(e,{...t,tasks:i})}function w7n(e){let n=rm.get(e);if(!n){const t=Po;n=I$(async(r,s)=>{if(t!==Po)return;const i=await Ewn(e,r,s);t===Po&&Ze.setQueryData(FS(e).queryKey,i),t===Po&&pb.delete(e)&&x5()},r=>{t===Po&&(pb.set(e,r instanceof Error?r.message:String(r)),x5())}),rm.set(e,n)}return n}function Lw(e,n,t,r){const s=Fo.get(e);if(!s||t==="new"&&sm.has(e))return;const i=py(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?e_(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const c={...s,lastLocation:i,lastTaskId:a,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=o&&r&&i===s.lastLocation&&JSON.stringify({...o,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});Fo.set(e,c),w7n(e).queue(c,u?250:0)}function Wj(e,n,t,r){const s=new Set(e.state.fileTabs.map(d=>ei(t,r==="new"?null:r,d))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),o=G$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Lt(Bo(c)):null;return o.active=o.tabs.find(d=>Lt(Bo(d))===u)??null,o}function k7n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:d,revision:f}=e,p=T.useRef(qj()),m=T.useSyncExternalStore(b7n,()=>n?pb.get(n)??null:null),[w,k]=T.useState(null),[v,y]=T.useState(0),[x,b]=T.useState(null),[C,N]=T.useState(null),z=T.useRef(null),A=T.useRef(null),j=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),L=JSON.stringify(s??null),B=T.useCallback(()=>{const H=j.current;if(!H)return;const Q=Wj({...M.current,state:H.state,pane:H.pane},e_(Fo.get(H.projectId),H.taskKey),H.projectId,H.taskKey);Lw(H.projectId,H.location,H.taskKey,Q)},[]);T.useEffect(()=>{let H=!0;const Q=Po;if(k(null),b(null),!!n)return Fo.has(n)?b(n):Ze.fetchQuery(FS(n)).then(K=>{!H||Q!==Po||(Fo.set(n,K??qj()),b(n))}).catch(K=>{H&&Q===Po&&k(K instanceof Error?K.message:String(K))}),()=>{H=!1}},[n,v]),T.useLayoutEffect(()=>{if(j.current&&j.current.scope!==D){const K=j.current.projectId;B(),sm.get(K)===t&&sm.delete(K),j.current=null}if(!n||x!==n)return;const H=Fo.get(n);if(!H)return;if(p.current=H,z.current!==D){if(z.current=D,A.current=L,i){const K=e_(H,t)??(Do(n)?i6(t,a):void 0);c(g7n(K,s),K,!0)}N(D);return}if(C!==D)return;let Q=o;A.current!==L&&(A.current=L,i&&s&&(Q=K$(o,s),c(Q,void 0,!1))),i?(Lw(n,r,t,Wj({state:Q,pane:s,getScroll:u,sourceModes:d},e_(H,t),n,t)),j.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):Lw(n,r),p.current=Fo.get(n)??H},[n,t,r,s,L,i,a,o,c,u,d,f,x,D,C,B]),T.useEffect(()=>{const H=Po,Q=Z=>{if(H===Po){B();for(const ee of rm.values())ee.flush(Z)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[B]);const U=T.useCallback(()=>{var H;n&&(w?y(Q=>Q+1):(H=rm.get(n))==null||H.retry())},[n,w]);return{ready:n===null||x===n&&C===D,loaded:n===null||x===n,error:w??m,retry:U,capture:B,workspace:p}}const S7n="data:image/svg+xml,"+encodeURIComponent(''),w5=T.createContext(null);function C7n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function Q$(){const e=T.useContext(w5);if(!e)throw new Error("Runtime is not connected");return e}function E7n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?S7n:"/favicon.svg")}function Qj(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function N7n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!Qj("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&n$(n),!Qj("orx:locale")&&t&&QD(t)&&JI(t)}function z7n(e){return e.includes("ssh ")&&e.includes("failed")}function Xj({host:e,overlay:n=!1}){return _.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:_.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[_.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:BL({host:Ae(e)})}),_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:H3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:mkt()})]})})}function Yj({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,L;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(L=s.installPaths)==null?void 0:L.cache]);async function f(){if(i){c(!0);try{await U4n(i)}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function p(B=!1){r(B?s.error:null),c(!0);try{await G4n()}catch(U){sn(U instanceof Error?U.message:String(U),"error")}finally{c(!1)}}async function m(){c(!0);try{await OI()}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{d(await DI())}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await LI(u),d(null)}catch(B){d(null),sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await V4n()}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const y=s.status==="applying"||o,x=s.status==="needsInstall",b=s.status==="needsUpdate",C=i&&x,N=["connecting","applying","reconnecting"].includes(s.status),z=s.status==="disconnected"&&s.error!==null&&z7n(s.error)&&t!==s.error&&!s.canStartNewHost,A=x?sSt():b?e8t():s.status==="applying"?I3t({host:Ae(s.host)}):s.status==="reconnecting"?b6t({host:Ae(s.host)}):s.status==="disconnected"?s.error?lkt({host:Ae(s.host)}):s.canStartNewHost?Akt({host:Ae(s.host)}):BL({host:Ae(s.host)}):g5t({host:Ae(s.host)}),j=s.error??(s.canStartNewHost?kkt():x?CSt({user:Ae(s.user??""),host:Ae(s.host)}):b?K7t({host:Ae(s.host)}):s.status==="applying"?A3t():s.status==="reconnecting"?f6t():s.status==="disconnected"?X5t():u5t());return _.jsxs(_.Fragment,{children:[_.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:_.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[_.jsxs("div",{className:"flex items-start gap-3",children:[N&&_.jsx(Et,{className:"mt-2"}),_.jsxs("div",{className:"min-w-0 flex-1",children:[_.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!z&&_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:j})]})]}),z&&_.jsx(t6,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&_.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[_.jsx("p",{className:"m-0 text-sm text-subtext",children:Ykt()}),[["binary",Ikt()],["database",Ukt()]].map(([B,U])=>_.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[U,_.jsx(qr,{value:i[B],onChange:H=>a({...i,[B]:H.target.value}),disabled:y,dir:"ltr"})]},B)),!s.error&&_.jsx("div",{className:"flex justify-end pt-1",children:_.jsx(Me,{variant:"primary",disabled:y,onClick:()=>void f(),children:y?_.jsxs(_.Fragment,{children:[_.jsx(Et,{})," ",_St()]}):b?Uz():ZL()})})]}),b&&i&&_.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&_.jsx(Me,{variant:"primary",disabled:y,onClick:()=>void f(),children:y?_.jsxs(_.Fragment,{children:[_.jsx(Et,{})," ",o8t()]}):Uz()})}),s.status==="disconnected"&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?_.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?_.jsx(Et,{}):null,s.error?Hz():$6t()]}):_.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(Et,{}):null,Hz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:_.jsx(Me,{disabled:o,onClick:()=>void m(),children:K3()})}),b&&s.error&&_.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[_.jsx(Me,{disabled:o,onClick:()=>void m(),children:K3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?_.jsx(Et,{}):null,Fz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[o?_.jsx(Et,{}):null,PL()]})]}),x&&s.error&&_.jsx("div",{className:"mt-6 flex justify-end",children:_.jsxs(Me,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(Et,{}):null,Fz()]})})]})}),u&&_.jsx(x$,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||d(null)},onConfirm:()=>void k()})]})}function j7n({children:e}){const n=T.useRef(null);return T.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),_.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function A7n(){T.useSyncExternalStore(CE,nW),T.useEffect(()=>CE(()=>{m7n(),y7n()}),[]);const e=oX({select:w=>w.pathname==="/remote-launch"}),[n,t]=T.useState(null),[r,s]=T.useState(null),i=T.useRef(!1),a=T.useRef(!1),o=T.useRef(!1),c=T.useRef(null),[u,d]=T.useState(null),f=dt({..._5n(),enabled:!e,refetchInterval:w=>{var k;return w.state.status==="error"||((k=w.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(T.useEffect(()=>{var v,y;if(e)return;const w=f.data;if(!w){s(((v=f.error)==null?void 0:v.message)??null);return}const k=C7n(w);rW(k),c.current!==null&&c.current!==k&&(i.current=!1,a.current=!1,o.current=!1),c.current=k,w.kind==="ssh"&&(o.current||(o.current=!0,N7n(w)),w.session.status==="connected"?(i.current=!0,a.current=!0,d(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((y=f.error)==null?void 0:y.message)??null)},[e,f.data,f.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";E7n(w),w&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return _.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[_.jsx(Et,{})," ",JSt()]});if(!n)return _.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?_.jsxs(_.Fragment,{children:[_.jsx("span",{children:r}),_.jsx(Me,{onClick:()=>location.reload(),children:Ks()})]}):_.jsx(Et,{})});if(n.kind==="local")return _.jsxs(w5,{value:n,children:[_.jsx(Sj,{}),_.jsx(X0,{})]},go()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?_.jsx(Xj,{host:n.session.host}):_.jsx(Yj,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:d});const m=n.session.status!=="connected"||r!==null;return _.jsxs("div",{className:"relative h-full",children:[_.jsx("div",{className:"h-full",inert:m,children:_.jsxs(w5,{value:n,children:[_.jsx(Sj,{}),_.jsx(X0,{})]},go()[1])}),m&&_.jsx(j7n,{children:r?_.jsx(Xj,{host:n.session.host,overlay:!0}):_.jsx(Yj,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:d})})]})}const vy=UQ()({component:A7n}),a6="orx:demo-read-sessions";function X$(){try{const e=JSON.parse(sessionStorage.getItem(a6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function T7n(e){try{const n=X$();n.add(e),sessionStorage.setItem(a6,JSON.stringify([...n]))}catch{}}function R7n(){try{sessionStorage.removeItem(a6)}catch{}}function Y$(e,n){const t=Mf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function M7n(e=Ze){var a;const[n,t]=await Promise.all([e.fetchQuery(Jm()),e.fetchQuery(Af())]),r=py((a=q$()??n.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?Z$(t[0].id,e):Promise.resolve("/projects");if(!r)return s();const i=Mf(r.split("?")[0]);return!(i!=null&&i.projectId)||!t.some(o=>o.id===i.projectId)||i.sessionId&&!Y$(r,await e.fetchQuery(pi(i.projectId)))?s():r}async function Z$(e,n=Ze){var d;const[t,r]=await Promise.all([n.fetchQuery(FS(e)),n.fetchQuery(pi(e))]),s=W$(e)??t,i=py(s==null?void 0:s.lastLocation);if(i&&((d=Mf(i.split("?")[0]))==null?void 0:d.projectId)===e&&Y$(i,r))return i;const a=r.find(f=>!f.archived&&!f.sideParentSessionId),o=Do(e)?i6(a==null?void 0:a.id,!(await n.fetchQuery(Jm())).tourCompleted):void 0,c=e_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return Cv(e,(a==null?void 0:a.id)??null,u)}function by(){return _.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[_.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),_.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function Iw(){return _.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[_.jsx(by,{}),"OpenResearch"]})}const Zj="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function O7n({cmd:e,onRun:n}){const[t,r]=T.useState(!1);return _.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[_.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&_.jsx("button",{type:"button",className:`cmd-inline-run ${Zj}`,onClick:n,"aria-label":dN({value:Ae(e)}),title:dN({value:Ae(e)}),children:_.jsx(NCn,{size:11})}),_.jsx("button",{type:"button",className:`cmd-inline-copy ${Zj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?Cf():TY({value:Ae(e)}),title:t?Cf():AS(),children:t?_.jsx(ti,{size:11,strokeWidth:3}):_.jsx(Wf,{size:11})})]})}function s_(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?_.jsx(O7n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function yy(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function Ph({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?_.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:_.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?_.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?_.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[_.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),_.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),_.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),_.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),_.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?_.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:_.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):_.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function k5(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function D7n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function Jj(e,n){return n||e==="preview"}function L7n(e,n){if(!e||e.needsConfigRepair)return null;const t=k5(e);return t===n?null:t}function J$({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>k5(e)),[c,u]=T.useState(0),[d,f]=T.useState(()=>D7n(e,k5(e))),[p,m]=T.useState(d==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,y]=T.useState(e.needsConfigRepair?e.agentNote??null:null),x=d==="running"||d==="checking",b=n[a].includes(` +`)?void 0:n[a];T.useEffect(()=>{i.current=!1;const N=s.current;return N==null||N.showModal(),()=>{i.current=!0,N==null||N.close()}},[]);const C=async()=>{f("checking"),y(null);try{const N=await jf(!0,!0);if(i.current)return;const z=N.find(A=>A.id===e.id);if(k((z==null?void 0:z.needsConfigRepair)??!1),z!=null&&z.agentReady&&(a!=="login"||z.authenticated))t==null||t(z),f("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(z!=null&&z.installed)&&!z.installBroken&&!z.needsConfigRepair&&z.authState==="needsLogin")o("login"),m(!0),f("running");else{const A=L7n(z,a);A&&(o(A),m(!1)),y((z==null?void 0:z.agentNote)??SL()),f("error")}}catch(N){if(i.current)return;y(N instanceof Error?N.message:String(N)),f("error")}};return _.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:N=>{N.key==="Escape"&&x&&N.preventDefault()},onCancel:N=>{N.preventDefault(),x||r()},children:[_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Ph,{harness:e.id,size:26}),_.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:mz({agent:e.name})})]}),d==="preview"?_.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?MQe({agent:e.name}):BXe({agent:e.name})}):b&&Jj(d,p)?_.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:s_(bXe({command:b}))}):null,d!=="running"&&d!=="preview"&&_.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&_.jsx(Et,{}),d==="success"?dQe({agent:e.name}):d==="error"?wL():aQe()]}),a==="install"&&n.requiresNpm&&_.jsx("p",{className:"text-sm text-subtext",children:fXe()}),Jj(d,p)&&_.jsx(gy,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:mz({agent:e.name}),command:b,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{y(N),f("error")}},`${a}-${c}`),v&&_.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:s_(v)}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&_.jsx(Me,{variant:"ghost",onClick:()=>{y(null),C()},children:tb()}),d==="error"&&!w&&_.jsx(Me,{onClick:()=>{y(null),m(!0),f("running"),u(N=>N+1)},children:Ks()}),_.jsx(Me,{variant:d==="success"?"primary":"default",onClick:r,children:d==="success"?mI():x?JWe():J0()}),d==="preview"&&_.jsx(Me,{variant:"primary",onClick:()=>{m(!0),f("running")},children:VWe()})]})]})}const I7n={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function im({variant:e="list",className:n,...t}){return _.jsx("span",{className:$s("title",I7n[e],n),...t})}const eA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Xu=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),E0=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),eB=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),$7n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),B7n=[{id:"AI/ML",label:C_t},{id:"Biology",label:R_t},{id:"Physics",label:V_t},{id:"Other",label:B_t}],P7n=["welcome","environment","profile"];function F7n({onDone:e,preferredAgent:n,remote:t}){var Be,Ke;const r=pn({mutationFn:Ce=>jwn(...Ce)}),[s,i]=T.useState(0);T.useEffect(()=>{const Ce=P7n[s];Ce&&Lu({name:"onboarding_step_viewed",step:Ce})},[s]);const a=dt(r_()),o=dt(D0()),c=dt(GI()),[u,d]=T.useState(null),[f,p]=T.useState(!1),m=T.useRef(null),w=T.useRef(""),k=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var Ce;return(Ce=m.current)==null?void 0:Ce.close()},[]);const y=a.data??null,x=(Be=o.data)==null?void 0:Be.gitVersion,b=!t&&((Ke=o.data)==null?void 0:Ke.gitInstallable)===!0,[C,N]=T.useState(!1),[z,A]=T.useState(null),[j,M]=T.useState(""),[D,L]=T.useState(null),[B,U]=T.useState(!1),[H,Q]=T.useState([]),[K,Z]=T.useState(""),[ee,$]=T.useState(""),[I,F]=T.useState([]),[q,V]=T.useState(""),[ie,oe]=T.useState([]),[ce,ne]=T.useState(!1),G=T.useRef(0),[ae,le]=T.useState(!1),[me,ve]=T.useState(!1),Ee=(y==null?void 0:y.some(Ce=>Ce.agentReady&&!Ce.catalogPending))??!1,Fe=(y==null?void 0:y.some(Ce=>Ce.catalogPending))??!1,We=x!=null,Oe=T.useRef(0),He=(Ce,Ye=!1)=>{const lt=++Oe.current;U(!0),le(!1),ve(!1);const je=()=>lt===Oe.current;Promise.allSettled([jf(Ce,Ye),Ze.fetchQuery({...D0(),staleTime:Ce?0:3e4})]).then(([Gt,Mt])=>{je()&&(Gt.status==="rejected"&&le(!0),Mt.status==="rejected"&&ve(!0))}).finally(()=>je()&&U(!1))};T.useEffect(()=>He(!1),[]);const ht=pn({mutationFn:Twn,onSuccess:()=>He(!0)}),xt=_.jsx(V7n,{pending:ht.isPending,error:ht.error,disabled:B,onInstall:()=>ht.mutate()});T.useEffect(()=>{if(y===null)return;const Ce=y.filter(Ye=>Ye.agentReady&&!Ye.catalogPending);L(Ye=>{var je;if(Ye&&Ce.some(Gt=>Gt.id===Ye))return Ye;const lt=n&&Ce.find(Gt=>Gt.id===n.harness);return(lt==null?void 0:lt.id)??((je=Ce[0])==null?void 0:je.id)??null})},[y,n]),T.useEffect(()=>le(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>ve(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{Ze.fetchQuery(d5n()).then(Ce=>{Q(Ce.researchAreas),Z(Ce.otherArea??""),$(Ce.background??""),F(Ce.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const Ce=q.trim();if(Ce.length<3){oe([]),ne(!1);return}const Ye=++G.current;ne(!0);const lt=setTimeout(()=>{Ze.fetchQuery(ZI(Ce)).then(je=>Ye===G.current&&oe(je)).catch(()=>Ye===G.current&&oe([])).finally(()=>Ye===G.current&&ne(!1))},350);return()=>clearTimeout(lt)},[q]);const Kt=Ce=>{const Ye=I.some(lt=>lt.paperId===Ce.paperId);F(lt=>lt.some(je=>je.paperId===Ce.paperId)?lt:[...lt,{paperId:Ce.paperId,title:tA(Ce.title)}]),V(""),oe([]),Ye||Ze.fetchQuery(d5(Ce.paperId)).then(lt=>{var Gt;const je=(Gt=lt.title)==null?void 0:Gt.trim();je&&F(Mt=>Mt.map(Jt=>Jt.paperId===Ce.paperId?{...Jt,title:je}:Jt))}).catch(()=>{})},Ut=Ce=>F(Ye=>Ye.filter(lt=>lt.paperId!==Ce)),Ht=Ce=>{Q(Ye=>Ye.includes(Ce)?Ye.filter(lt=>lt!==Ce):[...Ye,Ce])},$e=H.length>0&&(!H.includes("Other")||K.trim().length>0),ot=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const Ce=(async()=>{await new Promise((je,Gt)=>{const Mt=location.protocol==="https:"?"wss:":"ws:",Jt=new WebSocket(`${Mt}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);Jt.binaryType="arraybuffer";const rn=new TextDecoder,nn=new B$.Terminal;nn.onData(wt=>{Jt.readyState===WebSocket.OPEN&&Jt.send(new TextEncoder().encode(wt))}),m.current=Jt;let Nt=!1;Jt.onmessage=wt=>{if(wt.data instanceof ArrayBuffer){nn.write(new Uint8Array(wt.data)),w.current=(w.current+rn.decode(wt.data,{stream:!0})).slice(-65536);return}if(typeof wt.data!="string")return;let Bn;try{Bn=JSON.parse(wt.data)}catch{return}typeof Bn!="object"||Bn===null||!("type"in Bn)||(Bn.type==="complete"?(Nt=!0,Jt.close(),je()):Bn.type==="error"&&(Jt.close(),Gt(new Error("error"in Bn&&typeof Bn.error=="string"?Bn.error:wL()))))},Jt.onerror=()=>{Jt.close(),Gt(new Error(sb()))},Jt.onclose=()=>{nn.dispose(),m.current=null,Nt||Gt(new Error(sb()))}});const lt=(await jf(!0,!0)).find(je=>je.id==="opencode"&&je.agentReady);if(!lt)throw new Error(Kpt());return L("opencode"),lt})();return k.current=Ce,Ce.catch(()=>{}),Ce};T.useEffect(()=>{t||v.current||!(y!=null&&y.length)||y.some(Ce=>Ce.catalogPending)||!y.every(Ce=>!Ce.installed&&!Ce.installBroken)||ot()},[y,t]),T.useEffect(()=>{s===1&&f&&i(2)},[s,f]);const ct=()=>{i(f?2:1)},ye=async(Ce="complete")=>{var Ye;if(!(C||Ce==="complete"&&(!$e||!We))){N(!0),A(null),M("");try{const lt=f?await ot():y==null?void 0:y.find(Mt=>Mt.id===D&&Mt.agentReady&&!Mt.catalogPending);if(!lt)throw new Error(SL());if(Ce==="setup")return;const je=q7n(lt,((Ye=lt.models[0])==null?void 0:Ye.id)??null),Gt=await r.mutateAsync([je,{researchAreas:H,otherArea:H.includes("Other")?K:null,background:ee||null,papers:I}]);e(Gt.project,Gt.selection)}catch(lt){f&&(k.current=null);const je=lt instanceof Error?lt.message:String(lt);A(je),M([w.current,je].filter(Boolean).join(` -`))}finally{C(!1)}}};return f.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&f.jsx(J$,{harness:u,commands:c.data[u.id],onReady:Ce=>{D(Ce.id)},onClose:()=>{d(null)}}),f.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?f.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[f.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[f.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:f.jsx(Lw,{})}),f.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:i_t()})]}),f.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[f.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),f.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:ddt()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:ogt()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:yht()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Emt()})]})}),f.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:f.jsxs("span",{children:[f.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:eht()}),f.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Wgt()})]})})]})]}),f.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:f.jsxs(Oe,{variant:"primary",size:"large",onClick:qt,disabled:L&&y===null,children:[L&&y===null?f.jsx(Ct,{}):null,Dz()," ",f.jsx(kv,{size:20})]})})]}):s===1?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(Lw,{}),f.jsx("span",{children:Mmt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Cft()}),f.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:bpt()}),y!==null&&!be&&!Ee&&f.jsx("p",{className:eA,children:fmt()}),y!==null&&be&&M===null&&f.jsx("p",{className:eA,children:Rft()}),(x===null||le)&&f.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[f.jsx(nA,{gitVersion:x,error:le}),le?f.jsx("p",{className:Iw,children:ww()}):f.jsx("p",{className:Iw,children:Lz()})]}),f.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:y!==null?y.map(Ce=>{var me;return f.jsx(k7n,{h:Ce,remote:t,selected:M===Ce.id,onSelect:()=>D(Ce.id),commands:(me=c.data)==null?void 0:me[Ce.id],onSetup:()=>d(Ce)},Ce.id)}):G?f.jsx("div",{className:Xu,children:ww()}):f.jsxs(Ur,{className:"py-2",children:[f.jsx(Ct,{})," ",Mdt()]})}),c.isError&&f.jsxs("p",{className:Xu,children:[PQe()," ",f.jsx(Oe,{variant:"ghost",onClick:()=>void c.refetch(),children:Ks()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>i(0),children:[f.jsx(fb,{size:12})," ",Oz()]}),f.jsxs(Oe,{variant:"ghost",onClick:()=>Me(!0,!0),disabled:L,children:[f.jsx(xo,{size:12,className:L?"animate-[spin_0.9s_linear_infinite]":""})," ",eb()]}),f.jsx("div",{className:"flex-1"}),f.jsxs(Oe,{variant:"primary",onClick:()=>i(2),disabled:L||!be||M===null||!Fe,title:L||!be&&Ee?Ogt():be?M===null?adt():le?Zpt():x===void 0?Ngt():x===null?Oht():void 0:imt(),children:[Dz()," ",f.jsx(kv,{size:13})]})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[f.jsx(Lw,{}),!_&&f.jsx("span",{children:Pmt()})]}),f.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:Kmt()}),f.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:f.jsxs("div",{className:eB,children:[f.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[f.jsx("legend",{children:Fgt()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Jft()}),f.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:g7n.map(Ce=>f.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[f.jsx("input",{type:"checkbox",checked:U.includes(Ce.id),onChange:()=>wt(Ce.id),disabled:b}),f.jsx("span",{children:Ce.label()})]},Ce.id))}),U.includes("Other")&&f.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:Ce=>K(Ce.target.value),disabled:b,placeholder:egt(),"aria-label":Mpt()})]}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:f0t()}),f.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:Z,onChange:Ce=>ee(Ce.target.value),disabled:b,rows:4,placeholder:Pdt()}),f.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:i0t()}),f.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:f_t()}),f.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[f.jsx("input",{id:"onb-paper-search",value:F,onChange:Ce=>q(Ce.target.value),disabled:b,placeholder:C0t()}),oe?f.jsx("div",{className:Xu,children:R0t()}):V.length>0?f.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:V.map(Ce=>f.jsxs("button",{type:"button",onClick:()=>Ue(Ce),disabled:b,children:[f.jsx(sm,{children:tA(Ce.title)}),f.jsx("span",{className:"id",children:Ce.paperId})]},Ce.paperId))}):null]}),$.length>0&&f.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(Ce=>f.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[f.jsx(sm,{children:Ce.title||Ce.paperId}),f.jsx("span",{className:"id",children:Ce.paperId}),f.jsx("button",{type:"button","aria-label":$J({name:Ae(Ce.paperId)}),onClick:()=>dt(Ce.paperId),disabled:b,children:f.jsx(ur,{size:12})})]},Ce.paperId))})]})}),!Ft&&f.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:U.length===0?Vft():Edt()}),_&&!Fe&&f.jsxs("div",{className:"mt-5",role:"status",children:[f.jsx(nA,{gitVersion:x,error:le}),f.jsx("p",{className:Iw,children:le?ww():Lz()}),f.jsx(Oe,{onClick:()=>Me(!0,!0),disabled:L,children:eb()})]}),f.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[f.jsxs(Oe,{variant:"ghost",onClick:()=>i(_?0:1),disabled:b,children:[f.jsx(fb,{size:12})," ",Oz()]}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{variant:"primary",onClick:()=>void $e(),disabled:b||!Fe||!_&&M===null||!Ft,children:b?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{})," ",Z0t()]}):f.jsxs(f.Fragment,{children:[oht()," ",f.jsx(kv,{size:13})]})})]}),M===null&&!_&&f.jsx("p",{className:m7n,children:t1t()}),N&&f.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[f.jsx(VS,{size:16,className:"shrink-0 text-accent-red"}),f.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),_&&f.jsx(Oe,{size:"small",onClick:()=>void $e(Ft&&Fe?"complete":"setup"),disabled:b,children:Ks()}),_&&f.jsx(Oe,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:b,onClick:()=>{p(!1),z(null),i(1)},children:Bft()}),f.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:Kdt()}),f.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:A||N})]})]})]})})]})}function tA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function y7n(e){return e.catalogPending?{tone:"warning",label:Ef()}:e.authCheckFailed?{tone:"warning",label:kw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||by(e)?Xm():e.authMethod==="local"||!e.authenticated?RS():bmt()}:e.installed?e.installBroken?{tone:"warning",label:Nht()}:e.authMethod==="local"?{tone:"warning",label:TL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:kw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:kw()}:e.authState==="unsupported"?{tone:"warning",label:ygt()}:e.installed?{tone:"warning",label:AL()}:{tone:"neutral",label:Iz()}:{tone:"neutral",label:Iz()}}function x7n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:ly(e,n).defaultId}}function w7n({harness:e}){return f.jsx(Ph,{harness:e,size:26})}function k7n({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var k;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),o=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&o,u=o&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=y7n(e),_=t&&!e.authCheckFailed?{tone:"success",label:B0t()}:d,p=(k=e.version)==null?void 0:k.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),w=f.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[f.jsx(w7n,{harness:e.id}),f.jsxs("span",{className:"flex flex-col gap-1",children:[f.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&f.jsx(ch,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&f.jsx(ch,{tone:_.tone,children:_.label})]})]}),c?f.jsxs(Oe,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:iXe(),children:[f.jsx(Ko,{size:14}),!e.installed||e.installBroken?EQe():e.authState==="unsupported"?RXe():kL()]}):f.jsx(ch,{tone:_.tone,children:_.label})]});return e.agentReady?f.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[w,e.id!=="opencode"&&f.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{})," ",Fht()]}):f.jsxs(f.Fragment,{children:[by(e)??e.account??(e.authMethod==="apiKey"?TS():null),e.plan?` · ${e.plan}`:""]})}),m&&f.jsx("div",{className:Xu,children:m}),e.authCheckFailed&&e.agentNote&&f.jsx("div",{className:Xu,children:s_(e.agentNote)})]}):f.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[w,e.authState==="unsupported"&&p&&f.jsx("div",{className:Xu,children:p}),!c&&e.agentNote&&f.jsx("div",{className:`${Xu} [&_code]:whitespace-pre-wrap break-words`,children:s_(e.agentNote)})]})}function nA({gitVersion:e,error:n}){return f.jsxs("div",{className:eB,children:[f.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[f.jsx("span",{className:"onb-card-name font-semibold text-base",children:Wht()}),f.jsx(ch,{tone:e?"success":n||e===null?"danger":"warning",children:e?RS():n?ift():e===null?jL():Ef()})]}),(e||!n&&e===void 0)&&f.jsx("div",{className:Xu,children:e??vft()})]})}function tB(){const e=T.useSyncExternalStore(l5n,vj,vj);return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":H3()}),!e&&f.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[f.jsx(VS,{size:13,className:"shrink-0 text-accent-amber"}),f.jsx("span",{dir:"auto",className:"min-w-0",children:H3()})]})]})}function S7n({onClose:e,onConfigureSsh:n}){var v,y,x;const t=vn({mutationFn:b=>x4n(...b)}),r=ft(UI()),s=ft(U3n()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=T.useState(""),u=i?null:((y=r.error)==null?void 0:y.message)??((x=s.error)==null?void 0:x.message)??null,[d,_]=T.useState(null),p=T.useRef(null);sp(p,e);async function m(b){const C="__ORX_DESKTOP__"in window,N=C?null:window.open("/remote-launch","_blank");if(!C&&!N){tn(CSt(),"error");return}_(b);try{const z=await t.mutateAsync([b,{theme:j5n(),locale:E()}]);N?N.location.replace(z.gatewayUrl):window.open(z.gatewayUrl,"_blank"),e()}catch(z){N==null||N.close(),tn(z instanceof Error?z.message:String(z),"error")}finally{_(null)}}const w=i==null?void 0:i.filter(b=>b.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(b=>[b.host,b]));return ni.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&e()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[f.jsx(At,{className:"absolute end-3.5 top-3.5","aria-label":r5t(),onClick:e,children:f.jsx(ur,{size:16})}),f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:V3()}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:u5t()}),f.jsx(qr,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:b=>c(b.target.value),placeholder:qz(),"aria-label":qz()})]}),f.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?f.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?f.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[f.jsx(Ct,{})," ",rI()]}):(w==null?void 0:w.length)===0?f.jsx("p",{className:"m-3 text-sm text-subtext",children:Ykt()}):w==null?void 0:w.map(b=>{const C=k.get(b.host);return f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===b.host,onClick:()=>void m(b.host),children:[f.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:b.host}),d===b.host?f.jsx(Ct,{}):C?f.jsx("span",{className:"text-sm text-subtext",children:_St()}):null]},b.host)})}),f.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:f.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[f.jsx(L$,{size:15}),pI()]})})]})}),document.body)}function pb({size:e=16,className:n}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[f.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),f.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const C7n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",E7n="/assets/ollama-logo-Bt9O-2K_.png",N7n="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nB={id:"lmstudio",label:"LM Studio",icon:C7n,url:"http://127.0.0.1:1234/v1"},Ev=[nB,{id:"omlx",label:"oMLX",icon:N7n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:E7n,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function rB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var K,Z;const s=ft({...J3n(),enabled:!t}),i=ft(r_()),a=(K=i.data)==null?void 0:K.find(ee=>ee.id==="opencode"),[o,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[d,_]=T.useState("lmstudio"),p=Ev.find(ee=>ee.id===d)??nB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:y,model:x,contextWindow:b,error:C}=k,N=p.id==="ollama"?"":k.apiKey,z=ee=>{w($=>({...$,[p.id]:{...$[p.id]??k,...ee}}))},A=vn({mutationFn:R3n}),j=vn({mutationFn:async ee=>{var F;const $=await M3n(ee);if(!((F=(await jf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===$.model)))throw new Error(aet());return $}}),M=vn({mutationFn:D3n}),D=Number(b),L=A.isPending||j.isPending,B=(ee={})=>z({models:[],model:null,error:null,...ee}),U=async()=>{B();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:N});z({models:ee.models,model:ee.models[0]??null})}catch(ee){z({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(x){z({error:null});try{const ee=await j.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:x,contextWindow:D});u(),n==null||n(ee.model)}catch(ee){z({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch($){tn($ instanceof Error?$.message:String($),"error")}};return f.jsxs(f.Fragment,{children:[!t&&f.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":wz(),children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("h3",{className:"text-base font-medium",children:wz()}),f.jsxs(Oe,{disabled:L,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[f.jsx(Qf,{size:14}),CL()]})]}),s.error&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),f.jsx("div",{className:"space-y-3",children:(Z=s.data)==null?void 0:Z.map(ee=>f.jsx(z7n,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map($=>$.id))??[],checking:i.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:i.isError||!i.data,disabled:L||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),o&&f.jsx(j7n,{busy:L,onClose:u,footer:f.jsxs(Oe,{variant:"primary",disabled:L||!e||y.length>0&&(!x||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(y.length>0?H():U()),children:[L&&f.jsx(Ct,{}),y.length>0?mtt():KJe()]}),children:f.jsxs("div",{className:"space-y-4",children:[!e&&f.jsxs("div",{className:"text-sm text-text",children:[f.jsx("p",{children:ntt()}),f.jsx($h,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:Qet()})]}),f.jsx(Lc,{choices:Ev,value:d,title:xz(),header:xz(),variant:"field",floating:!0,dropDown:!0,disabled:L,renderLabel:ee=>f.jsxs(f.Fragment,{children:[ee.id==="openai-compatible"?jS():ee.label,ee.id==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:EL()})]}),renderIcon:ee=>{var I;const $=(I=Ev.find(F=>F.id===ee.id))==null?void 0:I.icon;return $?f.jsx("img",{src:$,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):f.jsx(T$,{size:14,className:"shrink-0"})},onSelect:_}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:PJe()}),f.jsx(qr,{value:v,disabled:L,onChange:ee=>{B({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&f.jsxs("details",{className:"text-sm text-text",children:[f.jsx("summary",{className:"cursor-pointer",children:KL()}),f.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[f.jsx("span",{children:p.id==="lmstudio"?Dtt():ltt()}),f.jsx(qr,{type:"password",autoComplete:"off",value:N,disabled:L,onChange:ee=>B({apiKey:ee.target.value})})]})]},p.id),y.length>0&&f.jsxs(f.Fragment,{children:[f.jsx(Lc,{choices:y.map(ee=>({id:ee,label:ee})),value:x,searchPlaceholder:yst(),title:M0(),header:M0(),variant:"field",floating:!0,dropDown:!0,disabled:L,onSelect:ee=>{z({model:ee})}}),f.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[f.jsx("span",{children:xet()}),f.jsx(qr,{type:"number",min:4096,step:1024,value:b,disabled:L,onChange:ee=>{z({contextWindow:ee.target.value})}})]}),f.jsx("p",{className:"text-sm text-subtext",children:jet()})]}),C&&f.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function z7n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=vn({mutationFn:async()=>{try{await O3n(e.id)}finally{await jf(!0)}}}),c=Ev.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),_=o.isPending||r,p=s,m=d;return f.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[f.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[f.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?f.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):f.jsx(T$,{size:20,className:"mt-0.5 shrink-0"}),f.jsxs("div",{className:"min-w-0 space-y-1",children:[f.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),f.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?jS():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&f.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:EL()})," · ",e.baseUrl]})]})]}),f.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[f.jsx("span",{role:"status",children:f.jsx(Zt,{variant:_||p?"default":m?"success":"warning",children:_?Da():p?iI():m?het():ho()})}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsxs(Oe,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[f.jsx(xo,{size:14}),eb()]}),f.jsx(At,{"aria-label":Het({name:e.name}),disabled:i||o.isPending,onClick:a,children:f.jsx(Yf,{size:14})})]})]})]}),o.error&&!m&&f.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function j7n({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return sp(s,i,"input"),ni.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:f.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[f.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:f.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:CL()})}),f.jsx(At,{className:"absolute end-3.5 top-3.5","aria-label":Nf(),onClick:i,disabled:e,children:f.jsx(ur,{size:16})}),f.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[f.jsx(Oe,{onClick:i,disabled:e,children:Nf()}),t]})]})}),document.body)}const sB=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),$w=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),Iu={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function A7n(e){var r,s;const n=e.find(i=>i.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:ob(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:ly(n,t).defaultId}}function ra(e){const[n,t]=T.useState(!1),r=T.useRef(null);return T.useEffect(()=>{if(!n)return;const s=a=>{var o,c;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},i=a=>{var o;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",i,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function T7n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:_=!1,openRequest:p=0,className:m}){var Ye,Me,Ue,dt,wt,Ft,Ht,qt;const{data:w=R7n}=ft(r_()),k=Gm(),[v,y]=T.useState(!1),x=T.useRef(null),b=T.useRef(null),{open:C,setOpen:N,ref:z}=ra(x),[A,j]=T.useState(""),[M,D]=T.useState("root"),L=()=>{N(!1),D("root"),j("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),j(""),N(!0))},[p,N]),T.useEffect(()=>{var $e;C&&(M==="reasoning"||M==="speed"||M==="permissions")&&(($e=b.current)==null||$e.focus())},[C,M]);const U=T.useMemo(()=>{const $e=A.trim().toLowerCase();return(_&&e?w.filter(Ce=>Ce.id===e.harness):w).map(Ce=>{let me=Ce.models;return $e?me=me.filter(ze=>`${ze.id} ${xv(ze)}`.toLowerCase().includes($e)):(Ce.id==="opencode"||Ce.id==="cursor"||Ce.id==="antigravity")&&(me=me.slice(0,5)),{harness:Ce,models:me,hidden:$e?0:Ce.models.length-me.length}})},[w,A,_,e]),H=($e,ot)=>{var me;const Ce=(e==null?void 0:e.harness)===$e.id;n({harness:$e.id,model:ot,serviceTier:ob($e,ot,Ce?e==null?void 0:e.serviceTier:null),permissionMode:Ce?e.permissionMode:((me=$e.options)==null?void 0:me.defaultPermissionMode)??null,reasoningLevel:FI($e,ot,Ce&&$e.models.some(ze=>ze.id===ot)?e.reasoningLevel:null)}),L()},Q=(e==null?void 0:e.model)!=null?(Ye=w.find($e=>$e.id===e.harness))==null?void 0:Ye.models.find($e=>$e.id===e.model):void 0,K=e?e.model?Q?xv(Q):`${t5(e.model)} · ${Ez()}`:P3():M0(),Z=(e==null?void 0:e.reasoningLevel)??o??((Me=a[0])==null?void 0:Me.id),ee=(Ue=a.find($e=>$e.id===Z))==null?void 0:Ue.label,$=(e==null?void 0:e.permissionMode)??s??((dt=r[0])==null?void 0:dt.id),I=(wt=r.find($e=>$e.id===$))==null?void 0:wt.label,F=(e==null?void 0:e.harness)==="opencode"?fit():Ort(),q=w.find($e=>$e.id===(e==null?void 0:e.harness)),V=PI(q,e==null?void 0:e.model),ie=ob(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),oe=(Ft=V.find($e=>$e.id===ie))==null?void 0:Ft.label,ce=$e=>{c==null||c($e),L()},ne=$e=>{i==null||i($e),L()},G=[{id:"agentic",label:Ont(),description:Fnt()},{id:"copilot",label:Wnt(),description:trt()}],ae=(Ht=G.find($e=>$e.id===u))==null?void 0:Ht.label,le=$e=>{const ot=G.find(Ce=>Ce.id===$e);ot&&(d==null||d(ot.id)),L()},ge=$e=>{e&&n({...e,serviceTier:$e}),L()},be=($e,ot,Ce)=>f.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>D(Ce),children:[f.jsx("span",{className:"flex-1",children:$e}),ot&&f.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ot}),f.jsx(yo,{size:14,className:"shrink-0 text-muted"})]}),Ee=$e=>f.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[f.jsx(At,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":IL(),onClick:()=>{D("root"),j("")},children:f.jsx(C$,{size:15})}),f.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:$e}),M==="models"&&f.jsx(At,{type:"button",size:"small","aria-label":Q3(),onClick:()=>{L(),t()},children:f.jsx(dy,{size:15,"aria-hidden":"true"})})]}),Fe=($e,ot,Ce,me)=>f.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:$e.map(ze=>f.jsxs(on,{onClick:()=>me(ze.id),children:[f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[ze.label,ze.id===Ce&&f.jsxs("span",{className:"font-normal text-muted",children:[" ",NL()]})]}),ze.description&&f.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:ze.description})]}),ze.id===ot&&f.jsx(ti,{size:13})]},ze.id))});return f.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:z,children:[f.jsxs("button",{ref:x,type:"button",className:$s("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:rY({label:`${K}${ee?` · ${ee}`:""}${oe?` · ${oe}`:""}`}),"aria-haspopup":"menu","aria-expanded":C,onClick:()=>{C?L():(D("root"),N(!0))},children:[ie==="priority"?f.jsx(RCn,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?f.jsx(Ph,{harness:e.harness,size:14}):null,ie==="priority"&&f.jsxs("span",{className:"sr-only",children:[Frt()," "]}),f.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,ee&&f.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),f.jsx(qc,{size:14,className:"shrink-0 text-muted"})]}),C&&f.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&f.jsxs("div",{className:"model-root-menu p-1",children:[be(M0(),K,"models"),a.length>0&&be(F,ee,"reasoning"),V.length>0&&be(Cz(),oe,"speed"),r.length>0&&be(Sz(),I,"permissions"),d&&be(kz(),ae,"autonomy")]}),M==="models"&&f.jsxs(f.Fragment,{children:[Ee(M0()),f.jsx("input",{autoFocus:!0,type:"text",placeholder:Nst(),value:A,onChange:$e=>j($e.target.value)}),f.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[U.map(({harness:$e,models:ot,hidden:Ce})=>f.jsxs("div",{className:"[&_.model-item]:ps-6",children:[f.jsxs("div",{className:sB,children:[f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx(Ph,{harness:$e.id,size:14}),$e.name]}),!$e.agentReady&&f.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:$e.catalogPending?Ef():f.jsxs(f.Fragment,{children:[f.jsx(Fj,{size:10})," ",ho()]})})]}),$e.agentReady?f.jsxs(f.Fragment,{children:[!A.trim()&&f.jsxs(on,{onClick:()=>H($e,null),children:[f.jsx("span",{children:P3()}),(e==null?void 0:e.harness)===$e.id&&(e==null?void 0:e.model)===null&&f.jsx(ti,{size:13})]}),$e.models.length===0&&$e.agentNote&&f.jsx("div",{className:$w,children:s_($e.agentNote)}),ot.map(me=>f.jsxs(on,{title:me.id,onClick:()=>H($e,me.id),children:[f.jsx("span",{children:xv(me)}),(e==null?void 0:e.harness)===$e.id&&(e==null?void 0:e.model)===me.id&&f.jsx(ti,{size:13})]},me.id)),A.trim().length>0&&!$e.models.some(me=>me.id===A.trim())&&f.jsx(on,{onClick:()=>H($e,A.trim()),children:f.jsxs("span",{children:[iit({id:Ae(A.trim())})," · ",Ez()]})})]}):f.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:$e.catalogPending?Ef():$e.agentNote?s_($e.agentNote):dst()}),$e.id==="opencode"&&f.jsx(on,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var me;L(),(me=x.current)==null||me.focus(),y(!0)},children:f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[xnt(),f.jsx(Qf,{size:14,"aria-hidden":"true"})]})}),$e.agentReady&&Ce>0&&f.jsx("div",{className:$w,children:ast({count:ln(Ce)})})]},$e.id)),w.length===0&&f.jsx("div",{className:$w,children:Nrt()})]}),_&&e&&w.length>1&&f.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[f.jsx(Fj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Ost()]})]}),M==="reasoning"&&f.jsxs(f.Fragment,{children:[Ee(F),Fe(a,Z,o,ce)]}),M==="permissions"&&f.jsxs(f.Fragment,{children:[Ee(Sz()),Fe(r,$,s,ne)]}),M==="autonomy"&&f.jsxs(f.Fragment,{children:[Ee(kz()),Fe(G,u,Z3,le)]}),M==="speed"&&f.jsxs(f.Fragment,{children:[Ee(Cz()),Fe(V,ie??void 0,"default",ge)]})]}),v&&f.jsx(rB,{dialogOnly:!0,installed:((qt=w.find($e=>$e.id==="opencode"))==null?void 0:qt.installed)??!1,onClose:()=>y(!1),onConnected:$e=>{var Ce;const ot=(Ce=k.getQueryData(r_().queryKey))==null?void 0:Ce.find(me=>me.id==="opencode");ot&&(!_||(e==null?void 0:e.harness)==="opencode")&&H(ot,$e)}})]})}function Lc({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:_,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,K;const v=T.useRef(null),{open:y,setOpen:x,ref:b}=ra(v),C=T.useRef(null),[N,z]=T.useState("");if(T.useLayoutEffect(()=>{var I;const Z=C.current,ee=b.current;if(!y||!m||!Z||!ee)return;Z.matches(":popover-open")||(Z.showPopover(),(I=Z.querySelector("input"))==null||I.focus());const $=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,V=F.top-12,ie=Math.min(380,Z.scrollHeight),oe=i?q>=ie||q>=V:VV;Z.style.width=`${F.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,oe?q:V))}px`,Z.style.left=`${F.left}px`,Z.style.top=`${oe?F.bottom+4:F.top-Z.getBoundingClientRect().height-4}px`};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[y,m,i,N,e.length,b]),e.length===0)return null;const A=n??t??((Q=e[0])==null?void 0:Q.id)??null,j=e.find(Z=>Z.id===A),M=e.find(Z=>Z.id===t),D=o==="bare"&&(M==null?void 0:M.id)===ab?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(N.toLowerCase())),U=(j==null?void 0:j.label)??((K=e[0])==null?void 0:K.label)??"",H=Z=>{var ee;w(Z),x(!1),(ee=v.current)==null||ee.focus()};return f.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:b,children:[f.jsxs("button",{ref:v,type:"button",className:$s(o==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${o==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":y,disabled:a,onClick:()=>{z(""),x(Z=>!Z)},children:[f.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(_==null?void 0:_(j)),f.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??U:U})]}),f.jsx(qc,{size:12})]}),y&&f.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(Z=>Z.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&f.jsx("div",{className:sB,children:r}),d&&f.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:N,onChange:Z=>z(Z.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),f.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&f.jsxs(f.Fragment,{children:[f.jsxs(on,{type:"button",onClick:()=>H(D.id),children:[f.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(D),f.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,f.jsx("span",{className:"option-default text-muted font-normal",children:crt()})]})]}),A===D.id&&f.jsx(ti,{size:13})]}),f.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,ee)=>f.jsxs(on,{type:"button",onClick:()=>H(Z.id),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(Z),f.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsxs("span",{children:[(p==null?void 0:p(Z))??Z.label,!D&&Z.id===t&&f.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",NL()]})]}),Z.description&&f.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?f.jsx(ti,{size:13}):u&&f.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},Z.id))]})]})]})}const R7n=[];function S5({runtime:e,corner:n=!1}){const[t,r]=T.useState(!1),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),d=ra();async function _(){if(c){o(!0);try{await LI(c),u(null)}catch(p){u(null),tn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[f.jsx("div",{className:"text-sm font-medium text-text",children:L3t({host:Ae(e.session.host),user:Ae(e.session.user??"")})}),f.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]}),f.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[f.jsx(on,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await OI(),d.setOpen(!1)}catch(p){tn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?j3t():K3()}),f.jsx(Jm,{content:vSt(),className:"me-2 shrink-0 text-subtext",children:f.jsx(WS,{size:15})})]}),f.jsx(on,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await DI()),d.setOpen(!1)}catch(p){tn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:PL()})]}),n?f.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[f.jsx(pb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:Sw({host:Ae(e.session.host)})})]}):f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(At,{size:"small","aria-label":Sw({host:Ae(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:f.jsx(pb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:Sw({host:Ae(e.session.host)})}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]})]})]}),c&&f.jsx(x$,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void _()})]})}const mb="code-source-text",iB="code-source-wrap",aB="file-view-gutter text-right text-muted select-none";function oB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const M7n={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},O7n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function C5(e){const n=e.trim().toLowerCase();return M7n[n]??n}function o6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=O7n[n];if(t)return C5(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:C5(n.slice(r+1))}Uc.displayName="clike";Uc.aliases=[];function Uc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}ng.displayName="c";ng.aliases=[];function ng(e){e.register(Uc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}yy.displayName="cpp";yy.aliases=[];function yy(e){e.register(ng),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}c6.displayName="arduino";c6.aliases=["ino"];function c6(e){e.register(yy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}l6.displayName="bash";l6.aliases=["sh","shell"];function l6(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,o=0;o>/g,function(q,V){return"(?:"+F[+V]+")"})}function r(I,F,q){return RegExp(t(I,F),"")}function s(I,F){for(var q=0;q>/g,function(){return"(?:"+I+")"});return I.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(I){return"\\b(?:"+I.trim().replace(/ /g,"|")+")\\b"}var o=a(i.typeDeclaration),c=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),d=a(i.type+" "+i.typeDeclaration+" "+i.other),_=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,w=t(/<<0>>(?:\s*<<1>>)?/.source,[m,_]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,w]),v=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[_,p,v]),b=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},z=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,C]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,w]),lookbehind:!0,inside:N},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,d,m]),inside:N}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:N},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:N,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:N,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,_]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(_),alias:"class-name",inside:N}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[o,w,m,C,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[w,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:N},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+z,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),L=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,L]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[L]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,H]);function $(I,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[I]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:$(K,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:$(ee,Z)}],char:{pattern:RegExp(z),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}rg.displayName="markup";rg.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function rg(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:s}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}ap.displayName="css";ap.aliases=[];function ap(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}_6.displayName="diff";_6.aliases=[];function _6(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +`))}finally{N(!1)}}};return _.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&_.jsx(J$,{harness:u,commands:c.data[u.id],onReady:Ce=>{L(Ce.id)},onClose:()=>{d(null)}}),_.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?_.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[_.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[_.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:_.jsx(Iw,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:i_t()})]}),_.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[_.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),_.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:ddt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:zgt()})]})}),_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:yht()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Kmt()})]})}),_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:eht()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:p1t()})]})})]})]}),_.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:_.jsxs(Me,{variant:"primary",size:"large",onClick:ct,disabled:B&&y===null,children:[B&&y===null?_.jsx(Et,{}):null,Dz()," ",_.jsx(Sv,{size:20})]})})]}):s===1?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[_.jsx(Iw,{}),_.jsx("span",{children:egt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Cft()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:Ppt()}),y!==null&&!Ee&&!Fe&&_.jsx("p",{className:eA,children:Mmt()}),y!==null&&Ee&&D===null&&_.jsx("p",{className:eA,children:Rft()}),(x===null||me)&&_.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[_.jsx(nA,{gitVersion:x,error:me}),me?_.jsx("p",{className:E0,children:kw()}):b?xt:_.jsx("p",{className:E0,children:Lz()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:y!==null?y.map(Ce=>{var Ye;return _.jsx(G7n,{h:Ce,remote:t,selected:D===Ce.id,onSelect:()=>L(Ce.id),commands:(Ye=c.data)==null?void 0:Ye[Ce.id],onSetup:()=>d(Ce)},Ce.id)}):ae?_.jsx("div",{className:Xu,children:kw()}):_.jsxs(Ur,{className:"py-2",children:[_.jsx(Et,{})," ",Mdt()]})}),c.isError&&_.jsxs("p",{className:Xu,children:[PQe()," ",_.jsx(Me,{variant:"ghost",onClick:()=>void c.refetch(),children:Ks()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Me,{variant:"ghost",onClick:()=>i(0),children:[_.jsx(db,{size:12})," ",Oz()]}),_.jsxs(Me,{variant:"ghost",onClick:()=>He(!0,!0),disabled:B,children:[_.jsx(xo,{size:12,className:B?"animate-[spin_0.9s_linear_infinite]":""})," ",tb()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(Me,{variant:"primary",onClick:()=>i(2),disabled:B||!Ee||D===null||!We,title:B||!Ee&&Fe?t1t():Ee?D===null?adt():me?b0t():x===void 0?Wgt():x===null?Wht():void 0:Emt(),children:[Dz()," ",_.jsx(Sv,{size:13})]})]})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[_.jsx(Iw,{}),!f&&_.jsx("span",{children:ogt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:hgt()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:eB,children:[_.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[_.jsx("legend",{children:c1t()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Jft()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:B7n.map(Ce=>_.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[_.jsx("input",{type:"checkbox",checked:H.includes(Ce.id),onChange:()=>Ht(Ce.id),disabled:C}),_.jsx("span",{children:Ce.label()})]},Ce.id))}),H.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:K,onChange:Ce=>Z(Ce.target.value),disabled:C,placeholder:xgt(),"aria-label":e0t()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:M0t()}),_.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:Ce=>$(Ce.target.value),disabled:C,rows:4,placeholder:Pdt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:E0t()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:f_t()}),_.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[_.jsx("input",{id:"onb-paper-search",value:q,onChange:Ce=>V(Ce.target.value),disabled:C,placeholder:V0t()}),ce?_.jsx("div",{className:Xu,children:J0t()}):ie.length>0?_.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:ie.map(Ce=>_.jsxs("button",{type:"button",onClick:()=>Kt(Ce),disabled:C,children:[_.jsx(im,{children:tA(Ce.title)}),_.jsx("span",{className:"id",children:Ce.paperId})]},Ce.paperId))}):null]}),I.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:I.map(Ce=>_.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[_.jsx(im,{children:Ce.title||Ce.paperId}),_.jsx("span",{className:"id",children:Ce.paperId}),_.jsx("button",{type:"button","aria-label":$J({name:Ae(Ce.paperId)}),onClick:()=>Ut(Ce.paperId),disabled:C,children:_.jsx(_r,{size:12})})]},Ce.paperId))})]})}),!$e&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:H.length===0?Vft():Edt()}),f&&!We&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(nA,{gitVersion:x,error:me}),me?_.jsx("p",{className:E0,children:kw()}):b?xt:_.jsx("p",{className:E0,children:Lz()}),_.jsx(Me,{className:"mt-2.5",onClick:()=>He(!0,!0),disabled:B,children:tb()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Me,{variant:"ghost",onClick:()=>i(f?0:1),disabled:C,children:[_.jsx(db,{size:12})," ",Oz()]}),_.jsx("div",{className:"flex-1"}),_.jsx(Me,{variant:"primary",onClick:()=>void ye(),disabled:C||!We||!f&&D===null||!$e,children:C?_.jsxs(_.Fragment,{children:[_.jsx(Et,{})," ",bmt()]}):_.jsxs(_.Fragment,{children:[oht()," ",_.jsx(Sv,{size:13})]})})]}),D===null&&!f&&_.jsx("p",{className:$7n,children:w1t()}),z&&_.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[_.jsx(VS,{size:16,className:"shrink-0 text-accent-red"}),_.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:z}),f&&_.jsx(Me,{size:"small",onClick:()=>void ye($e&&We?"complete":"setup"),disabled:C,children:Ks()}),f&&_.jsx(Me,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:C,onClick:()=>{p(!1),A(null),i(1)},children:Bft()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:Kdt()}),_.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:j||z})]})]})]})})]})}function tA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function H7n(e){return e.catalogPending?{tone:"warning",label:Ef()}:e.authCheckFailed?{tone:"warning",label:Sw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||yy(e)?Ym():e.authMethod==="local"||!e.authenticated?RS():Pmt()}:e.installed?e.installBroken?{tone:"warning",label:Nht()}:e.authMethod==="local"?{tone:"warning",label:TL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:Sw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:Sw()}:e.authState==="unsupported"?{tone:"warning",label:Fgt()}:e.installed?{tone:"warning",label:AL()}:{tone:"neutral",label:Iz()}:{tone:"neutral",label:Iz()}}function q7n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:uy(e,n).defaultId}}function U7n({harness:e}){return _.jsx(Ph,{harness:e,size:26})}function G7n({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:i}){var k;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),o=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&o,u=o&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=H7n(e),f=t&&!e.authCheckFailed?{tone:"success",label:amt()}:d,p=(k=e.version)==null?void 0:k.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),w=_.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[_.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[_.jsx(U7n,{harness:e.id}),_.jsxs("span",{className:"flex flex-col gap-1",children:[_.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&_.jsx(ch,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&_.jsx(ch,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(Me,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:iXe(),children:[_.jsx(Ko,{size:14}),!e.installed||e.installBroken?EQe():e.authState==="unsupported"?RXe():kL()]}):_.jsx(ch,{tone:f.tone,children:f.label})]});return e.agentReady?_.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[w,e.id!=="opencode"&&_.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?_.jsxs(_.Fragment,{children:[_.jsx(Et,{})," ",cpt()]}):_.jsxs(_.Fragment,{children:[yy(e)??e.account??(e.authMethod==="apiKey"?TS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Xu,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Xu,children:s_(e.agentNote)})]}):_.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[w,e.authState==="unsupported"&&p&&_.jsx("div",{className:Xu,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Xu} [&_code]:whitespace-pre-wrap break-words`,children:s_(e.agentNote)})]})}function V7n({pending:e,error:n,disabled:t,onInstall:r}){return _.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[_.jsx("p",{className:E0,children:Fht()}),_.jsxs(Me,{variant:"primary",onClick:r,disabled:e||t,children:[e&&_.jsx(Et,{}),e?tpt():Oht()]}),n&&_.jsx("p",{className:"text-accent-red text-sm m-0",children:n.message})]})}function nA({gitVersion:e,error:n}){return _.jsxs("div",{className:eB,children:[_.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[_.jsx("span",{className:"onb-card-name font-semibold text-base",children:ppt()}),_.jsx(ch,{tone:e?"success":n||e===null?"danger":"warning",children:e?RS():n?ift():e===null?jL():Ef()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Xu,children:e??vft()})]})}function tB(){const e=T.useSyncExternalStore(T5n,vj,vj);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":H3()}),!e&&_.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[_.jsx(VS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:H3()})]})]})}function K7n({onClose:e,onConfigureSsh:n}){var v,y,x;const t=pn({mutationFn:b=>q4n(...b)}),r=dt(UI()),s=dt(f5n()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=T.useState(""),u=i?null:((y=r.error)==null?void 0:y.message)??((x=s.error)==null?void 0:x.message)??null,[d,f]=T.useState(null),p=T.useRef(null);sp(p,e);async function m(b){const C="__ORX_DESKTOP__"in window,N=C?null:window.open("/remote-launch","_blank");if(!C&&!N){sn(VSt(),"error");return}f(b);try{const z=await t.mutateAsync([b,{theme:Y5n(),locale:E()}]);N?N.location.replace(z.gatewayUrl):window.open(z.gatewayUrl,"_blank"),e()}catch(z){N==null||N.close(),sn(z instanceof Error?z.message:String(z),"error")}finally{f(null)}}const w=i==null?void 0:i.filter(b=>b.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(b=>[b.host,b]));return ni.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&e()},children:_.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":S5t(),onClick:e,children:_.jsx(_r,{size:16})}),_.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[_.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:V3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:T5t()}),_.jsx(qr,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:b=>c(b.target.value),placeholder:qz(),"aria-label":qz()})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?_.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?_.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[_.jsx(Et,{})," ",rI()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:vSt()}):w==null?void 0:w.map(b=>{const C=k.get(b.host);return _.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===b.host,onClick:()=>void m(b.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:b.host}),d===b.host?_.jsx(Et,{}):C?_.jsx("span",{className:"text-sm text-subtext",children:RSt()}):null]},b.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(L$,{size:15}),pI()]})})]})}),document.body)}function mb({size:e=16,className:n}){return _.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[_.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),_.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const W7n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",Q7n="/assets/ollama-logo-Bt9O-2K_.png",X7n="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nB={id:"lmstudio",label:"LM Studio",icon:W7n,url:"http://127.0.0.1:1234/v1"},Nv=[nB,{id:"omlx",label:"oMLX",icon:X7n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:Q7n,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function rB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var K,Z;const s=dt({...x5n(),enabled:!t}),i=dt(r_()),a=(K=i.data)==null?void 0:K.find(ee=>ee.id==="opencode"),[o,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[d,f]=T.useState("lmstudio"),p=Nv.find(ee=>ee.id===d)??nB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:y,model:x,contextWindow:b,error:C}=k,N=p.id==="ollama"?"":k.apiKey,z=ee=>{w($=>({...$,[p.id]:{...$[p.id]??k,...ee}}))},A=pn({mutationFn:e5n}),j=pn({mutationFn:async ee=>{var F;const $=await t5n(ee);if(!((F=(await jf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===$.model)))throw new Error(aet());return $}}),M=pn({mutationFn:r5n}),D=Number(b),L=A.isPending||j.isPending,B=(ee={})=>z({models:[],model:null,error:null,...ee}),U=async()=>{B();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:N});z({models:ee.models,model:ee.models[0]??null})}catch(ee){z({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(x){z({error:null});try{const ee=await j.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:x,contextWindow:D});u(),n==null||n(ee.model)}catch(ee){z({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch($){sn($ instanceof Error?$.message:String($),"error")}};return _.jsxs(_.Fragment,{children:[!t&&_.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":wz(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:wz()}),_.jsxs(Me,{disabled:L,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Qf,{size:14}),CL()]})]}),s.error&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),_.jsx("div",{className:"space-y-3",children:(Z=s.data)==null?void 0:Z.map(ee=>_.jsx(Y7n,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map($=>$.id))??[],checking:i.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:i.isError||!i.data,disabled:L||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),o&&_.jsx(Z7n,{busy:L,onClose:u,footer:_.jsxs(Me,{variant:"primary",disabled:L||!e||y.length>0&&(!x||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(y.length>0?H():U()),children:[L&&_.jsx(Et,{}),y.length>0?mtt():KJe()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:ntt()}),_.jsx($h,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:Qet()})]}),_.jsx(Lc,{choices:Nv,value:d,title:xz(),header:xz(),variant:"field",floating:!0,dropDown:!0,disabled:L,renderLabel:ee=>_.jsxs(_.Fragment,{children:[ee.id==="openai-compatible"?jS():ee.label,ee.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:EL()})]}),renderIcon:ee=>{var I;const $=(I=Nv.find(F=>F.id===ee.id))==null?void 0:I.icon;return $?_.jsx("img",{src:$,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):_.jsx(T$,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:PJe()}),_.jsx(qr,{value:v,disabled:L,onChange:ee=>{B({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:KL()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?Dtt():ltt()}),_.jsx(qr,{type:"password",autoComplete:"off",value:N,disabled:L,onChange:ee=>B({apiKey:ee.target.value})})]})]},p.id),y.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(Lc,{choices:y.map(ee=>({id:ee,label:ee})),value:x,searchPlaceholder:yst(),title:O0(),header:O0(),variant:"field",floating:!0,dropDown:!0,disabled:L,onSelect:ee=>{z({model:ee})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:xet()}),_.jsx(qr,{type:"number",min:4096,step:1024,value:b,disabled:L,onChange:ee=>{z({contextWindow:ee.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:jet()})]}),C&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function Y7n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=pn({mutationFn:async()=>{try{await n5n(e.id)}finally{await jf(!0)}}}),c=Nv.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=o.isPending||r,p=s,m=d;return _.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[_.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[_.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?_.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):_.jsx(T$,{size:20,className:"mt-0.5 shrink-0"}),_.jsxs("div",{className:"min-w-0 space-y-1",children:[_.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),_.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?jS():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:EL()})," · ",e.baseUrl]})]})]}),_.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[_.jsx("span",{role:"status",children:_.jsx(Zt,{variant:f||p?"default":m?"success":"warning",children:f?Da():p?iI():m?het():ho()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(Me,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[_.jsx(xo,{size:14}),tb()]}),_.jsx(Rt,{"aria-label":Het({name:e.name}),disabled:i||o.isPending,onClick:a,children:_.jsx(Yf,{size:14})})]})]})]}),o.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function Z7n({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return sp(s,i,"input"),ni.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&i()},children:_.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[_.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:_.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:CL()})}),_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Nf(),onClick:i,disabled:e,children:_.jsx(_r,{size:16})}),_.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[_.jsx(Me,{onClick:i,disabled:e,children:Nf()}),t]})]})}),document.body)}const sB=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),$w=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),Iu={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function J7n(e){var r,s;const n=e.find(i=>i.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:cb(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:uy(n,t).defaultId}}function ra(e){const[n,t]=T.useState(!1),r=T.useRef(null);return T.useEffect(()=>{if(!n)return;const s=a=>{var o,c;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},i=a=>{var o;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",i,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function e8n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:f=!1,openRequest:p=0,className:m}){var We,Oe,He,ht,xt,Kt,Ut,Ht;const{data:w=t8n}=dt(r_()),k=Vm(),[v,y]=T.useState(!1),x=T.useRef(null),b=T.useRef(null),{open:C,setOpen:N,ref:z}=ra(x),[A,j]=T.useState(""),[M,D]=T.useState("root"),L=()=>{N(!1),D("root"),j("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),j(""),N(!0))},[p,N]),T.useEffect(()=>{var $e;C&&(M==="reasoning"||M==="speed"||M==="permissions")&&(($e=b.current)==null||$e.focus())},[C,M]);const U=T.useMemo(()=>{const $e=A.trim().toLowerCase();return(f&&e?w.filter(ct=>ct.id===e.harness):w).map(ct=>{let ye=ct.models;return $e?ye=ye.filter(Be=>`${Be.id} ${wv(Be)}`.toLowerCase().includes($e)):(ct.id==="opencode"||ct.id==="cursor"||ct.id==="antigravity")&&(ye=ye.slice(0,5)),{harness:ct,models:ye,hidden:$e?0:ct.models.length-ye.length}})},[w,A,f,e]),H=($e,ot)=>{var ye;const ct=(e==null?void 0:e.harness)===$e.id;n({harness:$e.id,model:ot,serviceTier:cb($e,ot,ct?e==null?void 0:e.serviceTier:null),permissionMode:ct?e.permissionMode:((ye=$e.options)==null?void 0:ye.defaultPermissionMode)??null,reasoningLevel:FI($e,ot,ct&&$e.models.some(Be=>Be.id===ot)?e.reasoningLevel:null)}),L()},Q=(e==null?void 0:e.model)!=null?(We=w.find($e=>$e.id===e.harness))==null?void 0:We.models.find($e=>$e.id===e.model):void 0,K=e?e.model?Q?wv(Q):`${t5(e.model)} · ${Ez()}`:P3():O0(),Z=(e==null?void 0:e.reasoningLevel)??o??((Oe=a[0])==null?void 0:Oe.id),ee=(He=a.find($e=>$e.id===Z))==null?void 0:He.label,$=(e==null?void 0:e.permissionMode)??s??((ht=r[0])==null?void 0:ht.id),I=(xt=r.find($e=>$e.id===$))==null?void 0:xt.label,F=(e==null?void 0:e.harness)==="opencode"?fit():Ort(),q=w.find($e=>$e.id===(e==null?void 0:e.harness)),V=PI(q,e==null?void 0:e.model),ie=cb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),oe=(Kt=V.find($e=>$e.id===ie))==null?void 0:Kt.label,ce=$e=>{c==null||c($e),L()},ne=$e=>{i==null||i($e),L()},G=[{id:"agentic",label:Ont(),description:Fnt()},{id:"copilot",label:Wnt(),description:trt()}],ae=(Ut=G.find($e=>$e.id===u))==null?void 0:Ut.label,le=$e=>{const ot=G.find(ct=>ct.id===$e);ot&&(d==null||d(ot.id)),L()},me=$e=>{e&&n({...e,serviceTier:$e}),L()},ve=($e,ot,ct)=>_.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>D(ct),children:[_.jsx("span",{className:"flex-1",children:$e}),ot&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ot}),_.jsx(yo,{size:14,className:"shrink-0 text-muted"})]}),Ee=$e=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx(Rt,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":IL(),onClick:()=>{D("root"),j("")},children:_.jsx(C$,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:$e}),M==="models"&&_.jsx(Rt,{type:"button",size:"small","aria-label":Q3(),onClick:()=>{L(),t()},children:_.jsx(hy,{size:15,"aria-hidden":"true"})})]}),Fe=($e,ot,ct,ye)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:$e.map(Be=>_.jsxs(un,{onClick:()=>ye(Be.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[Be.label,Be.id===ct&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",NL()]})]}),Be.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Be.description})]}),Be.id===ot&&_.jsx(ti,{size:13})]},Be.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:z,children:[_.jsxs("button",{ref:x,type:"button",className:$s("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:rY({label:`${K}${ee?` · ${ee}`:""}${oe?` · ${oe}`:""}`}),"aria-haspopup":"menu","aria-expanded":C,onClick:()=>{C?L():(D("root"),N(!0))},children:[ie==="priority"?_.jsx(e7n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Ph,{harness:e.harness,size:14}):null,ie==="priority"&&_.jsxs("span",{className:"sr-only",children:[Frt()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,ee&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),_.jsx(qc,{size:14,className:"shrink-0 text-muted"})]}),C&&_.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&_.jsxs("div",{className:"model-root-menu p-1",children:[ve(O0(),K,"models"),a.length>0&&ve(F,ee,"reasoning"),V.length>0&&ve(Cz(),oe,"speed"),r.length>0&&ve(Sz(),I,"permissions"),d&&ve(kz(),ae,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Ee(O0()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:Nst(),value:A,onChange:$e=>j($e.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[U.map(({harness:$e,models:ot,hidden:ct})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:sB,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Ph,{harness:$e.id,size:14}),$e.name]}),!$e.agentReady&&_.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:$e.catalogPending?Ef():_.jsxs(_.Fragment,{children:[_.jsx(Fj,{size:10})," ",ho()]})})]}),$e.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(un,{onClick:()=>H($e,null),children:[_.jsx("span",{children:P3()}),(e==null?void 0:e.harness)===$e.id&&(e==null?void 0:e.model)===null&&_.jsx(ti,{size:13})]}),$e.models.length===0&&$e.agentNote&&_.jsx("div",{className:$w,children:s_($e.agentNote)}),ot.map(ye=>_.jsxs(un,{title:ye.id,onClick:()=>H($e,ye.id),children:[_.jsx("span",{children:wv(ye)}),(e==null?void 0:e.harness)===$e.id&&(e==null?void 0:e.model)===ye.id&&_.jsx(ti,{size:13})]},ye.id)),A.trim().length>0&&!$e.models.some(ye=>ye.id===A.trim())&&_.jsx(un,{onClick:()=>H($e,A.trim()),children:_.jsxs("span",{children:[iit({id:Ae(A.trim())})," · ",Ez()]})})]}):_.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:$e.catalogPending?Ef():$e.agentNote?s_($e.agentNote):dst()}),$e.id==="opencode"&&_.jsx(un,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ye;L(),(ye=x.current)==null||ye.focus(),y(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[xnt(),_.jsx(Qf,{size:14,"aria-hidden":"true"})]})}),$e.agentReady&&ct>0&&_.jsx("div",{className:$w,children:ast({count:_n(ct)})})]},$e.id)),w.length===0&&_.jsx("div",{className:$w,children:Nrt()})]}),f&&e&&w.length>1&&_.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[_.jsx(Fj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Ost()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Ee(F),Fe(a,Z,o,ce)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Ee(Sz()),Fe(r,$,s,ne)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Ee(kz()),Fe(G,u,Z3,le)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Ee(Cz()),Fe(V,ie??void 0,"default",me)]})]}),v&&_.jsx(rB,{dialogOnly:!0,installed:((Ht=w.find($e=>$e.id==="opencode"))==null?void 0:Ht.installed)??!1,onClose:()=>y(!1),onConnected:$e=>{var ct;const ot=(ct=k.getQueryData(r_().queryKey))==null?void 0:ct.find(ye=>ye.id==="opencode");ot&&(!f||(e==null?void 0:e.harness)==="opencode")&&H(ot,$e)}})]})}function Lc({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,K;const v=T.useRef(null),{open:y,setOpen:x,ref:b}=ra(v),C=T.useRef(null),[N,z]=T.useState("");if(T.useLayoutEffect(()=>{var I;const Z=C.current,ee=b.current;if(!y||!m||!Z||!ee)return;Z.matches(":popover-open")||(Z.showPopover(),(I=Z.querySelector("input"))==null||I.focus());const $=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,V=F.top-12,ie=Math.min(380,Z.scrollHeight),oe=i?q>=ie||q>=V:VV;Z.style.width=`${F.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,oe?q:V))}px`,Z.style.left=`${F.left}px`,Z.style.top=`${oe?F.bottom+4:F.top-Z.getBoundingClientRect().height-4}px`};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[y,m,i,N,e.length,b]),e.length===0)return null;const A=n??t??((Q=e[0])==null?void 0:Q.id)??null,j=e.find(Z=>Z.id===A),M=e.find(Z=>Z.id===t),D=o==="bare"&&(M==null?void 0:M.id)===ob?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(N.toLowerCase())),U=(j==null?void 0:j.label)??((K=e[0])==null?void 0:K.label)??"",H=Z=>{var ee;w(Z),x(!1),(ee=v.current)==null||ee.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:b,children:[_.jsxs("button",{ref:v,type:"button",className:$s(o==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${o==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":y,disabled:a,onClick:()=>{z(""),x(Z=>!Z)},children:[_.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[j&&(f==null?void 0:f(j)),_.jsx("span",{className:"truncate",children:j?(p==null?void 0:p(j))??U:U})]}),_.jsx(qc,{size:12})]}),y&&_.jsxs("div",{ref:C,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(Z=>Z.description)?"min-w-80":""} ${o==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&_.jsx("div",{className:sB,children:r}),d&&_.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:N,onChange:Z=>z(Z.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),_.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&_.jsxs(_.Fragment,{children:[_.jsxs(un,{type:"button",onClick:()=>H(D.id),children:[_.jsxs("span",{className:"inline-flex items-center gap-2",children:[f==null?void 0:f(D),_.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,_.jsx("span",{className:"option-default text-muted font-normal",children:crt()})]})]}),A===D.id&&_.jsx(ti,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,ee)=>_.jsxs(un,{type:"button",onClick:()=>H(Z.id),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[f==null?void 0:f(Z),_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[(p==null?void 0:p(Z))??Z.label,!D&&Z.id===t&&_.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",NL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(ti,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},Z.id))]})]})]})}const t8n=[];function S5({runtime:e,corner:n=!1}){const[t,r]=T.useState(!1),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),d=ra();async function f(){if(c){o(!0);try{await LI(c),u(null)}catch(p){u(null),sn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[_.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[_.jsx("div",{className:"text-sm font-medium text-text",children:r5t({host:Ae(e.session.host),user:Ae(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(un,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await OI(),d.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?X3t():K3()}),_.jsx(eg,{content:BSt(),className:"me-2 shrink-0 text-subtext",children:_.jsx(WS,{size:15})})]}),_.jsx(un,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await DI()),d.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:PL()})]}),n?_.jsxs(Me,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[_.jsx(mb,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:Cw({host:Ae(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(Rt,{size:"small","aria-label":Cw({host:Ae(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:_.jsx(mb,{size:14,className:"shrink-0"})}),_.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[_.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:Cw({host:Ae(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]})]})]}),c&&_.jsx(x$,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const gb="code-source-text",iB="code-source-wrap",aB="file-view-gutter text-right text-muted select-none";function oB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const n8n={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},r8n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function C5(e){const n=e.trim().toLowerCase();return n8n[n]??n}function o6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=r8n[n];if(t)return C5(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:C5(n.slice(r+1))}Uc.displayName="clike";Uc.aliases=[];function Uc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}rg.displayName="c";rg.aliases=[];function rg(e){e.register(Uc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}xy.displayName="cpp";xy.aliases=[];function xy(e){e.register(rg),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}c6.displayName="arduino";c6.aliases=["ino"];function c6(e){e.register(xy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}l6.displayName="bash";l6.aliases=["sh","shell"];function l6(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,o=0;o>/g,function(q,V){return"(?:"+F[+V]+")"})}function r(I,F,q){return RegExp(t(I,F),"")}function s(I,F){for(var q=0;q>/g,function(){return"(?:"+I+")"});return I.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(I){return"\\b(?:"+I.trim().replace(/ /g,"|")+")\\b"}var o=a(i.typeDeclaration),c=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),d=a(i.type+" "+i.typeDeclaration+" "+i.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,w=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,w]),v=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),b=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},z=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,j=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,C]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,w]),lookbehind:!0,inside:N},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,d,m]),inside:N}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:N},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:N,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:N,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:N}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[o,w,m,C,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[w,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:N},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+z,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),L=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,L]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[L]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,H]);function $(I,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[I]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[K]),lookbehind:!0,greedy:!0,inside:$(K,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:$(ee,Z)}],char:{pattern:RegExp(z),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}sg.displayName="markup";sg.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function sg(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:s}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}ap.displayName="css";ap.aliases=[];function ap(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}_6.displayName="diff";_6.aliases=[];function _6(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| -|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}f6.displayName="go";f6.aliases=[];function f6(e){e.register(Uc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}d6.displayName="ini";d6.aliases=[];function d6(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}h6.displayName="java";h6.aliases=[];function h6(e){e.register(Uc),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}p6.displayName="regex";p6.aliases=[];function p6(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+r.source+")",o=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":i,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}m6.displayName="json";m6.aliases=["webmanifest"];function m6(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}g6.displayName="kotlin";g6.aliases=["kt","kts"];function g6(e){e.register(Uc),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}v6.displayName="less";v6.aliases=[];function v6(e){e.register(ap),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}b6.displayName="lua";b6.aliases=[];function b6(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}y6.displayName="makefile";y6.aliases=[];function y6(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}x6.displayName="yaml";x6.aliases=["yml"];function x6(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}w6.displayName="markdown";w6.aliases=["md"];function w6(e){e.register(rg),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(o){return o=o.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+o+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(o){["url","bold","italic","strike","code-snippet"].forEach(function(c){o!==c&&(n.languages.markdown[o].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,_=u.length;d<_;d++){var p=u[d];if(p.type!=="code"){c(p.content);continue}var m=p.content[1],w=p.content[3];if(m&&w&&m.type==="code-language"&&w.type==="code-block"&&typeof m.content=="string"){var k=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase();var v="language-"+k;w.alias?typeof w.alias=="string"?w.alias=[w.alias,v]:w.alias.push(v):w.alias=[v]}}}c(o.tokens)}),n.hooks.add("wrap",function(o){if(o.type==="code-block"){for(var c="",u=0,d=o.classes.length;u]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}S6.displayName="perl";S6.aliases=[];function S6(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}wy.displayName="markup-templating";wy.aliases=[];function wy(e){e.register(rg),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,i,a){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(i,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=o.length,d;r.code.indexOf(d=t(s,u))!==-1;)++u;return o[u]=c,d}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var i=0,a=Object.keys(r.tokenStack);function o(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var _=a[i],p=r.tokenStack[_],m=typeof d=="string"?d:d.content,w=t(s,_),k=m.indexOf(w);if(k>-1){++i;var v=m.substring(0,k),y=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),x=m.substring(k+w.length),b=[];v&&b.push.apply(b,o([v])),b.push(y),x&&b.push.apply(b,o([x])),typeof d=="string"?c.splice.apply(c,[u,1].concat(b)):d.content=b}}else d.content&&o(d.content)}return c}o(r.tokens)}}})})(e)}C6.displayName="php";C6.aliases=[];function C6(e){e.register(wy),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];n.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}E6.displayName="python";E6.aliases=["py"];function E6(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}N6.displayName="r";N6.aliases=[];function N6(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}z6.displayName="ruby";z6.aliases=["rb"];function z6(e){e.register(Uc),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}j6.displayName="rust";j6.aliases=[];function j6(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}A6.displayName="sass";A6.aliases=[];function A6(e){e.register(ap),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}T6.displayName="scss";T6.aliases=[];function T6(e){e.register(ap),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}R6.displayName="sql";R6.aliases=[];function R6(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}M6.displayName="swift";M6.aliases=[];function M6(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}O6.displayName="typescript";O6.aliases=["ts"];function O6(e){e.register(xy),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}ky.displayName="basic";ky.aliases=[];function ky(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}D6.displayName="vbnet";D6.aliases=[];function D6(e){e.register(ky),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class sg{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}sg.prototype.normal={};sg.prototype.property={};sg.prototype.space=void 0;function cB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new sg(t,r,n)}function im(e){return e.toLowerCase()}class sa{constructor(n,t){this.attribute=t,this.property=n}}sa.prototype.attribute="";sa.prototype.booleanish=!1;sa.prototype.boolean=!1;sa.prototype.commaOrSpaceSeparated=!1;sa.prototype.commaSeparated=!1;sa.prototype.defined=!1;sa.prototype.mustUseProperty=!1;sa.prototype.number=!1;sa.prototype.overloadedBoolean=!1;sa.prototype.property="";sa.prototype.spaceSeparated=!1;sa.prototype.space=void 0;let D7n=0;const nn=Jf(),xs=Jf(),E5=Jf(),Je=Jf(),yr=Jf(),yf=Jf(),ka=Jf();function Jf(){return 2**++D7n}const N5=Object.freeze(Object.defineProperty({__proto__:null,boolean:nn,booleanish:xs,commaOrSpaceSeparated:ka,commaSeparated:yf,number:Je,overloadedBoolean:E5,spaceSeparated:yr},Symbol.toStringTag,{value:"Module"})),Bw=Object.keys(N5);class L6 extends sa{constructor(n,t,r,s){let i=-1;if(super(n,t),rA(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&P7n.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(sA,H7n);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!sA.test(i)){let a=i.replace(B7n,F7n);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=L6}return new s(r,n)}function F7n(e){return"-"+e.toLowerCase()}function H7n(e){return e.charAt(1).toUpperCase()}const mB=cB([lB,L7n,fB,dB,hB],"html"),Sy=cB([lB,I7n,fB,dB,hB],"svg");function iA(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const a=t.slice(s,r).trim();(a||!i)&&n.push(a),s=r+1,r=t.indexOf(",",s)}return n}function q7n(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const aA=/[#.]/g;function U7n(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function J7n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function e8n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function uA(e){return e8n(e)||bB(e)}const _A=document.createElement("i");function am(e){const n="&"+e+";";_A.innerHTML=n;const t=_A.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const t8n=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function n8n(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,_=(c?c.column:0)||1,p=w(),m;for(i--;++i<=e.length;)if(m===10&&(_=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const y=e.charCodeAt(i+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){o+=String.fromCharCode(m),_++;continue}const x=i+1;let b=x,C=x,N;if(y===35){C=++b;const U=e.charCodeAt(C);U===88||U===120?(N="hexadecimal",C=++b):N="decimal"}else N="named";let z="",A="",j="";const M=N==="named"?uA:N==="decimal"?bB:J7n;for(C--;++C<=e.length;){const U=e.charCodeAt(C);if(!M(U))break;j+=String.fromCharCode(U),N==="named"&&Z7n.includes(j)&&(z=j,A=am(j))}let D=e.charCodeAt(C)===59;if(D){C++;const U=N==="named"?am(j):!1;U&&(z=j,A=U)}let L=1+C-x,B="";if(!(!D&&t.nonTerminated===!1))if(!j)N!=="named"&&k(4,L);else if(N==="named"){if(D&&!A)k(5,1);else if(z!==j&&(C=b+z.length,L=1+C-b,D=!1),!D){const U=z?1:3;if(t.attribute){const H=e.charCodeAt(C);H===61?(k(U,L),A=""):uA(H)?A="":k(U,L)}else k(U,L)}B=A}else{D||k(2,L);let U=Number.parseInt(j,N==="hexadecimal"?16:10);if(r8n(U))k(7,L),B="�";else if(U in lA)k(6,L),B=lA[U];else{let H="";s8n(U)&&k(6,L),U>65535&&(U-=65536,H+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),B=H+String.fromCharCode(U)}}if(B){v(),p=w(),i=C-1,_+=C-x+1,s.push(B);const U=w();U.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:U},e.slice(x-1,C)),p=U}else j=e.slice(x-1,C),o+=j,_+=j.length,i=C-1}else m===10&&(d++,a++,_=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),_++);return s.join("");function w(){return{line:d,column:_,offset:i+((c?c.offset:0)||0)}}function k(y,x){let b;t.warning&&(b=w(),b.column+=x,b.offset+=x,t.warning.call(t.warningContext||void 0,t8n[y],b,y))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:w()}),o="")}}function r8n(e){return e>=55296&&e<=57343||e>1114111}function s8n(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var i8n=0,D1={},Vs={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++i8n}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Vs.util.type(n)){case"Object":if(s=Vs.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(n[i],t));return r;case"Array":return s=Vs.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(a,o){r[o]=e(a,t)}),r);default:return n}}},languages:{plain:D1,plaintext:D1,text:D1,txt:D1,extend:function(e,n){var t=Vs.util.clone(Vs.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Vs.languages;var s=r[e],i={};for(var a in s)if(s.hasOwnProperty(a)){if(a==n)for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);t.hasOwnProperty(a)||(i[a]=s[a])}var c=r[e];return r[e]=i,Vs.languages.DFS(Vs.languages,function(u,d){d===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=Vs.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=Vs.util.type(o);c==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):c==="Array"&&!s[i(o)]&&(s[i(o)]=!0,e(o,t,a,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Vs.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Vs.tokenize(r.code,r.grammar),Vs.hooks.run("after-tokenize",r),D0.stringify(Vs.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new a8n;return Nv(s,s.head,e),yB(e,s,n,s.head,0),c8n(s)},hooks:{all:{},add:function(e,n){var t=Vs.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Vs.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:D0};function D0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function fA(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var i=s[1].length;s.index+=i,s[0]=s[0].slice(i)}return s}function yB(e,n,t,r,s,i){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var o=t[a];o=Array.isArray(o)?o:[o];for(var c=0;c=i.reach);y+=v.value.length,v=v.next){var x=v.value;if(n.length>e.length)return;if(!(x instanceof D0)){var b=1,C;if(p){if(C=fA(k,y,e,_),!C||C.index>=e.length)break;var j=C.index,N=C.index+C[0].length,z=y;for(z+=v.value.length;j>=z;)v=v.next,z+=v.value.length;if(z-=v.value.length,y=z,v.value instanceof D0)continue;for(var A=v;A!==n.tail&&(zi.reach&&(i.reach=B);var U=v.prev;D&&(U=Nv(n,U,D),y+=D.length),o8n(n,U,b);var H=new D0(a,d?Vs.tokenize(M,d):M,m,M);if(v=Nv(n,U,H),L&&Nv(n,v,L),b>1){var Q={cause:a+","+c,reach:B};yB(e,n,t,v.prev,y,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function a8n(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function Nv(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function o8n(e,n,t){for(var r=n.next,s=0;st)return null;try{return Pt.highlight(e,n).children}catch{return null}}function SB(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:f.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(SB)},n)}function m8n(e,n,t=3e5){var r;return((r=kB(e,n,t))==null?void 0:r.map(SB))??e}function CB(e,n,t=3e5){const r=kB(e,n,t);if(!r)return e.split(` -`);const s=[];let i=[];const a=[];let o=0;const c=d=>{let _=d;for(let p=a.length-1;p>=0;p--)_=f.jsx("span",{className:a[p],children:_},o++);i.push(_)},u=d=>{var _;if(d.type==="text"){(d.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}d.type==="element"&&(a.push((((_=d.properties)==null?void 0:_.className)??[]).join(" ")),(d.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function EB(e){return Array.isArray(e)?e.length===0:e===""}function NB({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:d}){const _=T.useMemo(()=>CB(e,o6(i)),[e,i]),{ruleCh:p,codeCh:m}=oB(_.length),w=T.useRef(null),k=T.useRef(null),v=()=>{const C=w.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},y=T.useRef(u);T.useLayoutEffect(()=>{const C=w.current;!C||!y.current||(C.scrollTop=y.current.top,C.scrollLeft=y.current.left,v())},[i]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const C=w.current;if(!C||!a||o===void 0)return;const N=e.split(` -`),z=Math.min(Math.max(Math.trunc(a),1),N.length);let A=0;for(let D=0;D{if(!s){if((C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"){C.preventDefault(),t();return}if(C.key==="Tab"){C.preventDefault();const N=C.currentTarget,{selectionStart:z,selectionEnd:A}=N,j=e.slice(0,z)+" "+e.slice(A);n(j),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=z+1})}}},b=`absolute inset-0 m-0 py-3.5 pe-4 ${mb} ${iB} [scrollbar-gutter:stable]`;return f.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${mb}`,children:[f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),f.jsx("div",{ref:k,className:`file-view-code ${b} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:_.map((C,N)=>f.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[f.jsx("span",{className:`${aB} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),EB(C)?f.jsx("br",{}):C]},N))}),f.jsx("textarea",{ref:w,className:`file-view-editarea ${b} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:C=>{s||n(C.target.value)},onScroll:C=>{v(),d==null||d({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:x,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function zB({onClose:e,onSaved:n}){const t=H3n(),r=ft(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var b;return((b=r.data)==null?void 0:b.content)??""}),c=!s&&r.error?r.error.message:null,u=vn({mutationFn:({content:b,previous:C})=>g4n(b,C)}),[d,_]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),w=s!==null&&a!==s.content,k=T.useRef(w),v=T.useRef(d);k.current=w,v.current=d,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const y=()=>{v.current||k.current&&!window.confirm(Vun())||m.current()};sp(p,y,"textarea");async function x(){if(!(!s||!w||d)){_(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Un(t.queryKey))return;ts(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),tn(a_n(),"success")}catch(b){tn(b instanceof Error?b.message:String(b),"error")}finally{_(!1)}}}return ni.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&y()},children:f.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[f.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[f.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:d_n()}),f.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),f.jsx(At,{className:"absolute end-3.5 top-3.5","aria-label":Bun(),onClick:y,disabled:d,children:f.jsx(ur,{size:16})}),f.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?f.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?f.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[f.jsx(Ct,{})," ",Jun()]}):f.jsx(NB,{value:a,onChange:o,onSave:()=>void x(),path:s.path})}),f.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[f.jsx(Oe,{onClick:y,disabled:d,children:Nf()}),f.jsx(Oe,{variant:"primary",onClick:()=>void x(),disabled:!w||d,children:d?Ba():Qo()})]})]})}),document.body)}function jB({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?f.jsx(S5,{runtime:e,corner:n}):f.jsxs(f.Fragment,{children:[n?f.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:f.jsxs(Oe,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:V3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[f.jsx(pb,{size:14,className:"shrink-0"}),f.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:G3()})]})}):f.jsx("div",{className:"relative shrink-0 border-t border-border",children:f.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[f.jsx(At,{size:"small","aria-label":V3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:f.jsx(pb,{size:14,className:"shrink-0"})}),f.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[f.jsx("span",{className:"truncate text-sm leading-tight",children:G3()}),f.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ae(e.version)]})]})]})}),t==="hosts"&&f.jsx(S7n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&f.jsx(zB,{onClose:()=>r("hosts")})]})}function $6(e=!0){var r;const n=cb(),t=ft({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>ts(n.queryKey,s)}}const g8n=6e4,v8n=500,AB=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function TB(e){const[n,t]=T.useState(!1),[r,s]=T.useState(null),i=T.useRef(!1);T.useEffect(()=>(i.current=!1,()=>{i.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:n,error:r,restart:()=>{if(!a||n)return;const c=cb(),u=()=>i.current||!Un(c.queryKey);t(!0),s(null),(async()=>{try{if(await e4n(),u())return;const d=Date.now()+g8n;for(;Date.now()setTimeout(p,v8n)),u())return;const _=await Ze.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(_&&_.instance!==a){window.location.reload();return}}throw new Error(Fvn())}catch(d){if(u())return;s(d instanceof Error?d.message:String(d)),t(!1)}})()}}}function RB({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=TB(e);return!r||n===r?null:f.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[f.jsx(xo,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),f.jsx("span",{className:"min-w-0",children:i?wI({error:i}):pvn({version:Ae(r)})}),(e==null?void 0:e.installedTag)&&f.jsx("a",{href:AB(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:uI()}),(e==null?void 0:e.canRestart)&&f.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:a,children:s?kI():xI()}),f.jsx(At,{type:"button",size:"small",className:"ms-auto","aria-label":wvn(),disabled:s,onClick:()=>t(r),children:f.jsx(ur,{size:13})})]})}const MB="desktop-app-banner-dismissed-on",dA="https://github.com/alphaXiv/OpenResearch/releases/latest";function b8n(){const e=navigator.platform;return/Mac/.test(e)?"OpenResearch.dmg":/Win/.test(e)?"OpenResearch-Setup.exe":/Linux x86_64/.test(e)?"OpenResearch-x86_64.AppImage":/Linux aarch64/.test(e)?"OpenResearch-aarch64.AppImage":null}function OB(){return new Date().toDateString()}function hA(){try{return localStorage.getItem(MB)===OB()}catch{return!1}}function DB(){const[e,n]=T.useState(hA);if(T.useEffect(()=>{const s=()=>n(hA());return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),"__ORX_DESKTOP__"in window||e)return null;const t=()=>{try{localStorage.setItem(MB,OB())}catch{}n(!0)},r=b8n();return f.jsxs("div",{className:"desktop-app-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",children:[f.jsx(eg,{size:13,className:"shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0",children:BOe()}),f.jsx("a",{href:r?`${dA}/download/${r}`:dA,target:r?void 0:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:ROe()}),f.jsx(At,{type:"button",size:"small",className:"ms-auto","aria-label":COe(),onClick:t,children:f.jsx(ur,{size:13})})]})}function B6(){return f.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:f.jsx(Ct,{})})}function y8n(){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{children:ho()}),f.jsx(ny,{to:"/projects",children:R0()})]})}function P6({error:e,reset:n}){return f.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[f.jsx("p",{role:"alert",children:e.message}),f.jsx(Oe,{onClick:n,children:Ks()}),f.jsx(ny,{to:"/projects",children:R0()})]})}function LB({projectId:e}){const{queryClient:n}=bS({from:"__root__"}),t=Vm(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?Z$(e,n):_7n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(LK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?f.jsx(P6,{error:r,reset:()=>a(o=>o+1)}):f.jsx(B6,{})}function IB(){return f.jsx(LB,{})}function x8n({projectId:e}){return f.jsx(LB,{projectId:e})}function w8n(){const e=Q$(),n=Vm(),t=Af(),r=ft(t),s=ft(Zm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:d}=$6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch"},[]);const _=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsxs(f.Fragment,{children:[f.jsx(tB,{}),f.jsx(RB,{status:d})]}),f.jsx(DB,{}),c&&(!i||!a)?f.jsx(P6,{error:c,reset:u}):!i||!a?f.jsx(B6,{}):o?f.jsx(b7n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{u7n(),_(p.id)}}):f.jsx(IB,{}),(e.kind==="ssh"||i&&a&&!o)&&f.jsx(jB,{runtime:e,corner:!0})]})}const k8n=Fc()({component:IB}),S8n=Fc()({component:Q0}),C8n=Fc()({}),E8n=Fc()({component:w8n}),N8n=e=>({queryKey:Nt("getRunDiff",e),queryFn:({signal:n})=>Cwn(e,n),staleTime:3e4}),$B=e=>({queryKey:Nt("getExperimentDiff",e),queryFn:({signal:n})=>Ewn(e,n),staleTime:3e4}),gb=(e,n,t={})=>({queryKey:Nt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>Nwn(e,n,t,r),staleTime:t.ref?Ih(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),BB=e=>({queryKey:Nt("getAbsoluteFile",e),queryFn:({signal:n})=>zwn(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),PB=(e,n={})=>({queryKey:Nt("getCodeTree",e,{...n}),queryFn:({signal:t})=>Vwn(e,n,t),staleTime:n.ref&&Ih(n.ref)?1/0:3e4}),vb=e=>({queryKey:Nt("getSessionWorktree",e),queryFn:({signal:n})=>Kwn(e,n),staleTime:3e4}),z8n=e=>({queryKey:Nt("getArtifacts",e),queryFn:({signal:n})=>O4n(e,n),staleTime:3e4}),F6=(e,n)=>({queryKey:Nt("getArtifactFileText",e,n),queryFn:({signal:t})=>$4n(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),FB=(e,n)=>({queryKey:Nt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>P4n(e,n,t),staleTime:2e3}),j8n=()=>({queryKey:Nt("getLatexEngine"),queryFn:({signal:e})=>Rwn(e),staleTime:3e5}),A8n=()=>({queryKey:Nt("getOverleafSettings"),queryFn:({signal:e})=>Own(e),staleTime:3e5}),T8n=(e,n,t={})=>({queryKey:Nt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>Pwn(e,n,t,r),staleTime:3e5}),R8n=(e,n,t={})=>({queryKey:Nt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>Uwn(e,n,t,r),staleTime:3e4}),HB=(e,n,t,r,s)=>({queryKey:Nt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Ih(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:i,client:a})=>{const o=async m=>{i.throwIfAborted();const w=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return i.throwIfAborted(),w},c=t==="abs",u=t==="artifacts",d=async()=>{const m=await o(FB(e,n)),w=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&w?await o(F6(e,n)):null,v=m===null||w&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},_=async()=>{for(const m of[`artifacts/${n}`,n]){const w=await o(gb(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(w&&!w.notFound)return w}return null},p=await(c?o(BB(n)).then(m=>({source:"absolute",file:m})):u?d().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const w=await _();return w?{source:"checkout",file:w}:{source:"artifact",file:m}}):o(gb(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?d().then(w=>w.notFound?{source:"checkout",file:m}:{source:"artifact",file:w,checkoutRoot:m.root}):{source:"checkout",file:m}));return i.throwIfAborted(),p}});async function M8n(e,n,t,r,s){if(Ih(s))return;const i=HB(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[BB(n).queryKey]:[gb(e,n,{sessionId:r,ref:s}).queryKey,gb(e,`artifacts/${n}`,{sessionId:r}).queryKey,F6(e,n).queryKey,FB(e,n).queryKey]];await Promise.all(a.map(o=>Ze.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>Ze.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await Ze.invalidateQueries({queryKey:i.queryKey,exact:!0})}const bb=360,O8n=272,D8n=380,L8n=O8n+56;function Jd(){return Math.max(bb,window.innerWidth-L8n-D8n)}const I8n=500,$8n=.33;function pA(){return Math.min(Jd(),Math.max(I8n,Math.round(window.innerWidth*$8n)))}function B8n(){const e=Jd();return Math.max(bb,Math.min(480,e,Math.round(window.innerWidth*.25)))}function P8n(e,n,t){return t?n.flatMap(r=>{if(r.status!=="starting"&&r.status!=="running")return[];const s=e.find(i=>i.id===r.experimentId&&i.chatSessionId===t);return s?[{experiment:s,run:r}]:[]}):[]}const mA={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function F8n(e){return mA[e]??mA.idle}const H8n={done:mI,failed:Ofn,running:Wfn,starting:tdn,cancelling:hfn,cancelled:ofn,editing:Nfn,idle:Ffn};function H6(e){const n=H8n[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function Pl({status:e,label:n,className:t}){const r=F8n(e);return f.jsx(ch,{tone:r.tone,live:r.live,className:t,children:n??H6(e)})}const Of={local:pL,tinker:lMe,hf:cRe,modal:zRe,k8s:pRe,ssh:nMe,slurm:QRe,ray:HRe,openresearch:DRe};function gA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,r)}return t}function Jn(e){for(var n=1;n=0||(d[c]=a[c]);return d})(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function On(e,n){return UB(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,c,u=[],d=!0,_=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;d=!1}else for(;!(d=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(p){_=!0,a=p}finally{try{if(!d&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(_)throw a}}return u}})(e,n)||Cy(e,n)||VB()}function qB(e){return UB(e)||GB(e)||Cy(e)||VB()}function Ta(e){return(function(n){if(Array.isArray(n))return T5(n)})(e)||GB(e)||Cy(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function UB(e){if(Array.isArray(e))return e}function GB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cy(e,n){if(e){if(typeof e=="string")return T5(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?T5(e,n):void 0}}function T5(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return a=c.done,c},e:function(c){o=!0,i=c},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var L1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ig(e,n){return e(n={exports:{}},n.exports),n.exports}var ja=ig((function(e){/*! +|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}f6.displayName="go";f6.aliases=[];function f6(e){e.register(Uc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}d6.displayName="ini";d6.aliases=[];function d6(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}h6.displayName="java";h6.aliases=[];function h6(e){e.register(Uc),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}p6.displayName="regex";p6.aliases=[];function p6(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+r.source+")",o=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":i,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}m6.displayName="json";m6.aliases=["webmanifest"];function m6(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}g6.displayName="kotlin";g6.aliases=["kt","kts"];function g6(e){e.register(Uc),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}v6.displayName="less";v6.aliases=[];function v6(e){e.register(ap),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}b6.displayName="lua";b6.aliases=[];function b6(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}y6.displayName="makefile";y6.aliases=[];function y6(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}x6.displayName="yaml";x6.aliases=["yml"];function x6(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}w6.displayName="markdown";w6.aliases=["md"];function w6(e){e.register(sg),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(o){return o=o.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+o+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(o){["url","bold","italic","strike","code-snippet"].forEach(function(c){o!==c&&(n.languages.markdown[o].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,f=u.length;d]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}S6.displayName="perl";S6.aliases=[];function S6(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}ky.displayName="markup-templating";ky.aliases=[];function ky(e){e.register(sg),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,i,a){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(i,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=o.length,d;r.code.indexOf(d=t(s,u))!==-1;)++u;return o[u]=c,d}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var i=0,a=Object.keys(r.tokenStack);function o(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var f=a[i],p=r.tokenStack[f],m=typeof d=="string"?d:d.content,w=t(s,f),k=m.indexOf(w);if(k>-1){++i;var v=m.substring(0,k),y=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),x=m.substring(k+w.length),b=[];v&&b.push.apply(b,o([v])),b.push(y),x&&b.push.apply(b,o([x])),typeof d=="string"?c.splice.apply(c,[u,1].concat(b)):d.content=b}}else d.content&&o(d.content)}return c}o(r.tokens)}}})})(e)}C6.displayName="php";C6.aliases=[];function C6(e){e.register(ky),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];n.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}E6.displayName="python";E6.aliases=["py"];function E6(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}N6.displayName="r";N6.aliases=[];function N6(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}z6.displayName="ruby";z6.aliases=["rb"];function z6(e){e.register(Uc),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}j6.displayName="rust";j6.aliases=[];function j6(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}A6.displayName="sass";A6.aliases=[];function A6(e){e.register(ap),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}T6.displayName="scss";T6.aliases=[];function T6(e){e.register(ap),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}R6.displayName="sql";R6.aliases=[];function R6(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}M6.displayName="swift";M6.aliases=[];function M6(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}O6.displayName="typescript";O6.aliases=["ts"];function O6(e){e.register(wy),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}Sy.displayName="basic";Sy.aliases=[];function Sy(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}D6.displayName="vbnet";D6.aliases=[];function D6(e){e.register(Sy),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class ig{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}ig.prototype.normal={};ig.prototype.property={};ig.prototype.space=void 0;function cB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new ig(t,r,n)}function am(e){return e.toLowerCase()}class sa{constructor(n,t){this.attribute=t,this.property=n}}sa.prototype.attribute="";sa.prototype.booleanish=!1;sa.prototype.boolean=!1;sa.prototype.commaOrSpaceSeparated=!1;sa.prototype.commaSeparated=!1;sa.prototype.defined=!1;sa.prototype.mustUseProperty=!1;sa.prototype.number=!1;sa.prototype.overloadedBoolean=!1;sa.prototype.property="";sa.prototype.spaceSeparated=!1;sa.prototype.space=void 0;let s8n=0;const an=Jf(),xs=Jf(),E5=Jf(),Je=Jf(),xr=Jf(),yf=Jf(),ka=Jf();function Jf(){return 2**++s8n}const N5=Object.freeze(Object.defineProperty({__proto__:null,boolean:an,booleanish:xs,commaOrSpaceSeparated:ka,commaSeparated:yf,number:Je,overloadedBoolean:E5,spaceSeparated:xr},Symbol.toStringTag,{value:"Module"})),Bw=Object.keys(N5);class L6 extends sa{constructor(n,t,r,s){let i=-1;if(super(n,t),rA(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&l8n.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(sA,_8n);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!sA.test(i)){let a=i.replace(c8n,u8n);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=L6}return new s(r,n)}function u8n(e){return"-"+e.toLowerCase()}function _8n(e){return e.charAt(1).toUpperCase()}const mB=cB([lB,i8n,fB,dB,hB],"html"),Cy=cB([lB,a8n,fB,dB,hB],"svg");function iA(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const a=t.slice(s,r).trim();(a||!i)&&n.push(a),s=r+1,r=t.indexOf(",",s)}return n}function f8n(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const aA=/[#.]/g;function d8n(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function w8n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function k8n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function uA(e){return k8n(e)||bB(e)}const _A=document.createElement("i");function om(e){const n="&"+e+";";_A.innerHTML=n;const t=_A.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const S8n=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function C8n(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,p=w(),m;for(i--;++i<=e.length;)if(m===10&&(f=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const y=e.charCodeAt(i+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){o+=String.fromCharCode(m),f++;continue}const x=i+1;let b=x,C=x,N;if(y===35){C=++b;const U=e.charCodeAt(C);U===88||U===120?(N="hexadecimal",C=++b):N="decimal"}else N="named";let z="",A="",j="";const M=N==="named"?uA:N==="decimal"?bB:w8n;for(C--;++C<=e.length;){const U=e.charCodeAt(C);if(!M(U))break;j+=String.fromCharCode(U),N==="named"&&x8n.includes(j)&&(z=j,A=om(j))}let D=e.charCodeAt(C)===59;if(D){C++;const U=N==="named"?om(j):!1;U&&(z=j,A=U)}let L=1+C-x,B="";if(!(!D&&t.nonTerminated===!1))if(!j)N!=="named"&&k(4,L);else if(N==="named"){if(D&&!A)k(5,1);else if(z!==j&&(C=b+z.length,L=1+C-b,D=!1),!D){const U=z?1:3;if(t.attribute){const H=e.charCodeAt(C);H===61?(k(U,L),A=""):uA(H)?A="":k(U,L)}else k(U,L)}B=A}else{D||k(2,L);let U=Number.parseInt(j,N==="hexadecimal"?16:10);if(E8n(U))k(7,L),B="�";else if(U in lA)k(6,L),B=lA[U];else{let H="";N8n(U)&&k(6,L),U>65535&&(U-=65536,H+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),B=H+String.fromCharCode(U)}}if(B){v(),p=w(),i=C-1,f+=C-x+1,s.push(B);const U=w();U.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:U},e.slice(x-1,C)),p=U}else j=e.slice(x-1,C),o+=j,f+=j.length,i=C-1}else m===10&&(d++,a++,f=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),f++);return s.join("");function w(){return{line:d,column:f,offset:i+((c?c.offset:0)||0)}}function k(y,x){let b;t.warning&&(b=w(),b.column+=x,b.offset+=x,t.warning.call(t.warningContext||void 0,S8n[y],b,y))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:w()}),o="")}}function E8n(e){return e>=55296&&e<=57343||e>1114111}function N8n(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var z8n=0,L1={},Vs={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++z8n}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Vs.util.type(n)){case"Object":if(s=Vs.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(n[i],t));return r;case"Array":return s=Vs.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(a,o){r[o]=e(a,t)}),r);default:return n}}},languages:{plain:L1,plaintext:L1,text:L1,txt:L1,extend:function(e,n){var t=Vs.util.clone(Vs.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Vs.languages;var s=r[e],i={};for(var a in s)if(s.hasOwnProperty(a)){if(a==n)for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);t.hasOwnProperty(a)||(i[a]=s[a])}var c=r[e];return r[e]=i,Vs.languages.DFS(Vs.languages,function(u,d){d===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=Vs.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=Vs.util.type(o);c==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):c==="Array"&&!s[i(o)]&&(s[i(o)]=!0,e(o,t,a,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Vs.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Vs.tokenize(r.code,r.grammar),Vs.hooks.run("after-tokenize",r),L0.stringify(Vs.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new j8n;return zv(s,s.head,e),yB(e,s,n,s.head,0),T8n(s)},hooks:{all:{},add:function(e,n){var t=Vs.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Vs.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:L0};function L0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function fA(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var i=s[1].length;s.index+=i,s[0]=s[0].slice(i)}return s}function yB(e,n,t,r,s,i){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var o=t[a];o=Array.isArray(o)?o:[o];for(var c=0;c=i.reach);y+=v.value.length,v=v.next){var x=v.value;if(n.length>e.length)return;if(!(x instanceof L0)){var b=1,C;if(p){if(C=fA(k,y,e,f),!C||C.index>=e.length)break;var j=C.index,N=C.index+C[0].length,z=y;for(z+=v.value.length;j>=z;)v=v.next,z+=v.value.length;if(z-=v.value.length,y=z,v.value instanceof L0)continue;for(var A=v;A!==n.tail&&(zi.reach&&(i.reach=B);var U=v.prev;D&&(U=zv(n,U,D),y+=D.length),A8n(n,U,b);var H=new L0(a,d?Vs.tokenize(M,d):M,m,M);if(v=zv(n,U,H),L&&zv(n,v,L),b>1){var Q={cause:a+","+c,reach:B};yB(e,n,t,v.prev,y,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function j8n(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function zv(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function A8n(e,n,t){for(var r=n.next,s=0;st)return null;try{return Ft.highlight(e,n).children}catch{return null}}function SB(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:_.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(SB)},n)}function B8n(e,n,t=3e5){var r;return((r=kB(e,n,t))==null?void 0:r.map(SB))??e}function CB(e,n,t=3e5){const r=kB(e,n,t);if(!r)return e.split(` +`);const s=[];let i=[];const a=[];let o=0;const c=d=>{let f=d;for(let p=a.length-1;p>=0;p--)f=_.jsx("span",{className:a[p],children:f},o++);i.push(f)},u=d=>{var f;if(d.type==="text"){(d.value??"").split(` +`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}d.type==="element"&&(a.push((((f=d.properties)==null?void 0:f.className)??[]).join(" ")),(d.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function EB(e){return Array.isArray(e)?e.length===0:e===""}function NB({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:d}){const f=T.useMemo(()=>CB(e,o6(i)),[e,i]),{ruleCh:p,codeCh:m}=oB(f.length),w=T.useRef(null),k=T.useRef(null),v=()=>{const C=w.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},y=T.useRef(u);T.useLayoutEffect(()=>{const C=w.current;!C||!y.current||(C.scrollTop=y.current.top,C.scrollLeft=y.current.left,v())},[i]),T.useLayoutEffect(v,[e]),T.useLayoutEffect(()=>{var M;const C=w.current;if(!C||!a||o===void 0)return;const N=e.split(` +`),z=Math.min(Math.max(Math.trunc(a),1),N.length);let A=0;for(let D=0;D{if(!s){if((C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"){C.preventDefault(),t();return}if(C.key==="Tab"){C.preventDefault();const N=C.currentTarget,{selectionStart:z,selectionEnd:A}=N,j=e.slice(0,z)+" "+e.slice(A);n(j),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=z+1})}}},b=`absolute inset-0 m-0 py-3.5 pe-4 ${gb} ${iB} [scrollbar-gutter:stable]`;return _.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${gb}`,children:[_.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),_.jsx("div",{ref:k,className:`file-view-code ${b} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:f.map((C,N)=>_.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[_.jsx("span",{className:`${aB} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),EB(C)?_.jsx("br",{}):C]},N))}),_.jsx("textarea",{ref:w,className:`file-view-editarea ${b} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:C=>{s||n(C.target.value)},onScroll:C=>{v(),d==null||d({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:x,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function zB({onClose:e,onSaved:n}){const t=u5n(),r=dt(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var b;return((b=r.data)==null?void 0:b.content)??""}),c=!s&&r.error?r.error.message:null,u=pn({mutationFn:({content:b,previous:C})=>B4n(b,C)}),[d,f]=T.useState(!1),p=T.useRef(null),m=T.useRef(e),w=s!==null&&a!==s.content,k=T.useRef(w),v=T.useRef(d);k.current=w,v.current=d,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const y=()=>{v.current||k.current&&!window.confirm(d_n())||m.current()};sp(p,y,"textarea");async function x(){if(!(!s||!w||d)){f(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Gn(t.queryKey))return;ts(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),sn(N_n(),"success")}catch(b){sn(b instanceof Error?b.message:String(b),"error")}finally{f(!1)}}}return ni.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&y()},children:_.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[_.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[_.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:O_n()}),_.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":a_n(),onClick:y,disabled:d,children:_.jsx(_r,{size:16})}),_.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:c?_.jsx("p",{className:"m-5 text-sm text-accent-red",children:c}):s===null?_.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[_.jsx(Et,{})," ",y_n()]}):_.jsx(NB,{value:a,onChange:o,onSave:()=>void x(),path:s.path})}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[_.jsx(Me,{onClick:y,disabled:d,children:Nf()}),_.jsx(Me,{variant:"primary",onClick:()=>void x(),disabled:!w||d,children:d?Ba():Qo()})]})]})}),document.body)}function jB({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?_.jsx(S5,{runtime:e,corner:n}):_.jsxs(_.Fragment,{children:[n?_.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:_.jsxs(Me,{className:"h-auto max-w-48 justify-start rounded-none border-b-0 border-s-0 px-2.5 py-1.5 font-normal",title:V3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[_.jsx(mb,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:G3()})]})}):_.jsx("div",{className:"relative shrink-0 border-t border-border",children:_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(Rt,{size:"small","aria-label":V3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:_.jsx(mb,{size:14,className:"shrink-0"})}),_.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[_.jsx("span",{className:"truncate text-sm leading-tight",children:G3()}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ae(e.version)]})]})]})}),t==="hosts"&&_.jsx(K7n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&_.jsx(zB,{onClose:()=>r("hosts")})]})}function $6(e=!0){var r;const n=lb(),t=dt({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>ts(n.queryKey,s)}}const P8n=6e4,F8n=500,AB=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function TB(e){const[n,t]=T.useState(!1),[r,s]=T.useState(null),i=T.useRef(!1);T.useEffect(()=>(i.current=!1,()=>{i.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:n,error:r,restart:()=>{if(!a||n)return;const c=lb(),u=()=>i.current||!Gn(c.queryKey);t(!0),s(null),(async()=>{try{if(await w4n(),u())return;const d=Date.now()+P8n;for(;Date.now()setTimeout(p,F8n)),u())return;const f=await Ze.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==a){window.location.reload();return}}throw new Error(cbn())}catch(d){if(u())return;s(d instanceof Error?d.message:String(d)),t(!1)}})()}}}function RB({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=TB(e);return!r||n===r?null:_.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[_.jsx(xo,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),_.jsx("span",{className:"min-w-0",children:i?wI({error:i}):Lvn({version:Ae(r)})}),(e==null?void 0:e.installedTag)&&_.jsx("a",{href:AB(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:uI()}),(e==null?void 0:e.canRestart)&&_.jsx(Me,{type:"button",size:"small",disabled:s,onClick:a,children:s?kI():xI()}),_.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":qvn(),disabled:s,onClick:()=>t(r),children:_.jsx(_r,{size:13})})]})}const MB="desktop-app-banner-dismissed-on",dA="https://github.com/alphaXiv/OpenResearch/releases/latest";function H8n(){const e=navigator.platform;return/Mac/.test(e)?"OpenResearch.dmg":/Win/.test(e)?"OpenResearch-Setup.exe":/Linux x86_64/.test(e)?"OpenResearch-x86_64.AppImage":/Linux aarch64/.test(e)?"OpenResearch-aarch64.AppImage":null}function OB(){return new Date().toDateString()}function hA(){try{return localStorage.getItem(MB)===OB()}catch{return!1}}function DB(){const[e,n]=T.useState(hA);if(T.useEffect(()=>{const s=()=>n(hA());return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),"__ORX_DESKTOP__"in window||e)return null;const t=()=>{try{localStorage.setItem(MB,OB())}catch{}n(!0)},r=H8n();return _.jsxs("div",{className:"desktop-app-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",children:[_.jsx(tg,{size:13,className:"shrink-0 text-subtext"}),_.jsx("span",{className:"min-w-0",children:BOe()}),_.jsx("a",{href:r?`${dA}/download/${r}`:dA,target:r?void 0:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:ROe()}),_.jsx(Rt,{type:"button",size:"small",className:"ms-auto","aria-label":COe(),onClick:t,children:_.jsx(_r,{size:13})})]})}function B6(){return _.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:_.jsx(Et,{})})}function q8n(){return _.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[_.jsx("p",{children:ho()}),_.jsx(ry,{to:"/projects",children:M0()})]})}function P6({error:e,reset:n}){return _.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[_.jsx("p",{role:"alert",children:e.message}),_.jsx(Me,{onClick:n,children:Ks()}),_.jsx(ry,{to:"/projects",children:M0()})]})}function LB({projectId:e}){const{queryClient:n}=bS({from:"__root__"}),t=Km(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?Z$(e,n):M7n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(LK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?_.jsx(P6,{error:r,reset:()=>a(o=>o+1)}):_.jsx(B6,{})}function IB(){return _.jsx(LB,{})}function U8n({projectId:e}){return _.jsx(LB,{projectId:e})}function G8n(){const e=Q$(),n=Km(),t=Af(),r=dt(t),s=dt(Jm()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:d}=$6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch"},[]);const f=p=>void n({to:"/projects/$projectId",params:{projectId:p}});return _.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&_.jsxs(_.Fragment,{children:[_.jsx(tB,{}),_.jsx(RB,{status:d})]}),_.jsx(DB,{}),c&&(!i||!a)?_.jsx(P6,{error:c,reset:u}):!i||!a?_.jsx(B6,{}):o?_.jsx(F7n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{R7n(),f(p.id)}}):_.jsx(IB,{}),(e.kind==="ssh"||i&&a&&!o)&&_.jsx(jB,{runtime:e,corner:!0})]})}const V8n=Fc()({component:IB}),K8n=Fc()({component:X0}),W8n=Fc()({}),Q8n=Fc()({component:G8n}),X8n=e=>({queryKey:jt("getRunDiff",e),queryFn:({signal:n})=>Kwn(e,n),staleTime:3e4}),$B=e=>({queryKey:jt("getExperimentDiff",e),queryFn:({signal:n})=>Wwn(e,n),staleTime:3e4}),vb=(e,n,t={})=>({queryKey:jt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>Qwn(e,n,t,r),staleTime:t.ref?Ih(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),BB=e=>({queryKey:jt("getAbsoluteFile",e),queryFn:({signal:n})=>Xwn(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),PB=(e,n={})=>({queryKey:jt("getCodeTree",e,{...n}),queryFn:({signal:t})=>h4n(e,n,t),staleTime:n.ref&&Ih(n.ref)?1/0:3e4}),bb=e=>({queryKey:jt("getSessionWorktree",e),queryFn:({signal:n})=>p4n(e,n),staleTime:3e4}),Y8n=e=>({queryKey:jt("getArtifacts",e),queryFn:({signal:n})=>n3n(e,n),staleTime:3e4}),F6=(e,n)=>({queryKey:jt("getArtifactFileText",e,n),queryFn:({signal:t})=>a3n(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),FB=(e,n)=>({queryKey:jt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>c3n(e,n,t),staleTime:2e3}),Z8n=()=>({queryKey:jt("getLatexEngine"),queryFn:({signal:e})=>e4n(e),staleTime:3e5}),J8n=()=>({queryKey:jt("getOverleafSettings"),queryFn:({signal:e})=>n4n(e),staleTime:3e5}),e9n=(e,n,t={})=>({queryKey:jt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>c4n(e,n,t,r),staleTime:3e5}),t9n=(e,n,t={})=>({queryKey:jt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>f4n(e,n,t,r),staleTime:3e4}),HB=(e,n,t,r,s)=>({queryKey:jt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Ih(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:i,client:a})=>{const o=async m=>{i.throwIfAborted();const w=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return i.throwIfAborted(),w},c=t==="abs",u=t==="artifacts",d=async()=>{const m=await o(FB(e,n)),w=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&w?await o(F6(e,n)):null,v=m===null||w&&k===null;return{path:n,content:(k==null?void 0:k.content)??"",truncated:(k==null?void 0:k.truncated)??!1,binary:(k==null?void 0:k.binary)??(m==null?void 0:m.presentation)==="download",notFound:v,presentation:k?k.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},f=async()=>{for(const m of[`artifacts/${n}`,n]){const w=await o(vb(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(w&&!w.notFound)return w}return null},p=await(c?o(BB(n)).then(m=>({source:"absolute",file:m})):u?d().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const w=await f();return w?{source:"checkout",file:w}:{source:"artifact",file:m}}):o(vb(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?d().then(w=>w.notFound?{source:"checkout",file:m}:{source:"artifact",file:w,checkoutRoot:m.root}):{source:"checkout",file:m}));return i.throwIfAborted(),p}});async function n9n(e,n,t,r,s){if(Ih(s))return;const i=HB(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[BB(n).queryKey]:[vb(e,n,{sessionId:r,ref:s}).queryKey,vb(e,`artifacts/${n}`,{sessionId:r}).queryKey,F6(e,n).queryKey,FB(e,n).queryKey]];await Promise.all(a.map(o=>Ze.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>Ze.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await Ze.invalidateQueries({queryKey:i.queryKey,exact:!0})}const yb=360,r9n=272,s9n=380,i9n=r9n+56;function Jd(){return Math.max(yb,window.innerWidth-i9n-s9n)}const a9n=500,o9n=.33;function pA(){return Math.min(Jd(),Math.max(a9n,Math.round(window.innerWidth*o9n)))}function c9n(){const e=Jd();return Math.max(yb,Math.min(480,e,Math.round(window.innerWidth*.25)))}function l9n(e,n,t){return t?n.flatMap(r=>{if(r.status!=="starting"&&r.status!=="running")return[];const s=e.find(i=>i.id===r.experimentId&&i.chatSessionId===t);return s?[{experiment:s,run:r}]:[]}):[]}const mA={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function u9n(e){return mA[e]??mA.idle}const _9n={done:mI,failed:tdn,running:pdn,starting:wdn,cancelling:Dfn,cancelled:zfn,editing:Wfn,idle:cdn};function H6(e){const n=_9n[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function Pl({status:e,label:n,className:t}){const r=u9n(e);return _.jsx(ch,{tone:r.tone,live:r.live,className:t,children:n??H6(e)})}const Of={local:pL,tinker:lMe,hf:cRe,modal:zRe,k8s:pRe,ssh:nMe,slurm:QRe,ray:HRe,openresearch:DRe};function gA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,r)}return t}function er(e){for(var n=1;n=0||(d[c]=a[c]);return d})(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function On(e,n){return UB(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,c,u=[],d=!0,f=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;d=!1}else for(;!(d=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(p){f=!0,a=p}finally{try{if(!d&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw a}}return u}})(e,n)||Ey(e,n)||VB()}function qB(e){return UB(e)||GB(e)||Ey(e)||VB()}function Ta(e){return(function(n){if(Array.isArray(n))return T5(n)})(e)||GB(e)||Ey(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function UB(e){if(Array.isArray(e))return e}function GB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ey(e,n){if(e){if(typeof e=="string")return T5(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?T5(e,n):void 0}}function T5(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return a=c.done,c},e:function(c){o=!0,i=c},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var I1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ag(e,n){return e(n={exports:{}},n.exports),n.exports}var ja=ag((function(e){/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?y.slice(0,b):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=y.slice(b+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(y.split(" ")[2],10);break;case"index":var z=y.slice(b+1).split(" "),A=z[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],z[1]&&(a.oldMode=a.newMode=z[1]);break;case"copy":case"rename":var j=y.slice(b+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),x=C;break;case"---":var M=y.slice(b+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),x="add"):D==="/dev/null"?(M=M.slice(2),x="delete"):(x="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=x||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var L=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:L[1]-0,newStart:L[4]-0,oldLines:L[3]-0||1,newLines:L[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),U={content:v.slice(1)};switch(B){case"+":U.type="insert",U.isInsert=!0,U.lineNumber=u,u++;break;case"-":U.type="delete",U.isDelete=!0,U.lineNumber=c,c++;break;case" ":U.type="normal",U.isNormal=!0,U.oldLineNumber=c,U.newLineNumber=u,c++,u++;break;case"\\":var H=o.changes[o.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}U.type&&o.changes.push(U)}k++}return _}};e.exports=s})()}));function p_(e){return e.type==="insert"}function Ra(e){return e.type==="delete"}function ql(e){return e.type==="normal"}function V8n(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=On(i,3),u=c[0],d=c[1],_=c[2];return d?p_(a)&&_>=0?(u.splice(_+1,0,a),[u,a,_+2]):(u.push(a),[u,a,Ra(a)&&Ra(d)?_:o]):(u.push(a),[u,a,Ra(a)?o:-1])}),[[],null,-1]);return On(s,1)[0]})(e.changes):e.changes;return Jn(Jn({},e),{},{isPlain:!1,changes:t})}function R5(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(r){if(r.startsWith("diff --git"))return r;var s=r.indexOf(` +*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?y.slice(0,b):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=y.slice(b+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(y.split(" ")[2],10);break;case"index":var z=y.slice(b+1).split(" "),A=z[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],z[1]&&(a.oldMode=a.newMode=z[1]);break;case"copy":case"rename":var j=y.slice(b+1);j.indexOf("from")===0?a.oldPath=j.slice(5):a.newPath=j.slice(3),x=C;break;case"---":var M=y.slice(b+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),x="add"):D==="/dev/null"?(M=M.slice(2),x="delete"):(x="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=x||"modify"}else if(v.indexOf("Binary")===0)a.isBinary=!0,a.type=v.indexOf("/dev/null and")>=0?"add":v.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(v.indexOf("@@")===0){var L=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:L[1]-0,newStart:L[4]-0,oldLines:L[3]-0||1,newLines:L[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),U={content:v.slice(1)};switch(B){case"+":U.type="insert",U.isInsert=!0,U.lineNumber=u,u++;break;case"-":U.type="delete",U.isDelete=!0,U.lineNumber=c,c++;break;case" ":U.type="normal",U.isNormal=!0,U.oldLineNumber=c,U.newLineNumber=u,c++,u++;break;case"\\":var H=o.changes[o.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}U.type&&o.changes.push(U)}k++}return f}};e.exports=s})()}));function p_(e){return e.type==="insert"}function Ra(e){return e.type==="delete"}function ql(e){return e.type==="normal"}function p9n(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=On(i,3),u=c[0],d=c[1],f=c[2];return d?p_(a)&&f>=0?(u.splice(f+1,0,a),[u,a,f+2]):(u.push(a),[u,a,Ra(a)&&Ra(d)?f:o]):(u.push(a),[u,a,Ra(a)?o:-1])}),[[],null,-1]);return On(s,1)[0]})(e.changes):e.changes;return er(er({},e),{},{isPlain:!1,changes:t})}function R5(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(r){if(r.startsWith("diff --git"))return r;var s=r.indexOf(` `),i=r.indexOf(` `,s+1),a=r.slice(0,s),o=r.slice(s+1,i),c=a.split(" ").slice(1,-3).join(" "),u=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(u),r.slice(i+1)].join(` -`)})(e.trimStart());return G8n.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return V8n(o,i)}));return Jn(Jn({},s),{},{hunks:a})})(r,n)}))}function K8n(e){return e[0]}function W8n(e){return e[e.length-1]}function M5(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function om(e){return e==="old"?function(n){return p_(n)?-1:ql(n)?n.oldLineNumber:n.lineNumber}:function(n){return Ra(n)?-1:ql(n)?n.newLineNumber:n.lineNumber}}function WB(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},n9n=function(e,n){var t=this.__data__,r=Ey(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Kd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),d=i.get(n);if(u&&d)return u==n&&d==e;var _=-1,p=!0,m=2&t?new B9n:void 0;for(i.set(e,n),i.set(n,e);++_-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Nr={};Nr["[object Float32Array]"]=Nr["[object Float64Array]"]=Nr["[object Int8Array]"]=Nr["[object Int16Array]"]=Nr["[object Int32Array]"]=Nr["[object Uint8Array]"]=Nr["[object Uint8ClampedArray]"]=Nr["[object Uint16Array]"]=Nr["[object Uint32Array]"]=!0,Nr["[object Arguments]"]=Nr["[object Array]"]=Nr["[object ArrayBuffer]"]=Nr["[object Boolean]"]=Nr["[object DataView]"]=Nr["[object Date]"]=Nr["[object Error]"]=Nr["[object Function]"]=Nr["[object Map]"]=Nr["[object Number]"]=Nr["[object Object]"]=Nr["[object RegExp]"]=Nr["[object Set]"]=Nr["[object String]"]=Nr["[object WeakMap]"]=!1;var tEn=function(e){return Fh(e)&&G6(e.length)&&!!Nr[cp(e)]},nEn=function(e){return function(n){return e(n)}},CA=ig((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&YB.process,i=(function(){try{var a=r&&r.require&&r.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=i})),EA=CA&&CA.isTypedArray,V6=EA?nEn(EA):tEn,rEn=Object.prototype.hasOwnProperty,sEn=function(e,n){var t=La(e),r=!t&&Ay(e),s=!t&&!r&&yb(e),i=!t&&!r&&!s&&V6(e),a=t||r||s||i,o=a?X9n(e.length,String):[],c=o.length;for(var u in e)!rEn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||rP(u,c))||o.push(u);return o},iEn=Object.prototype,sP=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||iEn)},aEn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),oEn=Object.prototype.hasOwnProperty,iP=function(e){if(!sP(e))return aEn(e);var n=[];for(var t in Object(e))oEn.call(e,t)&&t!="constructor"&&n.push(t);return n},Ty=function(e){return e!=null&&G6(e.length)&&!JB(e)},K6=function(e){return Ty(e)?sEn(e):iP(e)},NA=function(e){return G9n(e,K6,Q9n)},cEn=Object.prototype.hasOwnProperty,lEn=function(e,n,t,r,s,i){var a=1&t,o=NA(e),c=o.length;if(c!=NA(n).length&&!a)return!1;for(var u=c;u--;){var d=o[u];if(!(a?d in n:cEn.call(n,d)))return!1}var _=i.get(e),p=i.get(n);if(_&&p)return _==n&&p==e;var m=!0;i.set(e,n),i.set(n,e);for(var w=a;++u1)return!1;if(e.length===1){var n=On(e,1)[0];return n.type==="text"&&!n.value}return!0}function YEn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=i_(e,QEn),a=s?function(o,c){return s(o,RA,c)}:RA;return f.jsx("td",Jn(Jn({},i),{},{"data-change-key":n,children:r?XEn(r)?" ":r.map(a):t||" "}))}var dP=T.memo(YEn);function hP(e,n){return function(){var t=n==="old"?Ly(e):Iy(e);return t===-1?void 0:t}}function pP(e,n){return function(t){return e&&t?f.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function xb(e,n){return n?function(t){e(),n(t)}:e}function MA(e,n,t,r){return T.useMemo((function(){var s=fP(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=xb(t,s.onMouseEnter),s.onMouseLeave=xb(r,s.onMouseLeave),s}),[e,t,r,n])}function OA(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:hP(n,r),wrapInAnchor:pP(s,i)};return f.jsx("td",Jn(Jn({className:e},a),{},{"data-change-key":t,children:c(u)}))}function ZEn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,y=e.renderGutter,x=s.type,b=s.content,C=t_(s),N=(n=On(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),z=On(N,3),A=z[0],j=z[1],M=z[2],D=T.useMemo((function(){return{change:s}}),[s]),L=MA(_,D,j,M),B=MA(p,D,j,M),U=k(s),H=c({changes:[s],defaultGenerate:function(){return o}}),Q=ja("diff-gutter","diff-gutter-".concat(x),u,{"diff-gutter-selected":i}),K=ja("diff-code","diff-code-".concat(x),d,{"diff-code-selected":i});return f.jsxs("tr",{id:U,className:ja("diff-line",H),children:[!m&&OA(Q,s,C,"old",w,U,L,A,y),!m&&OA(Q,s,C,"new",w,U,L,A,y),f.jsx(dP,Jn({className:K,changeKey:C,text:b,tokens:a,renderToken:v},B))]})}var JEn=T.memo(ZEn);function eNn(e){var n=e.hideGutter,t=e.element;return f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var tNn=["hideGutter","selectedChanges","tokens","lineClassName"],nNn=["hunk","widgets","className"];function rNn(e){var n=e.hunk,t=e.widgets,r=e.className,s=i_(e,nNn),i=(function(a,o){return a.reduce((function(c,u){var d=t_(u);c.push(["change",d,u]);var _=o[d];return _&&c.push(["widget",d,_]),c}),[])})(n.changes,t);return f.jsx("tbody",{className:ja("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=On(o,3),d=u[0],_=u[1],p=u[2],m=c.hideGutter,w=c.selectedChanges,k=c.tokens,v=c.lineClassName,y=i_(c,tNn);if(d==="change"){var x=Ra(p)?"old":"new",b=Ra(p)?Ly(p):Iy(p),C=k?k[x][b-1]:null;return f.jsx(JEn,Jn({className:v,change:p,hideGutter:m,selected:w.includes(_),tokens:C},y),"change".concat(_))}return d==="widget"?f.jsx(eNn,{hideGutter:m,element:p},"widget".concat(_)):null})(a,s)}))})}var mP=0;function $1(e,n,t,r){var s=T.useCallback((function(){return n(e)}),[e,n]),i=T.useCallback((function(){return n("")}),[n]);return T.useMemo((function(){var a=fP(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=xb(s,a.onMouseEnter),a.onMouseLeave=xb(i,a.onMouseLeave),a}),[t,r,s,e,i])}function Hw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,u=e.anchorID,d=e.gutterAnchor,_=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,w=e.renderToken,k=e.renderGutter;if(!n){var v=ja("diff-gutter","diff-gutter-omit",i),y=ja("diff-code","diff-code-omit",a);return[!p&&f.jsx("td",{className:v},"gutter"),f.jsx("td",{className:y},"code")]}var x=n.type,b=n.content,C=t_(n),N=t===mP?"old":"new",z=Jn({id:u||void 0,className:ja("diff-gutter","diff-gutter-".concat(x),A5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:hP(n,N),wrapInAnchor:pP(d,_)})},o),A=ja("diff-code","diff-code-".concat(x),A5({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&f.jsx("td",Jn(Jn({},z),{},{"data-change-key":C}),"gutter"),f.jsx(dP,Jn({className:A,changeKey:C,text:b,tokens:s,renderToken:w},c),"code")]}function sNn(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,c=e.monotonous,u=e.gutterClassName,d=e.codeClassName,_=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,y=e.renderToken,x=e.renderGutter,b=On(T.useState(""),2),C=b[0],N=b[1],z=$1("old",N,t,_),A=$1("new",N,r,_),j=$1("old",N,t,p),M=$1("new",N,r,p),D=t&&w(t),L=r&&w(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),U={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:d,gutterEvents:_,codeEvents:p,renderToken:y,renderGutter:x},H=Jn(Jn({},U),{},{change:t,side:mP,selected:s,tokens:a,gutterEvents:z,codeEvents:j,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=Jn(Jn({},U),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:L,gutterAnchor:v,gutterAnchorTarget:t===r?D:L,hover:C==="new"});if(c)return f.jsx("tr",{className:ja("diff-line",B),children:Hw(t?H:Q)});var K=(function(Z,ee){return Z&&!ee?"diff-line-old-only":!Z&&ee?"diff-line-new-only":Z===ee?"diff-line-normal":"diff-line-compare"})(t,r);return f.jsxs("tr",{className:ja("diff-line",K,B),children:[Hw(H),Hw(Q)]})}var iNn=T.memo(sNn);function aNn(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?f.jsx("tr",{className:"diff-widget",children:f.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):f.jsxs("tr",{className:"diff-widget",children:[f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),f.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var oNn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],cNn=["hunk","widgets","className"];function B1(e,n){return(e?t_(e):"00")+(n?t_(n):"00")}function lNn(e){var n=e.hunk,t=e.widgets,r=e.className,s=i_(e,cNn),i=(function(a,o){for(var c=function(y){if(!y)return null;var x=t_(y);return o[x]||null},u=[],d=0;d=s&&r=i&&s-1},C9n=function(e,n){var t=this.__data__,r=Ny(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Kd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),d=i.get(n);if(u&&d)return u==n&&d==e;var f=-1,p=!0,m=2&t?new cEn:void 0;for(i.set(e,n),i.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},zr={};zr["[object Float32Array]"]=zr["[object Float64Array]"]=zr["[object Int8Array]"]=zr["[object Int16Array]"]=zr["[object Int32Array]"]=zr["[object Uint8Array]"]=zr["[object Uint8ClampedArray]"]=zr["[object Uint16Array]"]=zr["[object Uint32Array]"]=!0,zr["[object Arguments]"]=zr["[object Array]"]=zr["[object ArrayBuffer]"]=zr["[object Boolean]"]=zr["[object DataView]"]=zr["[object Date]"]=zr["[object Error]"]=zr["[object Function]"]=zr["[object Map]"]=zr["[object Number]"]=zr["[object Object]"]=zr["[object RegExp]"]=zr["[object Set]"]=zr["[object String]"]=zr["[object WeakMap]"]=!1;var SEn=function(e){return Fh(e)&&G6(e.length)&&!!zr[cp(e)]},CEn=function(e){return function(n){return e(n)}},CA=ag((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&YB.process,i=(function(){try{var a=r&&r.require&&r.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=i})),EA=CA&&CA.isTypedArray,V6=EA?CEn(EA):SEn,EEn=Object.prototype.hasOwnProperty,NEn=function(e,n){var t=La(e),r=!t&&Ty(e),s=!t&&!r&&xb(e),i=!t&&!r&&!s&&V6(e),a=t||r||s||i,o=a?bEn(e.length,String):[],c=o.length;for(var u in e)!EEn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||rP(u,c))||o.push(u);return o},zEn=Object.prototype,sP=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||zEn)},jEn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),AEn=Object.prototype.hasOwnProperty,iP=function(e){if(!sP(e))return jEn(e);var n=[];for(var t in Object(e))AEn.call(e,t)&&t!="constructor"&&n.push(t);return n},Ry=function(e){return e!=null&&G6(e.length)&&!JB(e)},K6=function(e){return Ry(e)?NEn(e):iP(e)},NA=function(e){return hEn(e,K6,vEn)},TEn=Object.prototype.hasOwnProperty,REn=function(e,n,t,r,s,i){var a=1&t,o=NA(e),c=o.length;if(c!=NA(n).length&&!a)return!1;for(var u=c;u--;){var d=o[u];if(!(a?d in n:TEn.call(n,d)))return!1}var f=i.get(e),p=i.get(n);if(f&&p)return f==n&&p==e;var m=!0;i.set(e,n),i.set(n,e);for(var w=a;++u1)return!1;if(e.length===1){var n=On(e,1)[0];return n.type==="text"&&!n.value}return!0}function yNn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=i_(e,vNn),a=s?function(o,c){return s(o,RA,c)}:RA;return _.jsx("td",er(er({},i),{},{"data-change-key":n,children:r?bNn(r)?" ":r.map(a):t||" "}))}var dP=T.memo(yNn);function hP(e,n){return function(){var t=n==="old"?Iy(e):$y(e);return t===-1?void 0:t}}function pP(e,n){return function(t){return e&&t?_.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function wb(e,n){return n?function(t){e(),n(t)}:e}function MA(e,n,t,r){return T.useMemo((function(){var s=fP(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=wb(t,s.onMouseEnter),s.onMouseLeave=wb(r,s.onMouseLeave),s}),[e,t,r,n])}function OA(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:hP(n,r),wrapInAnchor:pP(s,i)};return _.jsx("td",er(er({className:e},a),{},{"data-change-key":t,children:c(u)}))}function xNn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,d=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,y=e.renderGutter,x=s.type,b=s.content,C=t_(s),N=(n=On(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),z=On(N,3),A=z[0],j=z[1],M=z[2],D=T.useMemo((function(){return{change:s}}),[s]),L=MA(f,D,j,M),B=MA(p,D,j,M),U=k(s),H=c({changes:[s],defaultGenerate:function(){return o}}),Q=ja("diff-gutter","diff-gutter-".concat(x),u,{"diff-gutter-selected":i}),K=ja("diff-code","diff-code-".concat(x),d,{"diff-code-selected":i});return _.jsxs("tr",{id:U,className:ja("diff-line",H),children:[!m&&OA(Q,s,C,"old",w,U,L,A,y),!m&&OA(Q,s,C,"new",w,U,L,A,y),_.jsx(dP,er({className:K,changeKey:C,text:b,tokens:a,renderToken:v},B))]})}var wNn=T.memo(xNn);function kNn(e){var n=e.hideGutter,t=e.element;return _.jsx("tr",{className:"diff-widget",children:_.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var SNn=["hideGutter","selectedChanges","tokens","lineClassName"],CNn=["hunk","widgets","className"];function ENn(e){var n=e.hunk,t=e.widgets,r=e.className,s=i_(e,CNn),i=(function(a,o){return a.reduce((function(c,u){var d=t_(u);c.push(["change",d,u]);var f=o[d];return f&&c.push(["widget",d,f]),c}),[])})(n.changes,t);return _.jsx("tbody",{className:ja("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=On(o,3),d=u[0],f=u[1],p=u[2],m=c.hideGutter,w=c.selectedChanges,k=c.tokens,v=c.lineClassName,y=i_(c,SNn);if(d==="change"){var x=Ra(p)?"old":"new",b=Ra(p)?Iy(p):$y(p),C=k?k[x][b-1]:null;return _.jsx(wNn,er({className:v,change:p,hideGutter:m,selected:w.includes(f),tokens:C},y),"change".concat(f))}return d==="widget"?_.jsx(kNn,{hideGutter:m,element:p},"widget".concat(f)):null})(a,s)}))})}var mP=0;function B1(e,n,t,r){var s=T.useCallback((function(){return n(e)}),[e,n]),i=T.useCallback((function(){return n("")}),[n]);return T.useMemo((function(){var a=fP(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=wb(s,a.onMouseEnter),a.onMouseLeave=wb(i,a.onMouseLeave),a}),[t,r,s,e,i])}function Hw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,c=e.codeEvents,u=e.anchorID,d=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,w=e.renderToken,k=e.renderGutter;if(!n){var v=ja("diff-gutter","diff-gutter-omit",i),y=ja("diff-code","diff-code-omit",a);return[!p&&_.jsx("td",{className:v},"gutter"),_.jsx("td",{className:y},"code")]}var x=n.type,b=n.content,C=t_(n),N=t===mP?"old":"new",z=er({id:u||void 0,className:ja("diff-gutter","diff-gutter-".concat(x),A5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:hP(n,N),wrapInAnchor:pP(d,f)})},o),A=ja("diff-code","diff-code-".concat(x),A5({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&_.jsx("td",er(er({},z),{},{"data-change-key":C}),"gutter"),_.jsx(dP,er({className:A,changeKey:C,text:b,tokens:s,renderToken:w},c),"code")]}function NNn(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,c=e.monotonous,u=e.gutterClassName,d=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,y=e.renderToken,x=e.renderGutter,b=On(T.useState(""),2),C=b[0],N=b[1],z=B1("old",N,t,f),A=B1("new",N,r,f),j=B1("old",N,t,p),M=B1("new",N,r,p),D=t&&w(t),L=r&&w(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),U={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:d,gutterEvents:f,codeEvents:p,renderToken:y,renderGutter:x},H=er(er({},U),{},{change:t,side:mP,selected:s,tokens:a,gutterEvents:z,codeEvents:j,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=er(er({},U),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:L,gutterAnchor:v,gutterAnchorTarget:t===r?D:L,hover:C==="new"});if(c)return _.jsx("tr",{className:ja("diff-line",B),children:Hw(t?H:Q)});var K=(function(Z,ee){return Z&&!ee?"diff-line-old-only":!Z&&ee?"diff-line-new-only":Z===ee?"diff-line-normal":"diff-line-compare"})(t,r);return _.jsxs("tr",{className:ja("diff-line",K,B),children:[Hw(H),Hw(Q)]})}var zNn=T.memo(NNn);function jNn(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?_.jsx("tr",{className:"diff-widget",children:_.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?_.jsx("tr",{className:"diff-widget",children:_.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):_.jsxs("tr",{className:"diff-widget",children:[_.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),_.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var ANn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],TNn=["hunk","widgets","className"];function P1(e,n){return(e?t_(e):"00")+(n?t_(n):"00")}function RNn(e){var n=e.hunk,t=e.widgets,r=e.className,s=i_(e,TNn),i=(function(a,o){for(var c=function(y){if(!y)return null;var x=t_(y);return o[x]||null},u=[],d=0;d=(i==null?void 0:i.value.length))return[e];var o=function(_,p){var m=i.value.slice(_,p);return[].concat(Ta(s),[Jn(Jn({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(eh(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(_,p){return[p].concat(Ta(eh(_)))})(u,r):eh(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var r=e.children,s=i_(e,jNn);t.push(s);var i,a=q6(r);try{for(a.s();!(i=a.n()).done;)yP(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(eh([].concat(Ta(t.slice(1)),[e])));return n}function ANn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=Z6(c);return u.value.includes(` +`)})(n.oldSource,e),r=n.highlight?function(c){return n.refractor.highlight(c,n.language)}:function(c){return[{type:"text",value:c}]};return[F1(r(n.oldSource)),F1(r(t))]}var s=On(KNn(e),2),i=s[0],a=s[1],o=n.highlight?function(c){return F1(n.refractor.highlight(c,n.language))}:function(c){return F1([{type:"text",value:c}])};return[o(i),o(a)]}function eh(e){return e.map((function(n){return er({},n)}))}function QNn(e,n){return[].concat(Ta(eh(e.slice(0,-1))),[n])}function XNn(e){return e.type==="text"}function Z6(e){var n=e[e.length-1];if(XNn(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function YNn(e,n,t,r){var s=e.slice(0,-1),i=Z6(e),a=[];if(t<=0||n>=(i==null?void 0:i.value.length))return[e];var o=function(f,p){var m=i.value.slice(f,p);return[].concat(Ta(s),[er(er({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(eh(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(f,p){return[p].concat(Ta(eh(f)))})(u,r):eh(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var r=e.children,s=i_(e,ZNn);t.push(s);var i,a=q6(r);try{for(a.s();!(i=a.n()).done;)yP(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(eh([].concat(Ta(t.slice(1)),[e])));return n}function JNn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=Z6(c);return u.value.includes(` `)?u.value.split(` -`).map((function(d){return ENn(c,Jn(Jn({},u),{},{value:d}))})):[c]})(t),i=qB(s),a=i[0],o=i.slice(1);return[].concat(Ta(n.slice(0,-1)),[[].concat(Ta(r),[a])],Ta(o.map((function(c){return[c]}))))}),[[]])}function $A(e){return ANn(yP(e))}var TNn=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?Ry(e,n,void 0,t):!!r},RNn=function(e,n){return Ry(e,n)},MNn=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function ONn(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=MNn(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&TNn(t,r,(function(i,a,o){return o==="chlidren"||RNn(i,a)}))))?e.children[e.children.length-1]=(function(i,a){return"value"in i&&"value"in a?Jn(Jn({},i),{},{value:"".concat(i.value).concat(a.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function BA(e){var n,t={type:"root",children:[]},r=q6(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,c){return ONn(a,c===i.length-1?Jn({},o):Jn(Jn({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var DNn=Object.prototype.hasOwnProperty,LNn=vP((function(e,n,t){DNn.call(e,t)?e[t].push(n):X6(e,t,[n])})),INn=Object.prototype.hasOwnProperty,$Nn=function(e){if(e==null)return!0;if(Ty(e)&&(La(e)||typeof e=="string"||typeof e.splice=="function"||yb(e)||V6(e)||Ay(e)))return!e.length;var n=$5(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(sP(e))return!iP(e).length;for(var t in e)if(INn.call(e,t))return!1;return!0},BNn=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var c=On(a,2),u=c[0],d=c[1],_=d+Z6(o).value.length;if(d>s||_r.length?t:r,c=t.length>r.length?r:t,u=o.indexOf(c);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,c),new n.Diff(1,o.substring(u+c.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var d=this.diff_halfMatch_(t,r);if(d){var _=d[0],p=d[1],m=d[2],w=d[3],k=d[4],v=this.diff_main(_,m,s,i),y=this.diff_main(p,w,s,i);return v.concat([new n.Diff(0,k)],y)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,i):this.diff_bisect_(t,r,i)},n.prototype.diff_lineMode_=function(t,r,s){var i=this.diff_linesToChars_(t,r);t=i.chars1,r=i.chars2;var a=i.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var c=0,u=0,d=0,_="",p="";c=1&&d>=1){o.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(_,p,!1,s),w=m.length-1;w>=0;w--)o.splice(c,0,m[w]);c+=m.length}d=0,u=0,_="",p=""}c++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var i=t.length,a=r.length,o=Math.ceil((i+a)/2),c=o,u=2*o,d=new Array(u),_=new Array(u),p=0;ps);b++){for(var C=-b+k;C<=b-v;C+=2){for(var N=c+C,z=(L=C==-b||C!=b&&d[N-1]i)v+=2;else if(z>a)k+=2;else if(w&&(M=c+m-C)>=0&&M=(j=i-_[M]))return this.diff_bisectSplit_(t,r,L,z,s)}for(var A=-b+y;A<=b-x;A+=2){for(var j,M=c+A,D=(j=A==-b||A!=b&&_[M-1]<_[M+1]?_[M+1]:_[M-1]+1)-A;ji)x+=2;else if(D>a)y+=2;else if(!w&&(N=c+m-A)>=0&&N=(j=i-j))return this.diff_bisectSplit_(t,r,L,z,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,i,a){var o=t.substring(0,s),c=r.substring(0,i),u=t.substring(s),d=r.substring(i),_=this.diff_main(o,c,!1,a),p=this.diff_main(u,d,!1,a);return _.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var d="",_=0,p=-1,m=s.length;pi?t=t.substring(s-i):sr.length?t:r,i=t.length>r.length?r:t;if(s.length<4||2*i.length=k.length?[x,b,C,N,j]:null}var c,u,d,_,p,m=o(s,i,Math.ceil(s.length/4)),w=o(s,i,Math.ceil(s.length/2));return m||w?(c=w?m&&m[4].length>w[4].length?m:w:m,t.length>r.length?(u=c[0],d=c[1],_=c[2],p=c[3]):(_=c[0],p=c[1],u=c[2],d=c[3]),[u,d,_,p,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,c=0,u=0,d=0,_=0;o0?s[i-1]:-1,c=0,u=0,d=0,_=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(w>=p.length/2||w>=m.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,w))),t[o-1][1]=p.substring(0,p.length-w),t[o+1][1]=m.substring(w),o++):(k>=p.length/2||k>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,k))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-k),t[o+1][0]=-1,t[o+1][1]=p.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,v){if(!k||!v)return 6;var y=k.charAt(k.length-1),x=v.charAt(0),b=y.match(n.nonAlphaNumericRegex_),C=x.match(n.nonAlphaNumericRegex_),N=b&&y.match(n.whitespaceRegex_),z=C&&x.match(n.whitespaceRegex_),A=N&&y.match(n.linebreakRegex_),j=z&&x.match(n.linebreakRegex_),M=A&&k.match(n.blanklineEndRegex_),D=j&&v.match(n.blanklineStartRegex_);return M||D?5:A||j?4:b&&!N&&z?3:N||z?2:b||C?1:0}for(var s=1;s=m&&(m=w,d=i,_=a,p=o)}t[s-1][1]!=d&&(d?t[s-1][1]=d:(t.splice(s-1,1),s--),t[s][1]=_,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var r=!1,s=[],i=0,a=null,o=0,c=!1,u=!1,d=!1,_=!1;o0?s[i-1]:-1,d=_=!1),r=!0)),o++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,i=0,a=0,o="",c="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(c,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(c,o))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.length-r),o=o.substring(0,o.length-r))),s-=i+a,t.splice(s,i+a),o.length&&(t.splice(s,0,new n.Diff(-1,o)),s++),c.length&&(t.splice(s,0,new n.Diff(1,c)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,i=0,o="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,c=a;return t.length!=s&&t[s][0]===-1?c:c+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,c=0;c");switch(u){case 1:r[c]=''+d+"";break;case-1:r[c]=''+d+"";break;case 0:r[c]=""+d+""}}return r.join("")},n.prototype.diff_text1=function(t){for(var r=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(r),a=this;function o(z,A){var j=z/r.length,M=Math.abs(s-A);return a.Match_Distance?j+M/a.Match_Distance:M?1:j}var c=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(c=Math.min(o(0,u),c),(u=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(o(0,u),c)));var d,_,p=1<=v;b--){var C=i[t.charAt(b-1)];if(x[b]=k===0?(x[b+1]<<1|1)&C:(x[b+1]<<1|1)&C|(m[b+1]|m[b])<<1|1|m[b+1],x[b]&p){var N=o(k,b-1);if(N<=c){if(c=N,!((u=b-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>c)break;m=x}return u},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)a=t,i=this.diff_text1(a);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)i=t,a=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");i=t,a=s}if(a.length===0)return[];for(var o=[],c=new n.patch_obj,u=0,d=0,_=0,p=i,m=i,w=0;w=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),o.push(c),c=new n.patch_obj,u=0,p=m,d=_)}k!==1&&(d+=v.length),k!==-1&&(_+=v.length)}return u&&(this.patch_addContext_(c,p),o.push(c)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(c=this.match_main(r,_.substring(0,this.Match_MaxBits),d))!=-1&&((p=this.match_main(r,_.substring(_.length-this.Match_MaxBits),d+_.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(r,_,d),c==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=c-d,_==(u=p==-1?r.substring(c,c+_.length):r.substring(c,p+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[o].diffs)+r.substring(c+_.length);else{var m=this.diff_main(_,u,!1);if(_.length>this.Match_MaxBits&&this.diff_levenshtein(m)/_.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var w,k=0,v=0;vo[0][1].length){var c=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}return(o=(a=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),a.length1+=r,a.length2+=r):r>o[o.length-1][1].length&&(c=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,d=!1,u.diffs.push(new n.Diff(_,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,_===0?(u.length2+=p.length,o+=p.length):d=!1,u.diffs.push(new n.Diff(_,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new n.Diff(0,m))),d||t.splice(++s,0,u)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;ss||fr.length?t:r,c=t.length>r.length?r:t,u=o.indexOf(c);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,c),new n.Diff(1,o.substring(u+c.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var d=this.diff_halfMatch_(t,r);if(d){var f=d[0],p=d[1],m=d[2],w=d[3],k=d[4],v=this.diff_main(f,m,s,i),y=this.diff_main(p,w,s,i);return v.concat([new n.Diff(0,k)],y)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,i):this.diff_bisect_(t,r,i)},n.prototype.diff_lineMode_=function(t,r,s){var i=this.diff_linesToChars_(t,r);t=i.chars1,r=i.chars2;var a=i.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var c=0,u=0,d=0,f="",p="";c=1&&d>=1){o.splice(c-u-d,u+d),c=c-u-d;for(var m=this.diff_main(f,p,!1,s),w=m.length-1;w>=0;w--)o.splice(c,0,m[w]);c+=m.length}d=0,u=0,f="",p=""}c++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var i=t.length,a=r.length,o=Math.ceil((i+a)/2),c=o,u=2*o,d=new Array(u),f=new Array(u),p=0;ps);b++){for(var C=-b+k;C<=b-v;C+=2){for(var N=c+C,z=(L=C==-b||C!=b&&d[N-1]i)v+=2;else if(z>a)k+=2;else if(w&&(M=c+m-C)>=0&&M=(j=i-f[M]))return this.diff_bisectSplit_(t,r,L,z,s)}for(var A=-b+y;A<=b-x;A+=2){for(var j,M=c+A,D=(j=A==-b||A!=b&&f[M-1]i)x+=2;else if(D>a)y+=2;else if(!w&&(N=c+m-A)>=0&&N=(j=i-j))return this.diff_bisectSplit_(t,r,L,z,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,i,a){var o=t.substring(0,s),c=r.substring(0,i),u=t.substring(s),d=r.substring(i),f=this.diff_main(o,c,!1,a),p=this.diff_main(u,d,!1,a);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var d="",f=0,p=-1,m=s.length;pi?t=t.substring(s-i):sr.length?t:r,i=t.length>r.length?r:t;if(s.length<4||2*i.length=k.length?[x,b,C,N,j]:null}var c,u,d,f,p,m=o(s,i,Math.ceil(s.length/4)),w=o(s,i,Math.ceil(s.length/2));return m||w?(c=w?m&&m[4].length>w[4].length?m:w:m,t.length>r.length?(u=c[0],d=c[1],f=c[2],p=c[3]):(f=c[0],p=c[1],u=c[2],d=c[3]),[u,d,f,p,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,c=0,u=0,d=0,f=0;o0?s[i-1]:-1,c=0,u=0,d=0,f=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=k?(w>=p.length/2||w>=m.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,w))),t[o-1][1]=p.substring(0,p.length-w),t[o+1][1]=m.substring(w),o++):(k>=p.length/2||k>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,k))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-k),t[o+1][0]=-1,t[o+1][1]=p.substring(k),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,v){if(!k||!v)return 6;var y=k.charAt(k.length-1),x=v.charAt(0),b=y.match(n.nonAlphaNumericRegex_),C=x.match(n.nonAlphaNumericRegex_),N=b&&y.match(n.whitespaceRegex_),z=C&&x.match(n.whitespaceRegex_),A=N&&y.match(n.linebreakRegex_),j=z&&x.match(n.linebreakRegex_),M=A&&k.match(n.blanklineEndRegex_),D=j&&v.match(n.blanklineStartRegex_);return M||D?5:A||j?4:b&&!N&&z?3:N||z?2:b||C?1:0}for(var s=1;s=m&&(m=w,d=i,f=a,p=o)}t[s-1][1]!=d&&(d?t[s-1][1]=d:(t.splice(s-1,1),s--),t[s][1]=f,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var r=!1,s=[],i=0,a=null,o=0,c=!1,u=!1,d=!1,f=!1;o0?s[i-1]:-1,d=f=!1),r=!0)),o++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,i=0,a=0,o="",c="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(c,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(c,o))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.length-r),o=o.substring(0,o.length-r))),s-=i+a,t.splice(s,i+a),o.length&&(t.splice(s,0,new n.Diff(-1,o)),s++),c.length&&(t.splice(s,0,new n.Diff(1,c)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,i=0,o="",c=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,c=a;return t.length!=s&&t[s][0]===-1?c:c+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,c=0;c");switch(u){case 1:r[c]=''+d+"";break;case-1:r[c]=''+d+"";break;case 0:r[c]=""+d+""}}return r.join("")},n.prototype.diff_text1=function(t){for(var r=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(r),a=this;function o(z,A){var j=z/r.length,M=Math.abs(s-A);return a.Match_Distance?j+M/a.Match_Distance:M?1:j}var c=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(c=Math.min(o(0,u),c),(u=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(o(0,u),c)));var d,f,p=1<=v;b--){var C=i[t.charAt(b-1)];if(x[b]=k===0?(x[b+1]<<1|1)&C:(x[b+1]<<1|1)&C|(m[b+1]|m[b])<<1|1|m[b+1],x[b]&p){var N=o(k,b-1);if(N<=c){if(c=N,!((u=b-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>c)break;m=x}return u},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)a=t,i=this.diff_text1(a);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)i=t,a=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");i=t,a=s}if(a.length===0)return[];for(var o=[],c=new n.patch_obj,u=0,d=0,f=0,p=i,m=i,w=0;w=2*this.Patch_Margin&&u&&(this.patch_addContext_(c,p),o.push(c),c=new n.patch_obj,u=0,p=m,d=f)}k!==1&&(d+=v.length),k!==-1&&(f+=v.length)}return u&&(this.patch_addContext_(c,p),o.push(c)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(c=this.match_main(r,f.substring(0,this.Match_MaxBits),d))!=-1&&((p=this.match_main(r,f.substring(f.length-this.Match_MaxBits),d+f.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(r,f,d),c==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=c-d,f==(u=p==-1?r.substring(c,c+f.length):r.substring(c,p+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[o].diffs)+r.substring(c+f.length);else{var m=this.diff_main(f,u,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(m)/f.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var w,k=0,v=0;vo[0][1].length){var c=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=c,a.start2-=c,a.length1+=c,a.length2+=c}return(o=(a=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),a.length1+=r,a.length2+=r):r>o[o.length-1][1].length&&(c=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,c),a.length1+=c,a.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,d=!1,u.diffs.push(new n.Diff(f,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,f===0?(u.length2+=p.length,o+=p.length):d=!1,u.diffs.push(new n.Diff(f,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}c=(c=this.diff_text2(u.diffs)).substring(c.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new n.Diff(0,m))),d||t.splice(++s,0,u)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?GNn:VNn,r=Y6(e.map((function(o){return o.changes})),xP).map(t).reduce((function(o,c){var u=On(o,2),d=u[0],_=u[1],p=On(c,2),m=p[0],w=p[1];return[d.concat(m),_.concat(w)]}),[[],[]]),s=On(r,2),i=s[0],a=s[1];return PNn(FA(i),FA(a))}var WNn=["enhancers"],GA=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=On(CNn(e,i_(t,WNn)),2),a=i[0],o=i[1],c=[$A(a),$A(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),d=On(u,2),_=d[0],p=d[1],m=[_.map(BA),p.map(BA)],w=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:w.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const P5=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),QNn=2e3,XNn={highlight(e,n){return Pt.highlight(e,n).children}};function YNn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function By(e){let n=0,t=0;for(const r of e.hunks)for(const s of r.changes)s.type==="insert"?n++:s.type==="delete"&&t++;return{additions:n,deletions:t}}function ZNn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function F5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function JNn(e){const n=[KNn(e.hunks,{type:"line"})],t=o6(ZNn(e));return t&&Pt.registered(t)?GA(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:XNn}):GA(e.hunks,{enhancers:n,highlight:!1})}function kP(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:R5(e,{nearbySequences:"zip"}),failed:!1}}catch{if(n){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),r=t[t.length-1];if(t.length>1&&r!==void 0)try{return{files:R5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const ezn=({change:e,side:n})=>n==="old"?null:YNn(e);function SP({bytesRead:e,byteLimit:n}){return f.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[f.jsx("h4",{children:gKe()}),f.jsx("p",{children:vWe({limit:Ae(Dl(n)),read:Ae(Dl(e))})})]})}function CP({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>By(e),[e]),a=t&&s+i<=QNn,o=T.useMemo(()=>{if(a)try{return JNn(e)}catch{return}},[e,a]);return f.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[f.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-canvas cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(c=>!c),children:[f.jsx("span",{className:"chev",children:t?f.jsx(qc,{size:14}):f.jsx(yo,{size:14})}),f.jsx("span",{className:"path",children:f.jsx("code",{children:F5(e)})}),f.jsxs("span",{className:"stats",children:[f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:GKe()}):f.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:f.jsx(pNn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:ezn,tokens:o,viewType:"unified"})}))]})}function tzn({files:e,className:n}){return f.jsx("div",{className:n?`${P5} ${n}`:P5,children:e.map((t,r)=>f.jsx(CP,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function nzn(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function EP({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>kP(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,w)=>({file:m,key:`${m.oldPath}→${m.newPath}#${w}`,changes:By(m)})),[r]),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=o&&!n,d=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,_=s.find(m=>m.key===d)??null;return t.failed?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?$Ke():_We()}):s.length===0?f.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:TKe()}):f.jsxs("div",{className:"diff-explorer @container",children:[f.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[f.jsx("strong",{className:"font-medium",children:n?s.length===1?sWe():SKe({count:ln(s.length)}):s.length===1?xL():yL({count:ln(s.length)})}),!n&&f.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?YVe():CWe()})]}),u?f.jsx(tzn,{files:r}):f.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[f.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-surface [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":uKe(),children:s.map(m=>f.jsxs("button",{type:"button",className:m.key===d?"active":"","aria-pressed":m.key===d,onClick:()=>a(m.key),children:[f.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:nzn(m.file)}),f.jsx("code",{title:F5(m.file),children:F5(m.file)}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),f.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),f.jsx("div",{className:`${P5} diff-explorer-preview min-w-0`,children:_&&f.jsx(CP,{file:_.file,defaultExpanded:!0},_.key)})]})]})}const rzn="/assets/slurm-logo-aGSXVZcE.svg",szn="/assets/thinking-machines-BOdslTfm.png";function izn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return pL();case"tinker_job":return"Tinker";default:return e||"—"}}function azn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[f.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),f.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),f.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),f.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),f.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),f.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),f.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function ozn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[f.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),f.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),f.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),f.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),f.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),f.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),f.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),f.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#BFF9B4"}),f.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),f.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[f.jsx("stop",{stopColor:"#80EE64"}),f.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),f.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),f.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),f.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),f.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),f.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function czn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:f.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function lzn({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:f.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function uzn({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[f.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),f.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function _zn({size:e=16}){return f.jsx("img",{className:"tinker-logo block flex-none object-contain",src:szn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function fzn({size:e=16}){return f.jsx("img",{className:"block flex-none object-contain",src:rzn,width:e,height:e,alt:"","aria-hidden":"true"})}function J6({size:e=16}){return f.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function lp({kind:e,size:n=16}){switch(e){case"modal_job":return f.jsx(ozn,{size:n});case"hf_job":return f.jsx(azn,{size:n});case"k8s_job":return f.jsx(czn,{size:n});case"ssh_job":return f.jsx(Hj,{size:n,strokeWidth:1.5});case"slurm_job":return f.jsx(fzn,{size:n});case"ray_job":return f.jsx(lzn,{size:n});case"openresearch_job":return f.jsx(uzn,{size:n});case"tinker_job":return f.jsx(_zn,{size:n});case"local_job":return f.jsx(N6n,{size:n,strokeWidth:1.5});default:return f.jsx(Hj,{size:n})}}function eC({backend:e}){const n=BS(e),t=A3n(e);return n?f.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[f.jsx(lp,{kind:n}),f.jsx("span",{className:"backend-name",children:izn(n)}),t&&f.jsx("span",{className:"backend-detail text-sm",children:t})]}):f.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function dzn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:d,onFiles:_,onTerminal:p,onArtifacts:m,onExperiments:w,onSideChat:k}){var A,j;const v=P8n(n,t,c),y=T.useRef(null),x=ra(y),b=ft({...qI(a),enabled:e}),C=((A=b.data)==null?void 0:A.configuredDefaultBackend)??((j=b.data)==null?void 0:j.defaultBackend),N=C?Of[C]():b.isPending?"…":b.isError?ho():W3(),z=[{id:"files",label:O3(),Icon:vo,onClick:_},{id:"artifacts",label:nL(),Icon:QS,onClick:m},{id:"experiments",label:rL(),Icon:Bh,onClick:w}];return f.jsx("div",{className:`workspace-tools absolute end-3.5 top-7 z-30 ${s===void 0?"win-titlebar:top-10":""}`,style:{insetInlineEnd:s},children:e?f.jsxs("nav",{"aria-label":Cw(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:Cw()}),z.filter(M=>M.id!=="files").map(({id:M,label:D,Icon:L,onClick:B})=>f.jsx(on,{className:"min-h-7 py-1","data-onboarding":M==="artifacts"?"nav-artifacts":void 0,onClick:B,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(L,{size:15}),D]})},M)),f.jsx(on,{className:"py-1",onClick:o,children:f.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[f.jsx(KS,{size:15,className:"shrink-0"}),sxn()]}),f.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[C&&f.jsx(lp,{kind:`${C}_job`,size:12}),f.jsx("span",{className:"wrap-anywhere",children:N})]})]})}),f.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[f.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:qxn()}),f.jsx(on,{className:"min-h-7 py-1",onClick:_,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(vo,{size:15}),O3()]})}),f.jsx(on,{className:"min-h-7 py-1",onClick:p,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(Ko,{size:15}),ib()]})}),k&&f.jsx(on,{className:"min-h-7 py-1",onClick:k,children:f.jsxs("span",{className:"flex items-center gap-4",children:[f.jsx(tm,{size:15}),X3()]})}),c&&f.jsx(hzn,{sessionId:c,busy:u,onChanges:d},c),v.length>0&&f.jsxs("div",{children:[f.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[f.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:f.jsx(ch,{tone:"success",live:!0})}),f.jsx("span",{children:Yyn()})]}),v.map(M=>f.jsx(on,{className:"min-h-7 py-1",onClick:()=>r(M.experiment.id,M.run.id),children:f.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${M.experiment.title||M.experiment.slug} · ${H6(Aa(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):f.jsxs("nav",{"aria-label":Cw(),className:"flex items-center justify-end gap-3",children:[z.map(({id:M,label:D,Icon:L,onClick:B})=>f.jsx(At,{active:i===M,className:"text-text [&.active]:text-text","data-tip":D,"data-tip-align":M==="experiments"?"end":void 0,"aria-label":D,"aria-pressed":i===M,onClick:B,children:f.jsx(L,{size:15})},M)),f.jsxs("div",{className:"relative",children:[f.jsx(At,{ref:y,active:i==="terminal"||x.open,className:"text-text [&.active]:text-text","data-tip":x.open?void 0:cj(),"data-tip-align":"end","aria-label":cj(),"aria-expanded":x.open,"aria-haspopup":"menu",onClick:()=>x.setOpen(M=>!M),children:f.jsx(ip,{size:15})}),x.open&&f.jsxs("div",{ref:x.ref,role:"menu",className:"absolute end-0 top-[calc(100%_+_4px)] z-50 flex min-w-40 flex-col rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx(on,{role:"menuitem",onClick:()=>{x.setOpen(!1),p()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(Ko,{size:15}),ib()]})}),k&&f.jsx(on,{role:"menuitem",onClick:()=>{x.setOpen(!1),k()},children:f.jsxs("span",{className:"flex items-center gap-2.5",children:[f.jsx(tm,{size:15}),X3()]})})]})]})]})})}function hzn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=ft({...vb(e),refetchInterval:n?5e3:!1}),s=T.useRef(n),{refetch:i}=r;T.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const d=kP(a.diff.diff,!1);return d.failed?null:d.files.map(By).reduce((_,p)=>({additions:_.additions+p.additions,deletions:_.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?f.jsxs(on,{className:"min-h-7 py-1",onClick:t,title:a.branch??DS(),children:[f.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[f.jsx(tg,{size:15,className:"shrink-0"}),f.jsx("span",{children:dL()})]}),o?f.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[f.jsxs("span",{className:"text-accent-green",children:["+",ln(o.additions)]}),f.jsxs("span",{className:"text-accent-red",children:["−",ln(o.deletions)]})]}):f.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?xL():yL({count:ln(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function pzn({projectId:e,sessionId:n,active:t}){const r=T.useRef(null),s=T.useRef(null),[i,a]=T.useState(null),[o,c]=T.useState(0);return T.useEffect(()=>{const u=r.current;if(!u)return;const d=py(u,!1,!0,"app"),{terminal:_,dispose:p}=d;s.current=d,a(null);const m=location.protocol==="https:"?"wss:":"ws:",w=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&w.searchParams.set("sessionId",n);const k=new WebSocket(w);k.binaryType="arraybuffer";let v=!1;const y=C=>{v||(v=!0,_.options.disableStdin=!0,_.blur(),_.writeln(`\r -${C}`),a(C))},x=_.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),b=_.onResize(({cols:C,rows:N})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:N}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:_.cols,rows:_.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){_.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let N;try{N=JSON.parse(C.data)}catch{return}Zf(N)&&(N.type==="exit"?y(jxn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&y(N.error))},k.onclose=()=>y(lj()),k.onerror=()=>y(lj()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,x.dispose(),b.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var d,_;(d=s.current)==null||d.fit(),(_=s.current)==null||_.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),f.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":ib(),children:[f.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),f.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&f.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:f.jsx(Oe,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Lxn()})})]})}const mzn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gzn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vzn={};function VA(e,n){return(vzn.jsx?gzn:mzn).test(e)}const bzn=/[ \t\n\f\r]/g;function yzn(e){return typeof e=="object"?e.type==="text"?KA(e.value):!1:KA(e)}function KA(e){return e.replace(bzn,"")===""}var Bd={},qw,WA;function xzn(){if(WA)return qw;WA=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=` -`,u="/",d="*",_="",p="comment",m="declaration";function w(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var x=1,b=1;function C(H){var Q=H.match(n);Q&&(x+=Q.length);var K=H.lastIndexOf(c);b=~K?H.length-K:b+H.length}function N(){var H={line:x,column:b};return function(Q){return Q.position=new z(H),M(),Q}}function z(H){this.start=H,this.end={line:x,column:b},this.source=y.source}z.prototype.content=v;function A(H){var Q=new Error(y.source+":"+x+":"+b+": "+H);if(Q.reason=H,Q.filename=y.source,Q.line=x,Q.column=b,Q.source=v,!y.silent)throw Q}function j(H){var Q=H.exec(v);if(Q){var K=Q[0];return C(K),v=v.slice(K.length),Q}}function M(){j(t)}function D(H){var Q;for(H=H||[];Q=L();)Q!==!1&&H.push(Q);return H}function L(){var H=N();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var Q=2;_!=v.charAt(Q)&&(d!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,_===v.charAt(Q-1))return A("End of comment missing");var K=v.slice(2,Q-2);return b+=2,C(K),v=v.slice(Q),b+=2,H({type:p,comment:K})}}function B(){var H=N(),Q=j(r);if(Q){if(L(),!j(s))return A("property missing ':'");var K=j(i),Z=H({type:m,property:k(Q[0].replace(e,_)),value:K?k(K[0].replace(e,_)):_});return j(a),Z}}function U(){var H=[];D(H);for(var Q;Q=B();)Q!==!1&&(H.push(Q),D(H));return H}return M(),U()}function k(v){return v?v.replace(o,_):_}return qw=w,qw}var QA;function wzn(){if(QA)return Bd;QA=1;var e=Bd&&Bd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.default=t;const n=e(xzn());function t(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,n.default)(r),o=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;o?s(u,d,c):d&&(i=i||{},i[u]=d)}),i}return Bd}var f0={},XA;function kzn(){if(XA)return f0;XA=1,Object.defineProperty(f0,"__esModule",{value:!0}),f0.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return f0.camelCase=c,f0}var d0,YA;function Szn(){if(YA)return d0;YA=1;var e=d0&&d0.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(wzn()),t=kzn();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(a[(0,t.camelCase)(o,i)]=c)}),a}return r.default=r,d0=r,d0}var Czn=Szn();const Ezn=qm(Czn),NP=zP("end"),tC=zP("start");function zP(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Nzn(e){const n=tC(e),t=NP(e);if(n&&t)return{start:n,end:t}}function L0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ZA(e.position):"start"in e||"end"in e?ZA(e):"line"in e||"column"in e?H5(e):""}function H5(e){return JA(e&&e.line)+":"+JA(e&&e.column)}function ZA(e){return H5(e&&e.start)+"-"+H5(e&&e.end)}function JA(e){return e&&typeof e=="number"?e:1}class vi extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?s=n:!i.cause&&n&&(a=!0,s=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=L0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vi.prototype.file="";vi.prototype.name="";vi.prototype.reason="";vi.prototype.message="";vi.prototype.stack="";vi.prototype.column=void 0;vi.prototype.line=void 0;vi.prototype.ancestors=void 0;vi.prototype.cause=void 0;vi.prototype.fatal=void 0;vi.prototype.place=void 0;vi.prototype.ruleId=void 0;vi.prototype.source=void 0;const nC={}.hasOwnProperty,zzn=new Map,jzn=/[A-Z]/g,Azn=new Set(["table","tbody","thead","tfoot","tr"]),Tzn=new Set(["td","th"]),jP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function AP(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bzn(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=$zn(t,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Sy:mB,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=TP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function TP(e,n,t){if(n.type==="element")return Rzn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Mzn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Dzn(e,n,t);if(n.type==="mdxjsEsm")return Ozn(e,n);if(n.type==="root")return Lzn(e,n,t);if(n.type==="text")return Izn(e,n)}function Rzn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Sy,e.schema=s),e.ancestors.push(n);const i=MP(e,n.tagName,!1),a=Pzn(e,n);let o=sC(e,n);return Azn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!yzn(c):!0})),RP(e,a,i,n),rC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function Mzn(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}_m(e,n.position)}function Ozn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);_m(e,n.position)}function Dzn(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Sy,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:MP(e,n.name,!0),a=Fzn(e,n),o=sC(e,n);return RP(e,a,i,n),rC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function Lzn(e,n,t){const r={};return rC(r,sC(e,n)),e.create(n,e.Fragment,r,t)}function Izn(e,n){return n.value}function RP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function rC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function $zn(e,n,t){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?t:n;return o?u(i,a,o):u(i,a)}}function Bzn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=tC(r);return n(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Pzn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&nC.call(n.properties,s)){const i=Hzn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Tzn.has(n.tagName)?r=o:t[a]=o}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Fzn(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else _m(e,n.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else _m(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function sC(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:zzn;for(;++rs?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);i0?(Ma(e,e.length,0,n),e):n}const tT={}.hasOwnProperty;function DP(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Go(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ri=m_(/[A-Za-z]/),mi=m_(/[\dA-Za-z]/),Yzn=m_(/[#-'*+\--9=?A-Z^-~]/);function wb(e){return e!==null&&(e<32||e===127)}const q5=m_(/\d/),Zzn=m_(/[\dA-Fa-f]/),Jzn=m_(/[!-/:-@[-`{-~]/);function It(e){return e!==null&&e<-2}function xr(e){return e!==null&&(e<0||e===32)}function zn(e){return e===-2||e===-1||e===32}const Py=m_(new RegExp("\\p{P}|\\p{S}","u")),Df=m_(/\s/);function m_(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function up(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&i<57344){const o=e.charCodeAt(t+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+s+1,a=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function Cn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return zn(c)?(e.enter(t),o(c)):n(c)}function o(c){return zn(c)&&i++a))return;const A=n.events.length;let j=A,M,D;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){D=n.events[j][1].end;break}M=!0}for(y(r),z=A;zb;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=b}function x(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function sjn(e,n,t){return Cn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hh(e){if(e===null||xr(e)||Df(e))return 1;if(Py(e))return 2}function Fy(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const _={...e[r][1].end},p={...e[t][1].start};rT(_,-c),rT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:_,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[t][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fo(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=fo(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=fo(u,Fy(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=fo(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=fo(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,Ma(e,r-1,t-r+3,u),t=r+u.length-d-2;break}}for(t=-1;++t0&&zn(z)?Cn(e,x,"linePrefix",i+1)(z):x(z)}function x(z){return z===null||It(z)?e.check(sT,k,C)(z):(e.enter("codeFlowValue"),b(z))}function b(z){return z===null||It(z)?(e.exit("codeFlowValue"),x(z)):(e.consume(z),b)}function C(z){return e.exit("codeFenced"),n(z)}function N(z,A,j){let M=0;return D;function D(Q){return z.enter("lineEnding"),z.consume(Q),z.exit("lineEnding"),L}function L(Q){return z.enter("codeFencedFence"),zn(Q)?Cn(z,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(z.enter("codeFencedFenceSequence"),U(Q)):j(Q)}function U(Q){return Q===o?(M++,z.consume(Q),U):M>=a?(z.exit("codeFencedFenceSequence"),zn(Q)?Cn(z,H,"whitespace")(Q):H(Q)):j(Q)}function H(Q){return Q===null||It(Q)?(z.exit("codeFencedFence"),A(Q)):j(Q)}}}function mjn(e,n,t){const r=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const Gw={name:"codeIndented",tokenize:vjn},gjn={partial:!0,tokenize:bjn};function vjn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),Cn(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):It(u)?e.attempt(gjn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||It(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function bjn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):It(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Cn(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):It(a)?s(a):t(a)}}const yjn={name:"codeText",previous:wjn,resolve:xjn,tokenize:kjn};function xjn(e){let n=e.length-4,t=3,r,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const s=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&h0(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),h0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),h0(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function FP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return _;function _(y){return y===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(y),e.exit(i),p):y===null||y===32||y===41||wb(y)?t(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(y))}function p(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===62?(e.exit("chunkString"),e.exit(o),p(y)):y===null||y===60||It(y)?t(y):(e.consume(y),y===92?w:m)}function w(y){return y===60||y===62||y===92?(e.consume(y),m):m(y)}function k(y){return!d&&(y===null||y===41||xr(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(y)):d999||m===null||m===91||m===93&&!c||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(i),e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):It(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===null||m===91||m===93||It(m)||o++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!zn(m)),m===92?p:_)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,_):_(m)}}function qP(e,n,t,r,s,i){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,c):t(p)}function c(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),n):(e.enter(i),u(p))}function u(p){return p===a?(e.exit(i),c(a)):p===null?t(p):It(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Cn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||It(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?_:d)}function _(p){return p===a||p===92?(e.consume(p),d):d(p)}}function I0(e,n){let t;return r;function r(s){return It(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):zn(s)?Cn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const Tjn={name:"definition",tokenize:Mjn},Rjn={partial:!0,tokenize:Ojn};function Mjn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return HP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=Go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return xr(m)?I0(e,u)(m):u(m)}function u(m){return FP(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(Rjn,_,_)(m)}function _(m){return zn(m)?Cn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||It(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function Ojn(e,n,t){return r;function r(o){return xr(o)?I0(e,s)(o):t(o)}function s(o){return qP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return zn(o)?Cn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||It(o)?n(o):t(o)}}const Djn={name:"hardBreakEscape",tokenize:Ljn};function Ljn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return It(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const Ijn={name:"headingAtx",resolve:$jn,tokenize:Bjn};function $jn(e,n){let t=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ma(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function Bjn(e,n,t){let r=0;return s;function s(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||xr(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||It(d)?(e.exit("atxHeading"),n(d)):zn(d)?Cn(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||xr(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const Pjn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],aT=["pre","script","style","textarea"],Fjn={concrete:!0,name:"htmlFlow",resolveTo:Ujn,tokenize:Gjn},Hjn={partial:!0,tokenize:Kjn},qjn={partial:!0,tokenize:Vjn};function Ujn(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Gjn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(V){return d(V)}function d(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),_}function _(V){return V===33?(e.consume(V),p):V===47?(e.consume(V),i=!0,k):V===63?(e.consume(V),s=3,r.interrupt?n:I):Ri(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function p(V){return V===45?(e.consume(V),s=2,m):V===91?(e.consume(V),s=5,o=0,w):Ri(V)?(e.consume(V),s=4,r.interrupt?n:I):t(V)}function m(V){return V===45?(e.consume(V),r.interrupt?n:I):t(V)}function w(V){const ie="CDATA[";return V===ie.charCodeAt(o++)?(e.consume(V),o===ie.length?r.interrupt?n:B:w):t(V)}function k(V){return Ri(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function v(V){if(V===null||V===47||V===62||xr(V)){const ie=V===47,oe=a.toLowerCase();return!ie&&!i&&aT.includes(oe)?(s=1,r.interrupt?n(V):B(V)):Pjn.includes(a.toLowerCase())?(s=6,ie?(e.consume(V),y):r.interrupt?n(V):B(V)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(V):i?x(V):b(V))}return V===45||mi(V)?(e.consume(V),a+=String.fromCharCode(V),v):t(V)}function y(V){return V===62?(e.consume(V),r.interrupt?n:B):t(V)}function x(V){return zn(V)?(e.consume(V),x):D(V)}function b(V){return V===47?(e.consume(V),D):V===58||V===95||Ri(V)?(e.consume(V),C):zn(V)?(e.consume(V),b):D(V)}function C(V){return V===45||V===46||V===58||V===95||mi(V)?(e.consume(V),C):N(V)}function N(V){return V===61?(e.consume(V),z):zn(V)?(e.consume(V),N):b(V)}function z(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(e.consume(V),c=V,A):zn(V)?(e.consume(V),z):j(V)}function A(V){return V===c?(e.consume(V),c=null,M):V===null||It(V)?t(V):(e.consume(V),A)}function j(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||xr(V)?N(V):(e.consume(V),j)}function M(V){return V===47||V===62||zn(V)?b(V):t(V)}function D(V){return V===62?(e.consume(V),L):t(V)}function L(V){return V===null||It(V)?B(V):zn(V)?(e.consume(V),L):t(V)}function B(V){return V===45&&s===2?(e.consume(V),K):V===60&&s===1?(e.consume(V),Z):V===62&&s===4?(e.consume(V),F):V===63&&s===3?(e.consume(V),I):V===93&&s===5?(e.consume(V),$):It(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Hjn,q,U)(V)):V===null||It(V)?(e.exit("htmlFlowData"),U(V)):(e.consume(V),B)}function U(V){return e.check(qjn,H,q)(V)}function H(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),Q}function Q(V){return V===null||It(V)?U(V):(e.enter("htmlFlowData"),B(V))}function K(V){return V===45?(e.consume(V),I):B(V)}function Z(V){return V===47?(e.consume(V),a="",ee):B(V)}function ee(V){if(V===62){const ie=a.toLowerCase();return aT.includes(ie)?(e.consume(V),F):B(V)}return Ri(V)&&a.length<8?(e.consume(V),a+=String.fromCharCode(V),ee):B(V)}function $(V){return V===93?(e.consume(V),I):B(V)}function I(V){return V===62?(e.consume(V),F):V===45&&s===2?(e.consume(V),I):B(V)}function F(V){return V===null||It(V)?(e.exit("htmlFlowData"),q(V)):(e.consume(V),F)}function q(V){return e.exit("htmlFlow"),n(V)}}function Vjn(e,n,t){const r=this;return s;function s(a){return It(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):t(a)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function Kjn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ag,n,t)}}const Wjn={name:"htmlText",tokenize:Qjn};function Qjn(e,n,t){const r=this;let s,i,a;return o;function o(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),N):I===63?(e.consume(I),b):Ri(I)?(e.consume(I),j):t(I)}function u(I){return I===45?(e.consume(I),d):I===91?(e.consume(I),i=0,w):Ri(I)?(e.consume(I),x):t(I)}function d(I){return I===45?(e.consume(I),m):t(I)}function _(I){return I===null?t(I):I===45?(e.consume(I),p):It(I)?(a=_,Z(I)):(e.consume(I),_)}function p(I){return I===45?(e.consume(I),m):_(I)}function m(I){return I===62?K(I):I===45?p(I):_(I)}function w(I){const F="CDATA[";return I===F.charCodeAt(i++)?(e.consume(I),i===F.length?k:w):t(I)}function k(I){return I===null?t(I):I===93?(e.consume(I),v):It(I)?(a=k,Z(I)):(e.consume(I),k)}function v(I){return I===93?(e.consume(I),y):k(I)}function y(I){return I===62?K(I):I===93?(e.consume(I),y):k(I)}function x(I){return I===null||I===62?K(I):It(I)?(a=x,Z(I)):(e.consume(I),x)}function b(I){return I===null?t(I):I===63?(e.consume(I),C):It(I)?(a=b,Z(I)):(e.consume(I),b)}function C(I){return I===62?K(I):b(I)}function N(I){return Ri(I)?(e.consume(I),z):t(I)}function z(I){return I===45||mi(I)?(e.consume(I),z):A(I)}function A(I){return It(I)?(a=A,Z(I)):zn(I)?(e.consume(I),A):K(I)}function j(I){return I===45||mi(I)?(e.consume(I),j):I===47||I===62||xr(I)?M(I):t(I)}function M(I){return I===47?(e.consume(I),K):I===58||I===95||Ri(I)?(e.consume(I),D):It(I)?(a=M,Z(I)):zn(I)?(e.consume(I),M):K(I)}function D(I){return I===45||I===46||I===58||I===95||mi(I)?(e.consume(I),D):L(I)}function L(I){return I===61?(e.consume(I),B):It(I)?(a=L,Z(I)):zn(I)?(e.consume(I),L):M(I)}function B(I){return I===null||I===60||I===61||I===62||I===96?t(I):I===34||I===39?(e.consume(I),s=I,U):It(I)?(a=B,Z(I)):zn(I)?(e.consume(I),B):(e.consume(I),H)}function U(I){return I===s?(e.consume(I),s=void 0,Q):I===null?t(I):It(I)?(a=U,Z(I)):(e.consume(I),U)}function H(I){return I===null||I===34||I===39||I===60||I===61||I===96?t(I):I===47||I===62||xr(I)?M(I):(e.consume(I),H)}function Q(I){return I===47||I===62||xr(I)?M(I):t(I)}function K(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),n):t(I)}function Z(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ee}function ee(I){return zn(I)?Cn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return e.enter("htmlTextData"),a(I)}}const aC={name:"labelEnd",resolveAll:Jjn,resolveTo:eAn,tokenize:tAn},Xjn={tokenize:nAn},Yjn={tokenize:rAn},Zjn={tokenize:sAn};function Jjn(e){let n=-1;const t=[];for(;++n=3&&(u===null||It(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),zn(u)?Cn(e,o,"whitespace")(u):o(u))}}const Zi={continuation:{tokenize:hAn},exit:mAn,name:"list",tokenize:dAn},_An={partial:!0,tokenize:gAn},fAn={partial:!0,tokenize:pAn};function dAn(e,n,t){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(m){const w=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:q5(m)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Av,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return q5(m)&&++a<10?(e.consume(m),c):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ag,r.interrupt?t:d,e.attempt(_An,p,_))}function d(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function _(m){return zn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(m)}}function hAn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(ag,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Cn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!zn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fAn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Cn(e,e.attempt(Zi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function pAn(e,n,t){const r=this;return Cn(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(i):t(i)}}function mAn(e){e.exit(this.containerState.type)}function gAn(e,n,t){const r=this;return Cn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!zn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const oT={name:"setextUnderline",resolveTo:vAn,tokenize:bAn};function vAn(e,n){let t=e.length,r,s,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function bAn(e,n,t){const r=this;let s;return i;function i(u){let d=r.events.length,_;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){_=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),zn(u)?Cn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||It(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const yAn={tokenize:xAn};function xAn(e){const n=this,t=e.attempt(ag,r,e.attempt(this.parser.constructs.flowInitial,s,Cn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Ejn,s)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const wAn={resolveAll:GP()},kAn=UP("string"),SAn=UP("text");function UP(e){return{resolveAll:GP(e==="text"?CAn:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],i=t.attempt(s,a,o);return a;function a(d){return u(d)?i(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),i(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const _=s[d];let p=-1;if(_)for(;++p<_.length;){const m=_[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function GP(e){return n;function n(t,r){let s=-1,i;for(;++s<=t.length;)i===void 0?t[s]&&t[s][1].type==="data"&&(i=s,s++):(!t[s]||t[s][1].type!=="data")&&(s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(t,r):t}}function CAn(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],s=n.sliceStream(r);let i=s.length,a=-1,o=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){i++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(o=0),o){const u={type:t===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}const EAn={42:Zi,43:Zi,45:Zi,48:Zi,49:Zi,50:Zi,51:Zi,52:Zi,53:Zi,54:Zi,55:Zi,56:Zi,57:Zi,62:IP},NAn={91:Tjn},zAn={[-2]:Gw,[-1]:Gw,32:Gw},jAn={35:Ijn,42:Av,45:[oT,Av],60:Fjn,61:oT,95:Av,96:iT,126:iT},AAn={38:BP,92:$P},TAn={[-5]:Vw,[-4]:Vw,[-3]:Vw,33:iAn,38:BP,42:U5,60:[ojn,Wjn],91:oAn,92:[Djn,$P],93:aC,95:U5,96:yjn},RAn={null:[U5,wAn]},MAn={null:[42,95]},OAn={null:[]},DAn=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MAn,contentInitial:NAn,disable:OAn,document:EAn,flow:jAn,flowInitial:zAn,insideSpan:RAn,string:AAn,text:TAn},Symbol.toStringTag,{value:"Module"}));function LAn(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const s={},i=[];let a=[],o=[];const c={attempt:A(N),check:A(z),consume:x,enter:b,exit:C,interrupt:A(z,{interrupt:!0})},u={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:_};let d=n.tokenize.call(u,c);return n.resolveAll&&i.push(n),u;function _(L){return a=fo(a,L),v(),a[a.length-1]!==null?[]:(j(n,0),u.events=Fy(i,u.events,u),u.events)}function p(L,B){return $An(m(L),B)}function m(L){return IAn(a,L)}function w(){const{_bufferIndex:L,_index:B,line:U,column:H,offset:Q}=r;return{_bufferIndex:L,_index:B,line:U,column:H,offset:Q}}function k(L){s[L.line]=L.column,D()}function v(){let L;for(;r._index-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function $An(e,n){let t=-1;const r=[];let s;for(;++t1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?hzn:pzn,r=Y6(e.map((function(o){return o.changes})),xP).map(t).reduce((function(o,c){var u=On(o,2),d=u[0],f=u[1],p=On(c,2),m=p[0],w=p[1];return[d.concat(m),f.concat(w)]}),[[],[]]),s=On(r,2),i=s[0],a=s[1];return lzn(FA(i),FA(a))}var gzn=["enhancers"],GA=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=On(WNn(e,i_(t,gzn)),2),a=i[0],o=i[1],c=[$A(a),$A(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),d=On(u,2),f=d[0],p=d[1],m=[f.map(BA),p.map(BA)],w=m[1];return{old:m[0].map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]})),new:w.map((function(k){var v;return(v=k.children)!==null&&v!==void 0?v:[]}))}};const P5=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full","[&_.openresearch-diff-file.diff-unified]:table-fixed","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),vzn=2e3,bzn={highlight(e,n){return Ft.highlight(e,n).children}};function yzn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Py(e){let n=0,t=0;for(const r of e.hunks)for(const s of r.changes)s.type==="insert"?n++:s.type==="delete"&&t++;return{additions:n,deletions:t}}function xzn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function F5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function wzn(e){const n=[mzn(e.hunks,{type:"line"})],t=o6(xzn(e));return t&&Ft.registered(t)?GA(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:bzn}):GA(e.hunks,{enhancers:n,highlight:!1})}function kP(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:R5(e,{nearbySequences:"zip"}),failed:!1}}catch{if(n){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),r=t[t.length-1];if(t.length>1&&r!==void 0)try{return{files:R5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const kzn=({change:e,side:n})=>n==="old"?null:yzn(e);function SP({bytesRead:e,byteLimit:n}){return _.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[_.jsx("h4",{children:gKe()}),_.jsx("p",{children:vWe({limit:Ae(Dl(n)),read:Ae(Dl(e))})})]})}function CP({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>Py(e),[e]),a=t&&s+i<=vzn,o=T.useMemo(()=>{if(a)try{return wzn(e)}catch{return}},[e,a]);return _.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[_.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-canvas cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(c=>!c),children:[_.jsx("span",{className:"chev",children:t?_.jsx(qc,{size:14}):_.jsx(yo,{size:14})}),_.jsx("span",{className:"path",children:_.jsx("code",{children:F5(e)})}),_.jsxs("span",{className:"stats",children:[_.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),_.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:GKe()}):_.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:_.jsx($Nn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:kzn,tokens:o,viewType:"unified"})}))]})}function Szn({files:e,className:n}){return _.jsx("div",{className:n?`${P5} ${n}`:P5,children:e.map((t,r)=>_.jsx(CP,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function Czn(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function EP({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>kP(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,w)=>({file:m,key:`${m.oldPath}→${m.newPath}#${w}`,changes:Py(m)})),[r]),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=o&&!n,d=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===d)??null;return t.failed?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?$Ke():_We()}):s.length===0?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:TKe()}):_.jsxs("div",{className:"diff-explorer @container",children:[_.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[_.jsx("strong",{className:"font-medium",children:n?s.length===1?sWe():SKe({count:_n(s.length)}):s.length===1?xL():yL({count:_n(s.length)})}),!n&&_.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?YVe():CWe()})]}),u?_.jsx(Szn,{files:r}):_.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[_.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-surface [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":uKe(),children:s.map(m=>_.jsxs("button",{type:"button",className:m.key===d?"active":"","aria-pressed":m.key===d,onClick:()=>a(m.key),children:[_.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:Czn(m.file)}),_.jsx("code",{title:F5(m.file),children:F5(m.file)}),_.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),_.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),_.jsx("div",{className:`${P5} diff-explorer-preview min-w-0`,children:f&&_.jsx(CP,{file:f.file,defaultExpanded:!0},f.key)})]})]})}const Ezn="/assets/slurm-logo-aGSXVZcE.svg",Nzn="/assets/thinking-machines-BOdslTfm.png";function zzn(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return pL();case"tinker_job":return"Tinker";default:return e||"—"}}function jzn({size:e=16}){return _.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[_.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),_.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),_.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),_.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),_.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),_.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),_.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function Azn({size:e=16}){return _.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[_.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),_.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),_.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),_.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),_.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),_.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),_.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),_.jsxs("defs",{children:[_.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[_.jsx("stop",{stopColor:"#BFF9B4"}),_.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),_.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[_.jsx("stop",{stopColor:"#80EE64"}),_.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),_.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),_.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),_.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),_.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),_.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),_.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[_.jsx("stop",{stopColor:"#BFF9B4"}),_.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),_.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[_.jsx("stop",{stopColor:"#80EE64"}),_.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),_.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),_.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),_.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),_.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),_.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function Tzn({size:e=16}){return _.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:_.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function Rzn({size:e=16}){return _.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:_.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function Mzn({size:e=16}){return _.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[_.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),_.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function Ozn({size:e=16}){return _.jsx("img",{className:"tinker-logo block flex-none object-contain",src:Nzn,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function Dzn({size:e=16}){return _.jsx("img",{className:"block flex-none object-contain",src:Ezn,width:e,height:e,alt:"","aria-hidden":"true"})}function J6({size:e=16}){return _.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function lp({kind:e,size:n=16}){switch(e){case"modal_job":return _.jsx(Azn,{size:n});case"hf_job":return _.jsx(jzn,{size:n});case"k8s_job":return _.jsx(Tzn,{size:n});case"ssh_job":return _.jsx(Hj,{size:n,strokeWidth:1.5});case"slurm_job":return _.jsx(Dzn,{size:n});case"ray_job":return _.jsx(Rzn,{size:n});case"openresearch_job":return _.jsx(Mzn,{size:n});case"tinker_job":return _.jsx(Ozn,{size:n});case"local_job":return _.jsx(Q6n,{size:n,strokeWidth:1.5});default:return _.jsx(Hj,{size:n})}}function eC({backend:e}){const n=BS(e),t=Z3n(e);return n?_.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[_.jsx(lp,{kind:n}),_.jsx("span",{className:"backend-name",children:zzn(n)}),t&&_.jsx("span",{className:"backend-detail text-sm",children:t})]}):_.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function Lzn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:d,onFiles:f,onTerminal:p,onArtifacts:m,onExperiments:w,onSideChat:k}){var A,j;const v=l9n(n,t,c),y=T.useRef(null),x=ra(y),b=dt({...qI(a),enabled:e}),C=((A=b.data)==null?void 0:A.configuredDefaultBackend)??((j=b.data)==null?void 0:j.defaultBackend),N=C?Of[C]():b.isPending?"…":b.isError?ho():W3(),z=[{id:"files",label:O3(),Icon:vo,onClick:f},{id:"artifacts",label:nL(),Icon:QS,onClick:m},{id:"experiments",label:rL(),Icon:Bh,onClick:w}];return _.jsx("div",{className:`workspace-tools absolute end-3.5 top-7 z-30 ${s===void 0?"win-titlebar:top-10":""}`,style:{insetInlineEnd:s},children:e?_.jsxs("nav",{"aria-label":Ew(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[_.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:Ew()}),z.filter(M=>M.id!=="files").map(({id:M,label:D,Icon:L,onClick:B})=>_.jsx(un,{className:"min-h-7 py-1","data-onboarding":M==="artifacts"?"nav-artifacts":void 0,onClick:B,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(L,{size:15}),D]})},M)),_.jsx(un,{className:"py-1",onClick:o,children:_.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[_.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[_.jsx(KS,{size:15,className:"shrink-0"}),Cxn()]}),_.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[C&&_.jsx(lp,{kind:`${C}_job`,size:12}),_.jsx("span",{className:"wrap-anywhere",children:N})]})]})}),_.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[_.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:u2n()}),_.jsx(un,{className:"min-h-7 py-1",onClick:f,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(vo,{size:15}),O3()]})}),_.jsx(un,{className:"min-h-7 py-1",onClick:p,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(Ko,{size:15}),ab()]})}),k&&_.jsx(un,{className:"min-h-7 py-1",onClick:k,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(nm,{size:15}),X3()]})}),c&&_.jsx(Izn,{sessionId:c,busy:u,onChanges:d},c),v.length>0&&_.jsxs("div",{children:[_.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[_.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:_.jsx(ch,{tone:"success",live:!0})}),_.jsx("span",{children:vxn()})]}),v.map(M=>_.jsx(un,{className:"min-h-7 py-1",onClick:()=>r(M.experiment.id,M.run.id),children:_.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${M.experiment.title||M.experiment.slug} · ${H6(Aa(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):_.jsxs("nav",{"aria-label":Ew(),className:"flex items-center justify-end gap-3",children:[z.map(({id:M,label:D,Icon:L,onClick:B})=>_.jsx(Rt,{active:i===M,className:"text-text [&.active]:text-text","data-tip":D,"data-tip-align":M==="experiments"?"end":void 0,"aria-label":D,"aria-pressed":i===M,onClick:B,children:_.jsx(L,{size:15})},M)),_.jsxs("div",{className:"relative",children:[_.jsx(Rt,{ref:y,active:i==="terminal"||x.open,className:"text-text [&.active]:text-text","data-tip":x.open?void 0:cj(),"data-tip-align":"end","aria-label":cj(),"aria-expanded":x.open,"aria-haspopup":"menu",onClick:()=>x.setOpen(M=>!M),children:_.jsx(ip,{size:15})}),x.open&&_.jsxs("div",{ref:x.ref,role:"menu",className:"absolute end-0 top-[calc(100%_+_4px)] z-50 flex min-w-40 flex-col rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[_.jsx(un,{role:"menuitem",onClick:()=>{x.setOpen(!1),p()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(Ko,{size:15}),ab()]})}),k&&_.jsx(un,{role:"menuitem",onClick:()=>{x.setOpen(!1),k()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(nm,{size:15}),X3()]})})]})]})]})})}function Izn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=dt({...bb(e),refetchInterval:n?5e3:!1}),s=T.useRef(n),{refetch:i}=r;T.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=T.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const d=kP(a.diff.diff,!1);return d.failed?null:d.files.map(Py).reduce((f,p)=>({additions:f.additions+p.additions,deletions:f.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?_.jsxs(un,{className:"min-h-7 py-1",onClick:t,title:a.branch??DS(),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[_.jsx(ng,{size:15,className:"shrink-0"}),_.jsx("span",{children:dL()})]}),o?_.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[_.jsxs("span",{className:"text-accent-green",children:["+",_n(o.additions)]}),_.jsxs("span",{className:"text-accent-red",children:["−",_n(o.deletions)]})]}):_.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?xL():yL({count:_n(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function $zn({projectId:e,sessionId:n,active:t}){const r=T.useRef(null),s=T.useRef(null),[i,a]=T.useState(null),[o,c]=T.useState(0);return T.useEffect(()=>{const u=r.current;if(!u)return;const d=my(u,!1,!0,"app"),{terminal:f,dispose:p}=d;s.current=d,a(null);const m=location.protocol==="https:"?"wss:":"ws:",w=new URL(`/api/projects/${encodeURIComponent(e)}/terminal`,`${m}//${location.host}`);n&&w.searchParams.set("sessionId",n);const k=new WebSocket(w);k.binaryType="arraybuffer";let v=!1;const y=C=>{v||(v=!0,f.options.disableStdin=!0,f.blur(),f.writeln(`\r +${C}`),a(C))},x=f.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),b=f.onResize(({cols:C,rows:N})=>{k.readyState===WebSocket.OPEN&&k.send(JSON.stringify({type:"resize",cols:C,rows:N}))});return k.onopen=()=>{k.send(JSON.stringify({type:"resize",cols:f.cols,rows:f.rows}))},k.onmessage=C=>{if(C.data instanceof ArrayBuffer){f.write(new Uint8Array(C.data));return}if(typeof C.data!="string")return;let N;try{N=JSON.parse(C.data)}catch{return}Zf(N)&&(N.type==="exit"?y(Xxn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&y(N.error))},k.onclose=()=>y(lj()),k.onerror=()=>y(lj()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,x.dispose(),b.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var d,f;(d=s.current)==null||d.fit(),(f=s.current)==null||f.terminal.focus()});return()=>cancelAnimationFrame(u)},[t,i,o]),_.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-terminal-app p-2",role:"group","aria-label":ab(),children:[_.jsx("div",{ref:r,className:"min-h-0 flex-1 overflow-hidden"}),_.jsx("p",{role:"status","aria-live":"polite",className:"sr-only",children:i??""}),i!==null&&_.jsx("div",{className:"flex shrink-0 justify-end pt-2",children:_.jsx(Me,{autoFocus:!0,onClick:()=>c(u=>u+1),children:r2n()})})]})}const Bzn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pzn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fzn={};function VA(e,n){return(Fzn.jsx?Pzn:Bzn).test(e)}const Hzn=/[ \t\n\f\r]/g;function qzn(e){return typeof e=="object"?e.type==="text"?KA(e.value):!1:KA(e)}function KA(e){return e.replace(Hzn,"")===""}var Bd={},qw,WA;function Uzn(){if(WA)return qw;WA=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=` +`,u="/",d="*",f="",p="comment",m="declaration";function w(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var x=1,b=1;function C(H){var Q=H.match(n);Q&&(x+=Q.length);var K=H.lastIndexOf(c);b=~K?H.length-K:b+H.length}function N(){var H={line:x,column:b};return function(Q){return Q.position=new z(H),M(),Q}}function z(H){this.start=H,this.end={line:x,column:b},this.source=y.source}z.prototype.content=v;function A(H){var Q=new Error(y.source+":"+x+":"+b+": "+H);if(Q.reason=H,Q.filename=y.source,Q.line=x,Q.column=b,Q.source=v,!y.silent)throw Q}function j(H){var Q=H.exec(v);if(Q){var K=Q[0];return C(K),v=v.slice(K.length),Q}}function M(){j(t)}function D(H){var Q;for(H=H||[];Q=L();)Q!==!1&&H.push(Q);return H}function L(){var H=N();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var Q=2;f!=v.charAt(Q)&&(d!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,f===v.charAt(Q-1))return A("End of comment missing");var K=v.slice(2,Q-2);return b+=2,C(K),v=v.slice(Q),b+=2,H({type:p,comment:K})}}function B(){var H=N(),Q=j(r);if(Q){if(L(),!j(s))return A("property missing ':'");var K=j(i),Z=H({type:m,property:k(Q[0].replace(e,f)),value:K?k(K[0].replace(e,f)):f});return j(a),Z}}function U(){var H=[];D(H);for(var Q;Q=B();)Q!==!1&&(H.push(Q),D(H));return H}return M(),U()}function k(v){return v?v.replace(o,f):f}return qw=w,qw}var QA;function Gzn(){if(QA)return Bd;QA=1;var e=Bd&&Bd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.default=t;const n=e(Uzn());function t(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,n.default)(r),o=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;o?s(u,d,c):d&&(i=i||{},i[u]=d)}),i}return Bd}var f0={},XA;function Vzn(){if(XA)return f0;XA=1,Object.defineProperty(f0,"__esModule",{value:!0}),f0.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return f0.camelCase=c,f0}var d0,YA;function Kzn(){if(YA)return d0;YA=1;var e=d0&&d0.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(Gzn()),t=Vzn();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,c){o&&c&&(a[(0,t.camelCase)(o,i)]=c)}),a}return r.default=r,d0=r,d0}var Wzn=Kzn();const Qzn=Um(Wzn),NP=zP("end"),tC=zP("start");function zP(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Xzn(e){const n=tC(e),t=NP(e);if(n&&t)return{start:n,end:t}}function I0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ZA(e.position):"start"in e||"end"in e?ZA(e):"line"in e||"column"in e?H5(e):""}function H5(e){return JA(e&&e.line)+":"+JA(e&&e.column)}function ZA(e){return H5(e&&e.start)+"-"+H5(e&&e.end)}function JA(e){return e&&typeof e=="number"?e:1}class vi extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?s=n:!i.cause&&n&&(a=!0,s=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=I0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vi.prototype.file="";vi.prototype.name="";vi.prototype.reason="";vi.prototype.message="";vi.prototype.stack="";vi.prototype.column=void 0;vi.prototype.line=void 0;vi.prototype.ancestors=void 0;vi.prototype.cause=void 0;vi.prototype.fatal=void 0;vi.prototype.place=void 0;vi.prototype.ruleId=void 0;vi.prototype.source=void 0;const nC={}.hasOwnProperty,Yzn=new Map,Zzn=/[A-Z]/g,Jzn=new Set(["table","tbody","thead","tfoot","tr"]),ejn=new Set(["td","th"]),jP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function AP(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cjn(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ojn(t,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Cy:mB,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=TP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function TP(e,n,t){if(n.type==="element")return tjn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return njn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return sjn(e,n,t);if(n.type==="mdxjsEsm")return rjn(e,n);if(n.type==="root")return ijn(e,n,t);if(n.type==="text")return ajn(e,n)}function tjn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Cy,e.schema=s),e.ancestors.push(n);const i=MP(e,n.tagName,!1),a=ljn(e,n);let o=sC(e,n);return Jzn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!qzn(c):!0})),RP(e,a,i,n),rC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function njn(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}fm(e,n.position)}function rjn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);fm(e,n.position)}function sjn(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Cy,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:MP(e,n.name,!0),a=ujn(e,n),o=sC(e,n);return RP(e,a,i,n),rC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function ijn(e,n,t){const r={};return rC(r,sC(e,n)),e.create(n,e.Fragment,r,t)}function ajn(e,n){return n.value}function RP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function rC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function ojn(e,n,t){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?t:n;return o?u(i,a,o):u(i,a)}}function cjn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=tC(r);return n(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function ljn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&nC.call(n.properties,s)){const i=_jn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&ejn.has(n.tagName)?r=o:t[a]=o}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function ujn(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else fm(e,n.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else fm(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function sC(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:Yzn;for(;++rs?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);i0?(Ma(e,e.length,0,n),e):n}const tT={}.hasOwnProperty;function DP(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Go(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ri=m_(/[A-Za-z]/),mi=m_(/[\dA-Za-z]/),yjn=m_(/[#-'*+\--9=?A-Z^-~]/);function kb(e){return e!==null&&(e<32||e===127)}const q5=m_(/\d/),xjn=m_(/[\dA-Fa-f]/),wjn=m_(/[!-/:-@[-`{-~]/);function Bt(e){return e!==null&&e<-2}function wr(e){return e!==null&&(e<0||e===32)}function zn(e){return e===-2||e===-1||e===32}const Fy=m_(new RegExp("\\p{P}|\\p{S}","u")),Df=m_(/\s/);function m_(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function up(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&i<57344){const o=e.charCodeAt(t+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+s+1,a=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function Cn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return zn(c)?(e.enter(t),o(c)):n(c)}function o(c){return zn(c)&&i++a))return;const A=n.events.length;let j=A,M,D;for(;j--;)if(n.events[j][0]==="exit"&&n.events[j][1].type==="chunkFlow"){if(M){D=n.events[j][1].end;break}M=!0}for(y(r),z=A;zb;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=b}function x(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Njn(e,n,t){return Cn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hh(e){if(e===null||wr(e)||Df(e))return 1;if(Fy(e))return 2}function Hy(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[t][1].start};rT(f,-c),rT(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[t][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=fo(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=fo(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=fo(u,Hy(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=fo(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=fo(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,Ma(e,r-1,t-r+3,u),t=r+u.length-d-2;break}}for(t=-1;++t0&&zn(z)?Cn(e,x,"linePrefix",i+1)(z):x(z)}function x(z){return z===null||Bt(z)?e.check(sT,k,C)(z):(e.enter("codeFlowValue"),b(z))}function b(z){return z===null||Bt(z)?(e.exit("codeFlowValue"),x(z)):(e.consume(z),b)}function C(z){return e.exit("codeFenced"),n(z)}function N(z,A,j){let M=0;return D;function D(Q){return z.enter("lineEnding"),z.consume(Q),z.exit("lineEnding"),L}function L(Q){return z.enter("codeFencedFence"),zn(Q)?Cn(z,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(z.enter("codeFencedFenceSequence"),U(Q)):j(Q)}function U(Q){return Q===o?(M++,z.consume(Q),U):M>=a?(z.exit("codeFencedFenceSequence"),zn(Q)?Cn(z,H,"whitespace")(Q):H(Q)):j(Q)}function H(Q){return Q===null||Bt(Q)?(z.exit("codeFencedFence"),A(Q)):j(Q)}}}function Bjn(e,n,t){const r=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const Gw={name:"codeIndented",tokenize:Fjn},Pjn={partial:!0,tokenize:Hjn};function Fjn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),Cn(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Bt(u)?e.attempt(Pjn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Bt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function Hjn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Bt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Cn(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):Bt(a)?s(a):t(a)}}const qjn={name:"codeText",previous:Gjn,resolve:Ujn,tokenize:Vjn};function Ujn(e){let n=e.length-4,t=3,r,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const s=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&h0(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),h0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),h0(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function FP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(y){return y===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(y),e.exit(i),p):y===null||y===32||y===41||kb(y)?t(y):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(y))}function p(y){return y===62?(e.enter(i),e.consume(y),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===62?(e.exit("chunkString"),e.exit(o),p(y)):y===null||y===60||Bt(y)?t(y):(e.consume(y),y===92?w:m)}function w(y){return y===60||y===62||y===92?(e.consume(y),m):m(y)}function k(y){return!d&&(y===null||y===41||wr(y))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(y)):d999||m===null||m===91||m===93&&!c||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(i),e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):Bt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Bt(m)||o++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!zn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function qP(e,n,t,r,s,i){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,c):t(p)}function c(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),n):(e.enter(i),u(p))}function u(p){return p===a?(e.exit(i),c(a)):p===null?t(p):Bt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Cn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===a||p===null||Bt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:d)}function f(p){return p===a||p===92?(e.consume(p),d):d(p)}}function $0(e,n){let t;return r;function r(s){return Bt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):zn(s)?Cn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const eAn={name:"definition",tokenize:nAn},tAn={partial:!0,tokenize:rAn};function nAn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return HP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=Go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):t(m)}function c(m){return wr(m)?$0(e,u)(m):u(m)}function u(m){return FP(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(tAn,f,f)(m)}function f(m){return zn(m)?Cn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Bt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function rAn(e,n,t){return r;function r(o){return wr(o)?$0(e,s)(o):t(o)}function s(o){return qP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return zn(o)?Cn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Bt(o)?n(o):t(o)}}const sAn={name:"hardBreakEscape",tokenize:iAn};function iAn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Bt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const aAn={name:"headingAtx",resolve:oAn,tokenize:cAn};function oAn(e,n){let t=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ma(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function cAn(e,n,t){let r=0;return s;function s(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||wr(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Bt(d)?(e.exit("atxHeading"),n(d)):zn(d)?Cn(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||wr(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const lAn=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],aT=["pre","script","style","textarea"],uAn={concrete:!0,name:"htmlFlow",resolveTo:dAn,tokenize:hAn},_An={partial:!0,tokenize:mAn},fAn={partial:!0,tokenize:pAn};function dAn(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function hAn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(V){return d(V)}function d(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),f}function f(V){return V===33?(e.consume(V),p):V===47?(e.consume(V),i=!0,k):V===63?(e.consume(V),s=3,r.interrupt?n:I):Ri(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function p(V){return V===45?(e.consume(V),s=2,m):V===91?(e.consume(V),s=5,o=0,w):Ri(V)?(e.consume(V),s=4,r.interrupt?n:I):t(V)}function m(V){return V===45?(e.consume(V),r.interrupt?n:I):t(V)}function w(V){const ie="CDATA[";return V===ie.charCodeAt(o++)?(e.consume(V),o===ie.length?r.interrupt?n:B:w):t(V)}function k(V){return Ri(V)?(e.consume(V),a=String.fromCharCode(V),v):t(V)}function v(V){if(V===null||V===47||V===62||wr(V)){const ie=V===47,oe=a.toLowerCase();return!ie&&!i&&aT.includes(oe)?(s=1,r.interrupt?n(V):B(V)):lAn.includes(a.toLowerCase())?(s=6,ie?(e.consume(V),y):r.interrupt?n(V):B(V)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(V):i?x(V):b(V))}return V===45||mi(V)?(e.consume(V),a+=String.fromCharCode(V),v):t(V)}function y(V){return V===62?(e.consume(V),r.interrupt?n:B):t(V)}function x(V){return zn(V)?(e.consume(V),x):D(V)}function b(V){return V===47?(e.consume(V),D):V===58||V===95||Ri(V)?(e.consume(V),C):zn(V)?(e.consume(V),b):D(V)}function C(V){return V===45||V===46||V===58||V===95||mi(V)?(e.consume(V),C):N(V)}function N(V){return V===61?(e.consume(V),z):zn(V)?(e.consume(V),N):b(V)}function z(V){return V===null||V===60||V===61||V===62||V===96?t(V):V===34||V===39?(e.consume(V),c=V,A):zn(V)?(e.consume(V),z):j(V)}function A(V){return V===c?(e.consume(V),c=null,M):V===null||Bt(V)?t(V):(e.consume(V),A)}function j(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||wr(V)?N(V):(e.consume(V),j)}function M(V){return V===47||V===62||zn(V)?b(V):t(V)}function D(V){return V===62?(e.consume(V),L):t(V)}function L(V){return V===null||Bt(V)?B(V):zn(V)?(e.consume(V),L):t(V)}function B(V){return V===45&&s===2?(e.consume(V),K):V===60&&s===1?(e.consume(V),Z):V===62&&s===4?(e.consume(V),F):V===63&&s===3?(e.consume(V),I):V===93&&s===5?(e.consume(V),$):Bt(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(_An,q,U)(V)):V===null||Bt(V)?(e.exit("htmlFlowData"),U(V)):(e.consume(V),B)}function U(V){return e.check(fAn,H,q)(V)}function H(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),Q}function Q(V){return V===null||Bt(V)?U(V):(e.enter("htmlFlowData"),B(V))}function K(V){return V===45?(e.consume(V),I):B(V)}function Z(V){return V===47?(e.consume(V),a="",ee):B(V)}function ee(V){if(V===62){const ie=a.toLowerCase();return aT.includes(ie)?(e.consume(V),F):B(V)}return Ri(V)&&a.length<8?(e.consume(V),a+=String.fromCharCode(V),ee):B(V)}function $(V){return V===93?(e.consume(V),I):B(V)}function I(V){return V===62?(e.consume(V),F):V===45&&s===2?(e.consume(V),I):B(V)}function F(V){return V===null||Bt(V)?(e.exit("htmlFlowData"),q(V)):(e.consume(V),F)}function q(V){return e.exit("htmlFlow"),n(V)}}function pAn(e,n,t){const r=this;return s;function s(a){return Bt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):t(a)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function mAn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(og,n,t)}}const gAn={name:"htmlText",tokenize:vAn};function vAn(e,n,t){const r=this;let s,i,a;return o;function o(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),N):I===63?(e.consume(I),b):Ri(I)?(e.consume(I),j):t(I)}function u(I){return I===45?(e.consume(I),d):I===91?(e.consume(I),i=0,w):Ri(I)?(e.consume(I),x):t(I)}function d(I){return I===45?(e.consume(I),m):t(I)}function f(I){return I===null?t(I):I===45?(e.consume(I),p):Bt(I)?(a=f,Z(I)):(e.consume(I),f)}function p(I){return I===45?(e.consume(I),m):f(I)}function m(I){return I===62?K(I):I===45?p(I):f(I)}function w(I){const F="CDATA[";return I===F.charCodeAt(i++)?(e.consume(I),i===F.length?k:w):t(I)}function k(I){return I===null?t(I):I===93?(e.consume(I),v):Bt(I)?(a=k,Z(I)):(e.consume(I),k)}function v(I){return I===93?(e.consume(I),y):k(I)}function y(I){return I===62?K(I):I===93?(e.consume(I),y):k(I)}function x(I){return I===null||I===62?K(I):Bt(I)?(a=x,Z(I)):(e.consume(I),x)}function b(I){return I===null?t(I):I===63?(e.consume(I),C):Bt(I)?(a=b,Z(I)):(e.consume(I),b)}function C(I){return I===62?K(I):b(I)}function N(I){return Ri(I)?(e.consume(I),z):t(I)}function z(I){return I===45||mi(I)?(e.consume(I),z):A(I)}function A(I){return Bt(I)?(a=A,Z(I)):zn(I)?(e.consume(I),A):K(I)}function j(I){return I===45||mi(I)?(e.consume(I),j):I===47||I===62||wr(I)?M(I):t(I)}function M(I){return I===47?(e.consume(I),K):I===58||I===95||Ri(I)?(e.consume(I),D):Bt(I)?(a=M,Z(I)):zn(I)?(e.consume(I),M):K(I)}function D(I){return I===45||I===46||I===58||I===95||mi(I)?(e.consume(I),D):L(I)}function L(I){return I===61?(e.consume(I),B):Bt(I)?(a=L,Z(I)):zn(I)?(e.consume(I),L):M(I)}function B(I){return I===null||I===60||I===61||I===62||I===96?t(I):I===34||I===39?(e.consume(I),s=I,U):Bt(I)?(a=B,Z(I)):zn(I)?(e.consume(I),B):(e.consume(I),H)}function U(I){return I===s?(e.consume(I),s=void 0,Q):I===null?t(I):Bt(I)?(a=U,Z(I)):(e.consume(I),U)}function H(I){return I===null||I===34||I===39||I===60||I===61||I===96?t(I):I===47||I===62||wr(I)?M(I):(e.consume(I),H)}function Q(I){return I===47||I===62||wr(I)?M(I):t(I)}function K(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),n):t(I)}function Z(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ee}function ee(I){return zn(I)?Cn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return e.enter("htmlTextData"),a(I)}}const aC={name:"labelEnd",resolveAll:wAn,resolveTo:kAn,tokenize:SAn},bAn={tokenize:CAn},yAn={tokenize:EAn},xAn={tokenize:NAn};function wAn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Bt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),zn(u)?Cn(e,o,"whitespace")(u):o(u))}}const Zi={continuation:{tokenize:IAn},exit:BAn,name:"list",tokenize:LAn},OAn={partial:!0,tokenize:PAn},DAn={partial:!0,tokenize:$An};function LAn(e,n,t){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(m){const w=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:q5(m)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Tv,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return t(m)}function c(m){return q5(m)&&++a<10?(e.consume(m),c):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(og,r.interrupt?t:d,e.attempt(OAn,p,f))}function d(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return zn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(m)}}function IAn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(og,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Cn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!zn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(DAn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Cn(e,e.attempt(Zi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function $An(e,n,t){const r=this;return Cn(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(i):t(i)}}function BAn(e){e.exit(this.containerState.type)}function PAn(e,n,t){const r=this;return Cn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!zn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const oT={name:"setextUnderline",resolveTo:FAn,tokenize:HAn};function FAn(e,n){let t=e.length,r,s,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function HAn(e,n,t){const r=this;let s;return i;function i(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),zn(u)?Cn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Bt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const qAn={tokenize:UAn};function UAn(e){const n=this,t=e.attempt(og,r,e.attempt(this.parser.constructs.flowInitial,s,Cn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Qjn,s)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const GAn={resolveAll:GP()},VAn=UP("string"),KAn=UP("text");function UP(e){return{resolveAll:GP(e==="text"?WAn:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],i=t.attempt(s,a,o);return a;function a(d){return u(d)?i(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),i(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const f=s[d];let p=-1;if(f)for(;++p-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function oTn(e,n){let t=-1;const r=[];let s;for(;++t0){const St=He.tokenStack[He.tokenStack.length-1];(St[1]||lT).call(He,void 0,St[0])}for(ze.position={start:ju(me.length>0?me[0][1].start:{line:1,column:1,offset:0}),end:ju(me.length>0?me[me.length-2][1].end:{line:1,column:1,offset:0})},ct=-1;++ct0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function YAn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ZAn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function JAn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=up(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function eTn(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function tTn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function WP(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const s=e.all(n),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function nTn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return WP(e,n);const s={src:up(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,i),e.applyData(n,i)}function rTn(e,n){const t={src:up(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function sTn(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function iTn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return WP(e,n);const s={href:up(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function aTn(e,n){const t={href:up(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function oTn(e,n,t){const r=e.all(n),s=t?cTn(t):QP(n),i={},a=[];if(typeof n.checked=="boolean"){const d=r[0];let _;d&&d.type==="element"&&d.tagName==="p"?_=d:(_={type:"element",tagName:"p",properties:{},children:[]},r.unshift(_)),_.children.length>0&&_.children.unshift({type:"text",value:" "}),_.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o0){const lt=Ke.tokenStack[Ke.tokenStack.length-1];(lt[1]||lT).call(Ke,void 0,lt[0])}for(Be.position={start:ju(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:ju(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function yTn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xTn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function wTn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=up(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,u),e.applyData(n,u)}function kTn(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function STn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function WP(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const s=e.all(n),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function CTn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return WP(e,n);const s={src:up(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,i),e.applyData(n,i)}function ETn(e,n){const t={src:up(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function NTn(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function zTn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return WP(e,n);const s={href:up(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function jTn(e,n){const t={href:up(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function ATn(e,n,t){const r=e.all(n),s=t?TTn(t):QP(n),i={},a=[];if(typeof n.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o1}function lTn(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=tC(n.children[1]),c=NP(n.children[n.children.length-1]);o&&c&&(a.position={start:o,end:c}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,i),e.applyData(n,i)}function hTn(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,o=a?a.length:n.children.length;let c=-1;const u=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(fT(n.slice(s),s>0,!1)),i.join("")}function fT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===uT||i===_T;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===uT||i===_T;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function gTn(e,n){const t={type:"text",value:mTn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function vTn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const bTn={blockquote:WAn,break:QAn,code:XAn,delete:YAn,emphasis:ZAn,footnoteReference:JAn,heading:eTn,html:tTn,imageReference:nTn,image:rTn,inlineCode:sTn,linkReference:iTn,link:aTn,listItem:oTn,list:lTn,paragraph:uTn,root:_Tn,strong:fTn,table:dTn,tableCell:pTn,tableRow:hTn,text:gTn,thematicBreak:vTn,toml:F1,yaml:F1,definition:F1,footnoteDefinition:F1};function F1(){}const XP=-1,qy=0,$0=1,kb=2,oC=3,cC=4,lC=5,uC=6,YP=7,ZP=8,yTn=typeof self=="object"?self:globalThis,dT=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new yTn[e](n)},xTn=(e,n)=>{const t=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=n[s];switch(i){case qy:case XP:return t(a,s);case $0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case kb:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case oC:return t(new Date(a),s);case cC:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case lC:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case uC:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case YP:{const{name:o,message:c}=a;return t(dT(o,c),s)}case ZP:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return t(new DataView(o),a)}}return t(dT(i,a),s)};return r},hT=e=>xTn(new Map,e)(0),W_="",{toString:wTn}={},{keys:kTn}=Object,p0=e=>{const n=typeof e;if(n!=="object"||!e)return[qy,n];const t=wTn.call(e).slice(8,-1);switch(t){case"Array":return[$0,W_];case"Object":return[kb,W_];case"Date":return[oC,W_];case"RegExp":return[cC,W_];case"Map":return[lC,W_];case"Set":return[uC,W_];case"DataView":return[$0,t]}return t.includes("Array")?[$0,t]:t.includes("Error")?[YP,t]:[kb,t]},H1=([e,n])=>e===qy&&(n==="function"||n==="symbol"),STn=(e,n,t,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return t.set(o,c),c},i=a=>{if(t.has(a))return t.get(a);let[o,c]=p0(a);switch(o){case qy:{let d=a;switch(c){case"bigint":o=ZP,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([XP],a)}return s([o,d],a)}case $0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const d=[],_=s([o,d],a);for(const p of a)d.push(i(p));return _}case kb:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const d=[],_=s([o,d],a);for(const p of kTn(a))(e||!H1(p0(a[p])))&&d.push([i(p),i(a[p])]);return _}case oC:return s([o,isNaN(a.getTime())?W_:a.toISOString()],a);case cC:{const{source:d,flags:_}=a;return s([o,{source:d,flags:_}],a)}case lC:{const d=[],_=s([o,d],a);for(const[p,m]of a)(e||!(H1(p0(p))||H1(p0(m))))&&d.push([i(p),i(m)]);return _}case uC:{const d=[],_=s([o,d],a);for(const p of a)(e||!H1(p0(p)))&&d.push(i(p));return _}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},pT=(e,{json:n,lossy:t}={})=>{const r=[];return STn(!(n||t),!!n,new Map,r)(e),r},Sb=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?hT(pT(e,n)):structuredClone(e):(e,n)=>hT(pT(e,n));function CTn(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function ETn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function NTn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||CTn,r=e.options.footnoteBackLabel||ETn,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&w.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,m);typeof x=="string"&&(x={type:"text",value:x}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else d.push(...w);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Sb(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(n,u),e.applyData(n,u)}function TTn(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function RTn(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=tC(n.children[1]),c=NP(n.children[n.children.length-1]);o&&c&&(a.position={start:o,end:c}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,i),e.applyData(n,i)}function ITn(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,o=a?a.length:n.children.length;let c=-1;const u=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(fT(n.slice(s),s>0,!1)),i.join("")}function fT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===uT||i===_T;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===uT||i===_T;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function PTn(e,n){const t={type:"text",value:BTn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function FTn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const HTn={blockquote:gTn,break:vTn,code:bTn,delete:yTn,emphasis:xTn,footnoteReference:wTn,heading:kTn,html:STn,imageReference:CTn,image:ETn,inlineCode:NTn,linkReference:zTn,link:jTn,listItem:ATn,list:RTn,paragraph:MTn,root:OTn,strong:DTn,table:LTn,tableCell:$Tn,tableRow:ITn,text:PTn,thematicBreak:FTn,toml:H1,yaml:H1,definition:H1,footnoteDefinition:H1};function H1(){}const XP=-1,Uy=0,B0=1,Sb=2,oC=3,cC=4,lC=5,uC=6,YP=7,ZP=8,qTn=typeof self=="object"?self:globalThis,dT=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new qTn[e](n)},UTn=(e,n)=>{const t=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=n[s];switch(i){case Uy:case XP:return t(a,s);case B0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case Sb:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case oC:return t(new Date(a),s);case cC:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case lC:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case uC:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case YP:{const{name:o,message:c}=a;return t(dT(o,c),s)}case ZP:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return t(new DataView(o),a)}}return t(dT(i,a),s)};return r},hT=e=>UTn(new Map,e)(0),W_="",{toString:GTn}={},{keys:VTn}=Object,p0=e=>{const n=typeof e;if(n!=="object"||!e)return[Uy,n];const t=GTn.call(e).slice(8,-1);switch(t){case"Array":return[B0,W_];case"Object":return[Sb,W_];case"Date":return[oC,W_];case"RegExp":return[cC,W_];case"Map":return[lC,W_];case"Set":return[uC,W_];case"DataView":return[B0,t]}return t.includes("Array")?[B0,t]:t.includes("Error")?[YP,t]:[Sb,t]},q1=([e,n])=>e===Uy&&(n==="function"||n==="symbol"),KTn=(e,n,t,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return t.set(o,c),c},i=a=>{if(t.has(a))return t.get(a);let[o,c]=p0(a);switch(o){case Uy:{let d=a;switch(c){case"bigint":o=ZP,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([XP],a)}return s([o,d],a)}case B0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const d=[],f=s([o,d],a);for(const p of a)d.push(i(p));return f}case Sb:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const d=[],f=s([o,d],a);for(const p of VTn(a))(e||!q1(p0(a[p])))&&d.push([i(p),i(a[p])]);return f}case oC:return s([o,isNaN(a.getTime())?W_:a.toISOString()],a);case cC:{const{source:d,flags:f}=a;return s([o,{source:d,flags:f}],a)}case lC:{const d=[],f=s([o,d],a);for(const[p,m]of a)(e||!(q1(p0(p))||q1(p0(m))))&&d.push([i(p),i(m)]);return f}case uC:{const d=[],f=s([o,d],a);for(const p of a)(e||!q1(p0(p)))&&d.push(i(p));return f}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},pT=(e,{json:n,lossy:t}={})=>{const r=[];return KTn(!(n||t),!!n,new Map,r)(e),r},Cb=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?hT(pT(e,n)):structuredClone(e):(e,n)=>hT(pT(e,n));function WTn(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function QTn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function XTn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||WTn,r=e.options.footnoteBackLabel||QTn,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c0&&w.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,m);typeof x=="string"&&(x={type:"text",value:x}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else d.push(...w);const y={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Cb(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:` -`}]}}const og=(function(e){if(e==null)return TTn;if(typeof e=="function")return Uy(e);if(typeof e=="object")return Array.isArray(e)?zTn(e):jTn(e);if(typeof e=="string")return ATn(e);throw new Error("Expected function, string, or object as test")});function zTn(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=JP,w,k,v;if((!n||i(c,u,d[d.length-1]||void 0))&&(m=OTn(t(c,d)),m[0]===G5))return m;if("children"in c&&c.children){const y=c;if(y.children&&m[0]!==eF)for(k=(r?y.children.length:-1)+a,v=d.concat(y);k>-1&&k":""))+")"})}return p;function p(){let m=JP,w,k,v;if((!n||i(c,u,d[d.length-1]||void 0))&&(m=rRn(t(c,d)),m[0]===G5))return m;if("children"in c&&c.children){const y=c;if(y.children&&m[0]!==eF)for(k=(r?y.children.length:-1)+a,v=d.concat(y);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function mT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function gT(e,n){const t=LTn(e,n),r=t.one(e,void 0),s=NTn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function Cb(e,n){return e&&"run"in e?async function(t,r){const s=gT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return gT(t,{file:r,...e||n})}}function vT(e){if(e)throw e}var Kw,bT;function FTn(){if(bT)return Kw;bT=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},i=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),_=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!_)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){t&&d.name==="__proto__"?t(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},o=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return Kw=function c(){var u,d,_,p,m,w,k=arguments[0],v=1,y=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(o&&t)throw d;return s(d)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}const bc={basename:GTn,dirname:VTn,extname:KTn,join:WTn,sep:"/"};function GTn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');cg(e);let t=0,r=-1,s=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let a=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function VTn(e){if(cg(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function KTn(e){cg(e);let n=e.length,t=-1,r=0,s=-1,i=0,a;for(;n--;){const o=e.codePointAt(n);if(o===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),o===46?s<0?s=n:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||t<0||i===0||i===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function WTn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function XTn(e,n){let t="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),s=a,i=0;continue}}else if(t.length>0){t="",r=0,s=a,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return t}function cg(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const YTn={cwd:ZTn};function ZTn(){return"/"}function W5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function JTn(e){if(typeof e=="string")e=new URL(e);else if(!W5(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return eRn(e)}function eRn(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[m,...w]=d;const k=r[p][1];K5(k)&&K5(m)&&(m=Ww(!0,k,m)),r[p]=[u,m,...w]}}}}const Gy=new dC().freeze();function Zw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function e4(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xT(e){if(!K5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function wT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function q1(e){return sRn(e)?e:new tF(e)}function sRn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iRn(e){return typeof e=="string"||aRn(e)}function aRn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oRn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kT=[],ST={allowDangerousHtml:!0},cRn=/^(https?|ircs?|mailto|xmpp)$/i,lRn=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function uRn(e){const n=_Rn(e),t=fRn(e);return dRn(n.runSync(n.parse(t),t),e)}function _Rn(e){const n=e.rehypePlugins||kT,t=e.remarkPlugins||kT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ST}:ST;return Gy().use(Hy).use(t).use(Cb,r).use(n)}function fRn(e){const n=e.children||"",t=new tF;return typeof n=="string"&&(t.value=n),t}function dRn(e,n){const t=n.allowedElements,r=n.allowElement,s=n.components,i=n.disallowedElements,a=n.skipHtml,o=n.unwrapDisallowed,c=n.urlTransform||nF;for(const d of lRn)Object.hasOwn(n,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+oRn+d.id,void 0);return fC(e,u),AP(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(d,_,p){if(d.type==="raw"&&p&&typeof _=="number")return a?p.children.splice(_,1):p.children[_]={type:"text",value:d.value},_;if(d.type==="element"){let m;for(m in Uw)if(Object.hasOwn(Uw,m)&&Object.hasOwn(d.properties,m)){const w=d.properties[m],k=Uw[m];(k===null||k.includes(d.tagName))&&(d.properties[m]=c(String(w||""),m,d))}}if(d.type==="element"){let m=t?!t.includes(d.tagName):i?i.includes(d.tagName):!1;if(!m&&r&&typeof _=="number"&&(m=!r(d,_,p)),m&&p&&typeof _=="number")return o&&d.children?p.children.splice(_,1,...d.children):p.children.splice(_,1),_}}}function nF(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||t!==-1&&n>t||r!==-1&&n>r||cRn.test(e.slice(0,n))?e:""}function hC(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Q5(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const d=u.startsWith("/"),_=d?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(_.length===0)return null;_.pop();continue}_.push(p)}return _.length===0?null:{path:`${t&&(d||e.startsWith("/"))?"/":""}${_.join("/")}`,query:c,hash:i}}function hRn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function X5(e){const n=/^(.+?)(?::(\d+)(?:[:-]\d+)?|#L(\d+)(?:C\d+)?(?:-L?\d+(?:C\d+)?)?)$/.exec(e);if(!n)return{path:e};const t=Number(n[2]??n[3]);return t>0?{path:n[1],line:t}:{path:n[1]}}function pRn(e){const n=Number.parseInt(e.replace(/^L/i,""),10);return n>0?n:void 0}function pC(e){return/^[a-z]:[\\/]/i.test(e)}function rF(e){const n=pC(e);if(!n&&hC(e))return null;const t=Q5("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function mRn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");s==="href"&&X5(i).line!=null&&(t.properties["data-cited-href"]=i),t.properties[s]=s==="src"&&t.tagName==="img"&&pC(i)?i:nF(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function gRn({projects:e,activity:n,projectId:t,projectName:r,onSelect:s,onNewProject:i}){const{open:a,setOpen:o,ref:c}=ra(),u=new Map(n.map(_=>[_.projectId,_.lastActivityAt])),d=[...e].sort((_,p)=>+(p.id===t)-+(_.id===t)||Math.max(u.get(p.id)??0,p.updatedAt)-Math.max(u.get(_.id)??0,_.updatedAt));return f.jsxs("div",{ref:c,className:"relative mb-2 w-fit max-w-full",children:[f.jsxs(Oe,{className:"max-w-full gap-2 rounded-lg px-3 text-sm font-normal text-text","aria-haspopup":"menu","aria-expanded":a,onClick:()=>o(_=>!_),children:[f.jsx(vo,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:r}),f.jsx(qc,{size:12,className:"shrink-0 text-subtext"})]}),a&&f.jsxs("div",{role:"menu","aria-label":MS(),className:"absolute bottom-full start-0 z-50 mb-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[f.jsx("div",{className:"px-2 py-1 text-sm text-subtext",children:fL()}),f.jsx("div",{className:"max-h-64 overflow-y-auto pb-1.5",children:d.map(_=>f.jsxs(on,{role:"menuitemradio","aria-checked":_.id===t,size:"compact",className:"text-sm",onClick:()=>{o(!1),s(_.id)},children:[f.jsx("span",{className:"truncate",children:_.name}),_.id===t&&f.jsx(ti,{size:13,className:"shrink-0"})]},_.id))}),f.jsx("div",{className:"mb-1 border-t border-border"}),f.jsx(on,{role:"menuitem",size:"compact",className:"text-sm",onClick:()=>{o(!1),i()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Qf,{size:14}),tb()]})})]})]})}function sF(e){const n=e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo);return`${_4t({name:e.name})} +`}),t}function mT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function gT(e,n){const t=iRn(e,n),r=t.one(e,void 0),s=XTn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` +`},s),i}function Eb(e,n){return e&&"run"in e?async function(t,r){const s=gT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return gT(t,{file:r,...e||n})}}function vT(e){if(e)throw e}var Kw,bT;function uRn(){if(bT)return Kw;bT=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},i=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,d){t&&d.name==="__proto__"?t(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},o=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return Kw=function c(){var u,d,f,p,m,w,k=arguments[0],v=1,y=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},v=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});va.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(o&&t)throw d;return s(d)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}const bc={basename:hRn,dirname:pRn,extname:mRn,join:gRn,sep:"/"};function hRn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');lg(e);let t=0,r=-1,s=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let a=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function pRn(e){if(lg(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function mRn(e){lg(e);let n=e.length,t=-1,r=0,s=-1,i=0,a;for(;n--;){const o=e.codePointAt(n);if(o===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),o===46?s<0?s=n:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||t<0||i===0||i===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function gRn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function bRn(e,n){let t="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),s=a,i=0;continue}}else if(t.length>0){t="",r=0,s=a,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return t}function lg(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yRn={cwd:xRn};function xRn(){return"/"}function W5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wRn(e){if(typeof e=="string")e=new URL(e);else if(!W5(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return kRn(e)}function kRn(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[m,...w]=d;const k=r[p][1];K5(k)&&K5(m)&&(m=Ww(!0,k,m)),r[p]=[u,m,...w]}}}}const Vy=new dC().freeze();function Zw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Jw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function e4(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xT(e){if(!K5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function wT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function U1(e){return NRn(e)?e:new tF(e)}function NRn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function zRn(e){return typeof e=="string"||jRn(e)}function jRn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ARn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kT=[],ST={allowDangerousHtml:!0},TRn=/^(https?|ircs?|mailto|xmpp)$/i,RRn=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function MRn(e){const n=ORn(e),t=DRn(e);return LRn(n.runSync(n.parse(t),t),e)}function ORn(e){const n=e.rehypePlugins||kT,t=e.remarkPlugins||kT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ST}:ST;return Vy().use(qy).use(t).use(Eb,r).use(n)}function DRn(e){const n=e.children||"",t=new tF;return typeof n=="string"&&(t.value=n),t}function LRn(e,n){const t=n.allowedElements,r=n.allowElement,s=n.components,i=n.disallowedElements,a=n.skipHtml,o=n.unwrapDisallowed,c=n.urlTransform||nF;for(const d of RRn)Object.hasOwn(n,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+ARn+d.id,void 0);return fC(e,u),AP(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(d,f,p){if(d.type==="raw"&&p&&typeof f=="number")return a?p.children.splice(f,1):p.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let m;for(m in Uw)if(Object.hasOwn(Uw,m)&&Object.hasOwn(d.properties,m)){const w=d.properties[m],k=Uw[m];(k===null||k.includes(d.tagName))&&(d.properties[m]=c(String(w||""),m,d))}}if(d.type==="element"){let m=t?!t.includes(d.tagName):i?i.includes(d.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(d,f,p)),m&&p&&typeof f=="number")return o&&d.children?p.children.splice(f,1,...d.children):p.children.splice(f,1),f}}}function nF(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||t!==-1&&n>t||r!==-1&&n>r||TRn.test(e.slice(0,n))?e:""}function hC(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Q5(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const d=u.startsWith("/"),f=d?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(f.length===0)return null;f.pop();continue}f.push(p)}return f.length===0?null:{path:`${t&&(d||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:i}}function IRn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function X5(e){const n=/^(.+?)(?::(\d+)(?:[:-]\d+)?|#L(\d+)(?:C\d+)?(?:-L?\d+(?:C\d+)?)?)$/.exec(e);if(!n)return{path:e};const t=Number(n[2]??n[3]);return t>0?{path:n[1],line:t}:{path:n[1]}}function $Rn(e){const n=Number.parseInt(e.replace(/^L/i,""),10);return n>0?n:void 0}function pC(e){return/^[a-z]:[\\/]/i.test(e)}function rF(e){const n=pC(e);if(!n&&hC(e))return null;const t=Q5("",n?e.replaceAll("\\","/"):e,!0);if(!t)return null;const r={path:t.path,hash:t.hash};return r.path.startsWith("/")||r.path.startsWith("~/")||n?{...r,source:"absolute"}:r.path.startsWith("artifacts/")?{...r,path:r.path.slice(10),source:"artifact"}:{...r,source:"checkout"}}function BRn(){return e=>{const n=t=>{var r;for(const s of["href","src"])if(t.properties&&Object.hasOwn(t.properties,s)){const i=String(t.properties[s]||"");s==="href"&&X5(i).line!=null&&(t.properties["data-cited-href"]=i),t.properties[s]=s==="src"&&t.tagName==="img"&&pC(i)?i:nF(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function PRn({projects:e,activity:n,projectId:t,projectName:r,onSelect:s,onNewProject:i}){const{open:a,setOpen:o,ref:c}=ra(),u=new Map(n.map(f=>[f.projectId,f.lastActivityAt])),d=[...e].sort((f,p)=>+(p.id===t)-+(f.id===t)||Math.max(u.get(p.id)??0,p.updatedAt)-Math.max(u.get(f.id)??0,f.updatedAt));return _.jsxs("div",{ref:c,className:"relative mb-2 w-fit max-w-full",children:[_.jsxs(Me,{className:"max-w-full gap-2 rounded-lg px-3 text-sm font-normal text-text","aria-haspopup":"menu","aria-expanded":a,onClick:()=>o(f=>!f),children:[_.jsx(vo,{size:15,className:"shrink-0"}),_.jsx("span",{className:"truncate",children:r}),_.jsx(qc,{size:12,className:"shrink-0 text-subtext"})]}),a&&_.jsxs("div",{role:"menu","aria-label":MS(),className:"absolute bottom-full start-0 z-50 mb-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[_.jsx("div",{className:"px-2 py-1 text-sm text-subtext",children:fL()}),_.jsx("div",{className:"max-h-64 overflow-y-auto pb-1.5",children:d.map(f=>_.jsxs(un,{role:"menuitemradio","aria-checked":f.id===t,size:"compact",className:"text-sm",onClick:()=>{o(!1),s(f.id)},children:[_.jsx("span",{className:"truncate",children:f.name}),f.id===t&&_.jsx(ti,{size:13,className:"shrink-0"})]},f.id))}),_.jsx("div",{className:"mb-1 border-t border-border"}),_.jsx(un,{role:"menuitem",size:"compact",className:"text-sm",onClick:()=>{o(!1),i()},children:_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx(Qf,{size:14}),nb()]})})]})]})}function sF(e){const n=e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo);return`${R4t({name:e.name})} -${n?T4t():$4t()}`}function vRn({project:e,chatCount:n,onRemoved:t,onNewChat:r,pinned:s,onPin:i}){const a=T.useRef(null),o=T.useRef(null),c=T.useId(),[u,d]=T.useState(!1),[_,p]=T.useState(!1),[m,w]=T.useState(!1);T.useEffect(()=>{const x=b=>{var C,N;b.target instanceof Node&&((C=o.current)!=null&&C.contains(b.target))||(N=o.current)==null||N.hidePopover()};return window.addEventListener("scroll",x,!0),window.addEventListener("resize",x),()=>{window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x)}},[]);function k(x,b){if(!x||!b)return;x.showPopover();const C=b.getBoundingClientRect(),N=x.getBoundingClientRect(),z=C.right+12+N.width<=window.innerWidth-8?C.right+12:Math.max(8,C.left-N.width-12);x.style.left=`${z}px`,x.style.top=`${Math.max(8,Math.min(C.top,window.innerHeight-N.height-8))}px`}function v(){var x;(x=o.current)==null||x.hidePopover(),p(!0)}async function y(){var x;if((x=o.current)==null||x.hidePopover(),!(m||!window.confirm(sF(e)))){w(!0);try{await NI(e.id),t()}catch(b){tn(b instanceof Error?b.message:String(b),"error")}finally{w(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex h-7 min-w-0 flex-1 items-center gap-[7px] py-1 text-start text-sm font-normal text-text",children:[f.jsx(vo,{size:15,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:e.name})]}),f.jsx(At,{ref:a,size:"small",className:`text-text group-hover:opacity-100 group-focus-within:opacity-100 ${u?"bg-surface opacity-100":"opacity-0"}`,"aria-label":Yin({name:e.name}),"aria-controls":c,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>{var x,b,C;(x=o.current)!=null&&x.matches(":popover-open")?o.current.hidePopover():(k(o.current,a.current),(C=(b=o.current)==null?void 0:b.querySelector("button"))==null||C.focus())},children:f.jsx(ip,{size:15})}),f.jsx(Jm,{interactive:!0,content:D3(),className:"rounded-sm",children:f.jsx(At,{size:"small",className:"text-text opacity-0 group-hover:opacity-100 group-focus-within:opacity-100","aria-label":`${D3()} · ${e.name}`,onClick:r,children:f.jsx(Qf,{size:15})})}),f.jsxs("div",{ref:o,id:c,popover:"auto",role:"menu","aria-label":e.name,onToggle:x=>d(x.newState==="open"),onKeyDown:x=>{var N;if(x.key!=="ArrowDown"&&x.key!=="ArrowUp")return;x.preventDefault();const b=[...x.currentTarget.querySelectorAll("button:not(:disabled)")],C=b.findIndex(z=>z===document.activeElement);(N=b[(C+(x.key==="ArrowDown"?1:b.length-1))%b.length])==null||N.focus()},className:"fixed inset-auto m-0 w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-border bg-background p-2 text-text shadow-modal",children:[f.jsxs("div",{role:"presentation",className:"mb-1 border-b border-border px-2 pb-2 pt-1 text-sm",children:[f.jsx("div",{className:"truncate font-medium",children:e.name}),f.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-subtext",children:[f.jsx(I6n,{size:13}),n===void 0?"…":Uin({count:n})]}),f.jsx("div",{className:"mt-2 break-all text-xs text-subtext",children:e.repoPath})]}),f.jsx(on,{role:"menuitem",onClick:()=>{var x;i(),(x=o.current)==null||x.hidePopover()},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(rCn,{size:16}),s?van():Iin()]})}),f.jsx(on,{role:"menuitem",onClick:v,children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(dy,{size:16}),eL()]})}),f.jsx(on,{role:"menuitem",onClick:()=>{var x;(x=o.current)==null||x.hidePopover(),AI(e.id,".").catch(b=>tn(b instanceof Error?b.message:String(b),"error"))},children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(vo,{size:16}),san()]})}),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx(on,{role:"menuitem",danger:!0,disabled:m,onClick:()=>void y(),children:f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Yf,{size:16}),$L()]})})]}),_&&ni.createPortal(f.jsx(bRn,{project:e,onClose:()=>p(!1),onRemoved:t}),document.body)]})}function bRn({project:e,onClose:n,onRemoved:t}){const r=T.useRef(null),s=T.useId(),i=T.useId(),[a,o]=T.useState(e.name),[c,u]=T.useState(!1),[d,_]=T.useState(""),p=()=>{c||n()};sp(r,p);async function m(){if(!(c||!a.trim())){u(!0),_("");try{await gwn(e.id,{name:a.trim()}),n()}catch(k){_(k instanceof Error?k.message:String(k))}finally{u(!1)}}}async function w(){if(!(c||!window.confirm(sF(e)))){u(!0),_("");try{await NI(e.id),n(),t()}catch(k){_(k instanceof Error?k.message:String(k))}finally{u(!1)}}}return f.jsx("div",{className:"modal-backdrop fixed inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-5",onClick:k=>{k.target===k.currentTarget&&p()},children:f.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,className:"modal w-120 max-w-full max-h-[calc(100vh-2.5rem)] overflow-y-auto rounded-xl border border-border bg-background p-6 text-text shadow-modal",children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[f.jsx("h2",{id:s,className:"m-0 text-xl font-medium",children:lin()}),f.jsx(At,{"aria-label":sb(),onClick:p,disabled:c,children:f.jsx(ur,{size:16})})]}),f.jsxs("form",{onSubmit:k=>{k.preventDefault(),m()},children:[f.jsx("label",{htmlFor:i,className:"sr-only",children:F3()}),f.jsxs("div",{className:"relative",children:[f.jsx(vo,{size:16,className:"pointer-events-none absolute start-3 top-3 text-subtext"}),f.jsx(qr,{id:i,"data-initial-focus":!0,value:a,onChange:k=>o(k.target.value),disabled:c,required:!0,className:"h-10 ps-10"})]}),f.jsx("div",{className:"mt-5 mb-2 text-sm font-medium",children:_an()}),f.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border p-3 text-sm",children:[f.jsx(vo,{size:16,className:"mt-0.5 shrink-0 text-subtext"}),f.jsx("span",{className:"min-w-0 break-all",children:e.repoPath})]}),d&&f.jsx("p",{role:"alert",className:"mt-3 text-sm text-accent-red",children:d}),f.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[f.jsx(Oe,{type:"button",variant:"danger",disabled:c,onClick:()=>void w(),children:$L()}),f.jsx("div",{className:"flex-1"}),f.jsx(Oe,{type:"button",variant:"ghost",disabled:c,onClick:p,children:v4t()}),f.jsx(Oe,{type:"submit",variant:"primary",disabled:c||!a.trim(),children:Qo()})]})]})]})})}const B0=e=>e.kind==="project"?36:34;function CT(e,n,t){const r=e.find(o=>o.kind==="chat"&&o.session.id===t),s=r&&e.find(o=>o.kind==="project"&&o.project.id===r.project.id),i=(o,c)=>{var _;const u=[];let d=0;for(const p of o){if(d+B0(p)>c)break;u.push(p),d+=B0(p)}return((_=u.at(-1))==null?void 0:_.kind)==="project"&&u.pop(),u},a=i(e,n);return!r||a.includes(r)?a:s?n<70?a:[...i(e.filter(o=>o.project.id!==r.project.id),n-70),s,r]:n<34?a:[...i(e.filter(o=>o!==r),n-34),r]}function yRn(e,n,t){const r=new Array(e);return new Proxy(r,{get(s,i,a){if(typeof i=="string"){const o=i.charCodeAt(0);if(o>=48&&o<=57){const c=+i;if(Number.isInteger(c)&&c>=0&&cr[d]!==u))&&(r=o,s=n(...o),t!=null&&t.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return a.updateDeps=o=>{r=o},a}function ET(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const xRn=(e,n)=>Math.abs(e-n)<1.01,wRn=(e,n,t)=>{let r;return Object.assign(function(...s){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,s),t)},{cancel:()=>{e.clearTimeout(r)}})};let m0;const t4=()=>{if(m0!==void 0)return m0;if(typeof navigator>"u")return m0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return m0=!0;const e=navigator.maxTouchPoints;return m0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},NT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},kRn=e=>e,mC=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-n+1,s=new Array(r);for(let i=0;i{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const s=a=>{const{width:o,height:c}=a;n({width:Math.round(o),height:Math.round(c)})};if(s(NT(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(NT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Eb={passive:!0},CRn=typeof window>"u"?!0:"onscrollend"in window,ERn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&CRn;let a=0;const o=i?null:wRn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=_=>()=>{a=t(r),o==null||o(),n(a,_)},u=c(!0),d=c(!1);return r.addEventListener("scroll",u,Eb),i&&r.addEventListener("scrollend",d,Eb),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",d),o==null||o.cancel()}},NRn=(e,n)=>ERn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),zRn=(e,n,t)=>{if(t.options.useCachedMeasurements){const r=t.indexFromElement(e),s=t.options.getItemKey(r);return t.itemSizeCache.get(s)??t.options.estimateSize(r)}if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}if(!n){const r=t.indexFromElement(e),s=t.options.getItemKey(r),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},jRn=(e,{adjustments:n=0,behavior:t},r)=>{var s,i;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:e+n,behavior:t})},ARn=jRn;class TRn{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,r,s;return((s=(r=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const a=()=>{const o=i.target,c=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,d]of this.elementsCache)if(d===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(o,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var r,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:kRn,rangeExtractor:mC,onChange:()=>{},measureElement:zRn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(i[p]=m)}const a=this.options;let o=null,c=null,u=!1;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=i.count,w=this.getMeasurements(),k=p>0?((r=w[0])==null?void 0:r.key)??a.getItemKey(0):null,v=p>0?((s=w[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(i.getItemKey(0)!==k||i.getItemKey(m-1)!==v)){u=!0;const b=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;b&&(o=[b.key,this.getScrollOffset()-b.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(c=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,_=0;if(o&&this.scrollOffset!==null){const[p,m]=o,w=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let y=0;for(;y{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Pd(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{if(a&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===i?this.scrollDirection:o{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!t4()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Eb),i.addEventListener("touchend",o,Eb),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,a,o,c]=s;i!==null&&!o&&(t4()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:r}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>r+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),r=this.getMaxScrollOffset();if(t<0||t>r)return;if(this._iosDeferredAdjustment<0&&t>=r-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Pd(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,r,s,i,a,o,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:c,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:c,gap:u},d)=>{const _=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const y of this.laneAssignments.keys())y>=t&&this.laneAssignments.delete(y);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(y=>{this.itemSizeCache.set(y.key,y.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){const y=t*2;let x=this._flatMeasurements;if(!x||x.length0&&N.set(x.subarray(0,p*2)),x=N,this._flatMeasurements=x}let b;if(p===0)b=r+s;else{const N=p-1;b=x[N*2]+x[N*2+1]+u}for(let N=p;N1){C=b;const D=w[C],L=D!==void 0?m[D]:void 0;N=L?L.end+u:r+s}else if(v===o){let D=0,L=k[0],B=w[0];for(let U=1;Uthis.options.debug}),this.calculateRange=Pd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=MRn(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Pd(()=>{let t=null,r=null;const s=this.calculateRange();return s&&(t=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,s,i,a)=>i===null||a===null?[]:t({startIndex:i,endIndex:a,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,s=t.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-i),o=Math.min(this.options.count-1,s+i);return t>=a&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(t);if(!this.isIndexInRange(r))return;const s=this.options.getItemKey(r),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,r)=>{var s,i;if(!this.isIndexInRange(t))return;let a,o,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,o=p.start,a=p.size}const d=this.itemSizeCache.get(c)??a,_=r-d;if(_!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,w=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(c)?o[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const s=[];for(let i=0,a=t.length;ithis.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,a=iF(0,r.length-1,i?o=>s[o*2]:o=>ET(r[o]).start,t);return ET(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=t>=a+i?"end":"start"),r==="center"?t+=(s-i)/2:r==="end"&&(t-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(r==="auto")if(a.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(t,{align:r="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,r),a=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:r="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,r);if(!i)return;const[a,o]=i,c=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?s=a[i*2]+a[i*2+1]:s=((t=r[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(o=>o===null);){const o=r[a];i[o.lane]===null&&(i[o.lane]=o.end),a--}s=Math.max(...i.filter(o=>o!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const r=this.getMeasurements();for(const s of r)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:r,behavior:s})=>{this._intendedScrollOffset=t+(r??0),this.options.scrollToFn(t,{behavior:s,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(n)}applyScrollAdjustment(n,t){if(n===0)return!1;if(t4()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=n,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+n,s=this.scrollElement,i=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&r>i+.5?{target:r,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&xRn(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const iF=(e,n,t,r)=>{for(;e<=n;){const s=(e+n)/2|0,i=t(s);if(ir)n=s-1;else return s}return e>0?e-1:0};function RRn(e,n,t){let r=0;for(;r<=n;){const s=(r+n)/2|0,i=e[s*2];if(it)n=s-1;else return s}return r>0?r-1:0}function MRn(e,n,t,r,s){const i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(r===1&&s!==null){const u=RRn(s,i,t);let d=u;const _=t+n;for(;de[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;c_=0&&d.some(_=>_>=t);){const _=e[o];d[_.lane]=_.start,o--}o=Math.max(0,o-o%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:o,endIndex:c}}const n4=typeof document<"u"?T.useLayoutEffect:T.useEffect;function ORn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(d=>d+1,0)[1],i=T.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=d=>{const _=i.current;if(!_.enabled||!_.container)return;const p=d.getTotalSize();if(p!==_.lastSize){_.lastSize=p;const m=d.options.horizontal?"width":"height";_.container.style[m]=`${p}px`}},o=d=>{const _=i.current;if(!_.enabled||!_.container)return;a(d);const p=!!d.options.horizontal,m=_.mode==="transform",w=p?"left":"top",k=d.options.scrollMargin,v=d.getVirtualItems();for(const y of v){const x=y.start-k,b=d.elementsCache.get(y.key);b&&_.lastPositions.get(b)!==x&&(_.lastPositions.set(b,x),m?b.style.transform=p?`translate3d(${x}px, 0, 0)`:`translate3d(0, ${x}px, 0)`:b.style[w]=`${x}px`)}},c={...r,onChange:(d,_)=>{var p;const m=i.current;let w=!0;if(m.enabled){o(d);const k=d.range,v=m.prevRange;w=!v||v.isScrolling!==d.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),w&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:d.isScrolling}:null)}w&&(e&&_?ni.flushSync(s):s()),(p=r.onChange)==null||p.call(r,d,_)}},[u]=T.useState(()=>{const d=new TRn(c);return Object.assign(d,{containerRef:_=>{const p=i.current;if(p.container=_,p.lastSize=null,_&&p.enabled){const m=d.getTotalSize();p.lastSize=m;const w=d.options.horizontal?"width":"height";_.style[w]=`${m}px`}}})});return u.setOptions(c),n4(()=>u._didMount(),[]),n4(()=>(a(u),u._willUpdate())),n4(()=>{o(u)}),u}function aF(e){return ORn({observeElementRect:SRn,observeElementOffset:NRn,scrollToFn:ARn,...e})}function DRn(e,n){if(!n)return e;const t=new Map(e.map(i=>[i.id,i]));let r=t.get(n);if(!r)return e;const s=[];for(;r;)s.push(r),r=r.parentId?t.get(r.parentId):void 0;return s.reverse()}function LRn(e,n,t){var a;let r=e;for(;r&&r.role!=="user";)r=r.parentId?n.get(r.parentId):void 0;const s=e.role==="user"?e.parentId??null:(r==null?void 0:r.id)??null,i=(a=t.get(s))==null?void 0:a.filter(o=>o.role===e.role);return i!=null&&i.length?i:[e]}function IRn(e,n,t,r){const s=e.filter(u=>!r(u.id)),i=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const d=u.parentId??null,_=a.get(d);_?_.push(u):a.set(d,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const d=LRn(u,i,a),_=d.findIndex(p=>o.has(p.id));c.set(u.id,{count:d.length,index:_,prevId:_>0?d[_-1].id:void 0,nextId:_=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function qh(e,n){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(n!==void 0)return e.id===n}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function lg(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function BRn(e,n){var r,s;const t=e.at(-1);return(n==null?void 0:n.id)==="turn-recovery"&&(t==null?void 0:t.type)==="tool"&&t.tool==="error"&&((r=t.state)!=null&&r.error)&&t.state.error===((s=n.state)==null?void 0:s.error)?e.slice(0,-1):e}function oF(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||lg(r)||!qh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function cF(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=oF(n.parts);return t?{messageId:n.id,toolId:t}:null}function PRn(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return!1;for(let t=n.parts.length-1;t>=0;t--){const r=n.parts[t];if(!(r.type==="steer"||lg(r)))return r.type==="text"&&!!r.text}return!1}function FRn(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(c=>c.id===o)&&o!==s);if(i.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const o of i)a.add(o);return s&&a.delete(s),a}function lF(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>qh(r))||!e.slice(0,t).some(r=>qh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function uF(e){return e.flatMap(n=>{var r;const t=n.type==="text"?(r=n.text)==null?void 0:r.trim():void 0;return t?[t]:[]}).join(` +${n?Z4t():i3t()}`}function FRn({project:e,chatCount:n,onRemoved:t,onNewChat:r,pinned:s,onPin:i}){const a=T.useRef(null),o=T.useRef(null),c=T.useId(),[u,d]=T.useState(!1),[f,p]=T.useState(!1),[m,w]=T.useState(!1);T.useEffect(()=>{const x=b=>{var C,N;b.target instanceof Node&&((C=o.current)!=null&&C.contains(b.target))||(N=o.current)==null||N.hidePopover()};return window.addEventListener("scroll",x,!0),window.addEventListener("resize",x),()=>{window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x)}},[]);function k(x,b){if(!x||!b)return;x.showPopover();const C=b.getBoundingClientRect(),N=x.getBoundingClientRect(),z=C.right+12+N.width<=window.innerWidth-8?C.right+12:Math.max(8,C.left-N.width-12);x.style.left=`${z}px`,x.style.top=`${Math.max(8,Math.min(C.top,window.innerHeight-N.height-8))}px`}function v(){var x;(x=o.current)==null||x.hidePopover(),p(!0)}async function y(){var x;if((x=o.current)==null||x.hidePopover(),!(m||!window.confirm(sF(e)))){w(!0);try{await NI(e.id),t()}catch(b){sn(b instanceof Error?b.message:String(b),"error")}finally{w(!1)}}}return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"flex h-7 min-w-0 flex-1 items-center gap-[7px] py-1 text-start text-sm font-normal text-text",children:[_.jsx(vo,{size:15,className:"shrink-0"}),_.jsx("span",{className:"truncate",children:e.name})]}),_.jsx(Rt,{ref:a,size:"small",className:`text-text group-hover:opacity-100 group-focus-within:opacity-100 ${u?"bg-surface opacity-100":"opacity-0"}`,"aria-label":van({name:e.name}),"aria-controls":c,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>{var x,b,C;(x=o.current)!=null&&x.matches(":popover-open")?o.current.hidePopover():(k(o.current,a.current),(C=(b=o.current)==null?void 0:b.querySelector("button"))==null||C.focus())},children:_.jsx(ip,{size:15})}),_.jsx(eg,{interactive:!0,content:D3(),className:"rounded-sm",children:_.jsx(Rt,{size:"small",className:"text-text opacity-0 group-hover:opacity-100 group-focus-within:opacity-100","aria-label":`${D3()} · ${e.name}`,onClick:r,children:_.jsx(Qf,{size:15})})}),_.jsxs("div",{ref:o,id:c,popover:"auto",role:"menu","aria-label":e.name,onToggle:x=>d(x.newState==="open"),onKeyDown:x=>{var N;if(x.key!=="ArrowDown"&&x.key!=="ArrowUp")return;x.preventDefault();const b=[...x.currentTarget.querySelectorAll("button:not(:disabled)")],C=b.findIndex(z=>z===document.activeElement);(N=b[(C+(x.key==="ArrowDown"?1:b.length-1))%b.length])==null||N.focus()},className:"fixed inset-auto m-0 w-72 max-w-[calc(100vw-1rem)] rounded-xl border border-border bg-background p-2 text-text shadow-modal",children:[_.jsxs("div",{role:"presentation",className:"mb-1 border-b border-border px-2 pb-2 pt-1 text-sm",children:[_.jsx("div",{className:"truncate font-medium",children:e.name}),_.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-subtext",children:[_.jsx(iCn,{size:13}),n===void 0?"…":_an({count:n})]}),_.jsx("div",{className:"mt-2 break-all text-xs text-subtext",children:e.repoPath})]}),_.jsx(un,{role:"menuitem",onClick:()=>{var x;i(),(x=o.current)==null||x.hidePopover()},children:_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx(CCn,{size:16}),s?Ban():san()]})}),_.jsx(un,{role:"menuitem",onClick:v,children:_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx(hy,{size:16}),eL()]})}),_.jsx(un,{role:"menuitem",onClick:()=>{var x;(x=o.current)==null||x.hidePopover(),AI(e.id,".").catch(b=>sn(b instanceof Error?b.message:String(b),"error"))},children:_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx(vo,{size:16}),Can()]})}),_.jsx("div",{className:"my-1 border-t border-border"}),_.jsx(un,{role:"menuitem",danger:!0,disabled:m,onClick:()=>void y(),children:_.jsxs("span",{className:"flex items-center gap-2",children:[_.jsx(Yf,{size:16}),$L()]})})]}),f&&ni.createPortal(_.jsx(HRn,{project:e,onClose:()=>p(!1),onRemoved:t}),document.body)]})}function HRn({project:e,onClose:n,onRemoved:t}){const r=T.useRef(null),s=T.useId(),i=T.useId(),[a,o]=T.useState(e.name),[c,u]=T.useState(!1),[d,f]=T.useState(""),p=()=>{c||n()};sp(r,p);async function m(){if(!(c||!a.trim())){u(!0),f("");try{await Bwn(e.id,{name:a.trim()}),n()}catch(k){f(k instanceof Error?k.message:String(k))}finally{u(!1)}}}async function w(){if(!(c||!window.confirm(sF(e)))){u(!0),f("");try{await NI(e.id),n(),t()}catch(k){f(k instanceof Error?k.message:String(k))}finally{u(!1)}}}return _.jsx("div",{className:"modal-backdrop fixed inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-5",onClick:k=>{k.target===k.currentTarget&&p()},children:_.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,className:"modal w-120 max-w-full max-h-[calc(100vh-2.5rem)] overflow-y-auto rounded-xl border border-border bg-background p-6 text-text shadow-modal",children:[_.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[_.jsx("h2",{id:s,className:"m-0 text-xl font-medium",children:Ain()}),_.jsx(Rt,{"aria-label":ib(),onClick:p,disabled:c,children:_.jsx(_r,{size:16})})]}),_.jsxs("form",{onSubmit:k=>{k.preventDefault(),m()},children:[_.jsx("label",{htmlFor:i,className:"sr-only",children:F3()}),_.jsxs("div",{className:"relative",children:[_.jsx(vo,{size:16,className:"pointer-events-none absolute start-3 top-3 text-subtext"}),_.jsx(qr,{id:i,"data-initial-focus":!0,value:a,onChange:k=>o(k.target.value),disabled:c,required:!0,className:"h-10 ps-10"})]}),_.jsx("div",{className:"mt-5 mb-2 text-sm font-medium",children:Ran()}),_.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border p-3 text-sm",children:[_.jsx(vo,{size:16,className:"mt-0.5 shrink-0 text-subtext"}),_.jsx("span",{className:"min-w-0 break-all",children:e.repoPath})]}),d&&_.jsx("p",{role:"alert",className:"mt-3 text-sm text-accent-red",children:d}),_.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[_.jsx(Me,{type:"button",variant:"danger",disabled:c,onClick:()=>void w(),children:$L()}),_.jsx("div",{className:"flex-1"}),_.jsx(Me,{type:"button",variant:"ghost",disabled:c,onClick:p,children:B4t()}),_.jsx(Me,{type:"submit",variant:"primary",disabled:c||!a.trim(),children:Qo()})]})]})]})})}const P0=e=>e.kind==="project"?36:34;function CT(e,n,t){const r=e.find(o=>o.kind==="chat"&&o.session.id===t),s=r&&e.find(o=>o.kind==="project"&&o.project.id===r.project.id),i=(o,c)=>{var f;const u=[];let d=0;for(const p of o){if(d+P0(p)>c)break;u.push(p),d+=P0(p)}return((f=u.at(-1))==null?void 0:f.kind)==="project"&&u.pop(),u},a=i(e,n);return!r||a.includes(r)?a:s?n<70?a:[...i(e.filter(o=>o.project.id!==r.project.id),n-70),s,r]:n<34?a:[...i(e.filter(o=>o!==r),n-34),r]}function qRn(e,n,t){const r=new Array(e);return new Proxy(r,{get(s,i,a){if(typeof i=="string"){const o=i.charCodeAt(0);if(o>=48&&o<=57){const c=+i;if(Number.isInteger(c)&&c>=0&&cr[d]!==u))&&(r=o,s=n(...o),t!=null&&t.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return a.updateDeps=o=>{r=o},a}function ET(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const URn=(e,n)=>Math.abs(e-n)<1.01,GRn=(e,n,t)=>{let r;return Object.assign(function(...s){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,s),t)},{cancel:()=>{e.clearTimeout(r)}})};let m0;const t4=()=>{if(m0!==void 0)return m0;if(typeof navigator>"u")return m0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return m0=!0;const e=navigator.maxTouchPoints;return m0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},NT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},VRn=e=>e,mC=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-n+1,s=new Array(r);for(let i=0;i{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const s=a=>{const{width:o,height:c}=a;n({width:Math.round(o),height:Math.round(c)})};if(s(NT(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(NT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},Nb={passive:!0},WRn=typeof window>"u"?!0:"onscrollend"in window,QRn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&WRn;let a=0;const o=i?null:GRn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=t(r),o==null||o(),n(a,f)},u=c(!0),d=c(!1);return r.addEventListener("scroll",u,Nb),i&&r.addEventListener("scrollend",d,Nb),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",d),o==null||o.cancel()}},XRn=(e,n)=>QRn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),YRn=(e,n,t)=>{if(t.options.useCachedMeasurements){const r=t.indexFromElement(e),s=t.options.getItemKey(r);return t.itemSizeCache.get(s)??t.options.estimateSize(r)}if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}if(!n){const r=t.indexFromElement(e),s=t.options.getItemKey(r),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},ZRn=(e,{adjustments:n=0,behavior:t},r)=>{var s,i;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:e+n,behavior:t})},JRn=ZRn;class eMn{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,r,s;return((s=(r=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const a=()=>{const o=i.target,c=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,d]of this.elementsCache)if(d===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(c)&&this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(o,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var r,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:VRn,rangeExtractor:mC,onChange:()=>{},measureElement:YRn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(i[p]=m)}const a=this.options;let o=null,c=null,u=!1;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=i.count,w=this.getMeasurements(),k=p>0?((r=w[0])==null?void 0:r.key)??a.getItemKey(0):null,v=p>0?((s=w[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(i.getItemKey(0)!==k||i.getItemKey(m-1)!==v)){u=!0;const b=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;b&&(o=[b.key,this.getScrollOffset()-b.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==v)&&(c=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,f=0;if(o&&this.scrollOffset!==null){const[p,m]=o,w=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let y=0;for(;y{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Pd(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{if(a&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===i?this.scrollDirection:o{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!t4()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,Nb),i.addEventListener("touchend",o,Nb),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,a,o,c]=s;i!==null&&!o&&(t4()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?c!==0&&(this._iosDeferredAdjustment+=c):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:r}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>r+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),r=this.getMaxScrollOffset();if(t<0||t>r)return;if(this._iosDeferredAdjustment<0&&t>=r-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Pd(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,r,s,i,a,o,c,u)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:c,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:c,gap:u},d)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const y of this.laneAssignments.keys())y>=t&&this.laneAssignments.delete(y);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(y=>{this.itemSizeCache.set(y.key,y.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){const y=t*2;let x=this._flatMeasurements;if(!x||x.length0&&N.set(x.subarray(0,p*2)),x=N,this._flatMeasurements=x}let b;if(p===0)b=r+s;else{const N=p-1;b=x[N*2]+x[N*2+1]+u}for(let N=p;N1){C=b;const D=w[C],L=D!==void 0?m[D]:void 0;N=L?L.end+u:r+s}else if(v===o){let D=0,L=k[0],B=w[0];for(let U=1;Uthis.options.debug}),this.calculateRange=Pd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=nMn(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Pd(()=>{let t=null,r=null;const s=this.calculateRange();return s&&(t=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,s,i,a)=>i===null||a===null?[]:t({startIndex:i,endIndex:a,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,s=t.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-i),o=Math.min(this.options.count-1,s+i);return t>=a&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(t);if(!this.isIndexInRange(r))return;const s=this.options.getItemKey(r),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,r)=>{var s,i;if(!this.isIndexInRange(t))return;let a,o,c;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)c=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;c=p.key,o=p.start,a=p.size}const d=this.itemSizeCache.get(c)??a,f=r-d;if(f!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,w=this.getScrollOffset()+this.scrollAdjustments,v=!this.itemSizeCache.has(c)?o[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const s=[];for(let i=0,a=t.length;ithis.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,a=iF(0,r.length-1,i?o=>s[o*2]:o=>ET(r[o]).start,t);return ET(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=t>=a+i?"end":"start"),r==="center"?t+=(s-i)/2:r==="end"&&(t-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(r==="auto")if(a.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(t,{align:r="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,r),a=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:r="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,r);if(!i)return;const[a,o]=i,c=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?s=a[i*2]+a[i*2+1]:s=((t=r[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(o=>o===null);){const o=r[a];i[o.lane]===null&&(i[o.lane]=o.end),a--}s=Math.max(...i.filter(o=>o!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const r=this.getMeasurements();for(const s of r)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:r,behavior:s})=>{this._intendedScrollOffset=t+(r??0),this.options.scrollToFn(t,{behavior:s,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(n)}applyScrollAdjustment(n,t){if(n===0)return!1;if(t4()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=n,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+n,s=this.scrollElement,i=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&r>i+.5?{target:r,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&URn(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,c=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&c>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const iF=(e,n,t,r)=>{for(;e<=n;){const s=(e+n)/2|0,i=t(s);if(ir)n=s-1;else return s}return e>0?e-1:0};function tMn(e,n,t){let r=0;for(;r<=n;){const s=(r+n)/2|0,i=e[s*2];if(it)n=s-1;else return s}return r>0?r-1:0}function nMn(e,n,t,r,s){const i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(r===1&&s!==null){const u=tMn(s,i,t);let d=u;const f=t+n;for(;de[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;cf=0&&d.some(f=>f>=t);){const f=e[o];d[f.lane]=f.start,o--}o=Math.max(0,o-o%r),c=Math.min(i,c+(r-1-c%r))}return{startIndex:o,endIndex:c}}const n4=typeof document<"u"?T.useLayoutEffect:T.useEffect;function rMn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(d=>d+1,0)[1],i=T.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=d=>{const f=i.current;if(!f.enabled||!f.container)return;const p=d.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=d.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},o=d=>{const f=i.current;if(!f.enabled||!f.container)return;a(d);const p=!!d.options.horizontal,m=f.mode==="transform",w=p?"left":"top",k=d.options.scrollMargin,v=d.getVirtualItems();for(const y of v){const x=y.start-k,b=d.elementsCache.get(y.key);b&&f.lastPositions.get(b)!==x&&(f.lastPositions.set(b,x),m?b.style.transform=p?`translate3d(${x}px, 0, 0)`:`translate3d(0, ${x}px, 0)`:b.style[w]=`${x}px`)}},c={...r,onChange:(d,f)=>{var p;const m=i.current;let w=!0;if(m.enabled){o(d);const k=d.range,v=m.prevRange;w=!v||v.isScrolling!==d.isScrolling||v.startIndex!==(k==null?void 0:k.startIndex)||v.endIndex!==(k==null?void 0:k.endIndex),w&&(m.prevRange=k?{startIndex:k.startIndex,endIndex:k.endIndex,isScrolling:d.isScrolling}:null)}w&&(e&&f?ni.flushSync(s):s()),(p=r.onChange)==null||p.call(r,d,f)}},[u]=T.useState(()=>{const d=new eMn(c);return Object.assign(d,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=d.getTotalSize();p.lastSize=m;const w=d.options.horizontal?"width":"height";f.style[w]=`${m}px`}}})});return u.setOptions(c),n4(()=>u._didMount(),[]),n4(()=>(a(u),u._willUpdate())),n4(()=>{o(u)}),u}function aF(e){return rMn({observeElementRect:KRn,observeElementOffset:XRn,scrollToFn:JRn,...e})}function sMn(e,n){if(!n)return e;const t=new Map(e.map(i=>[i.id,i]));let r=t.get(n);if(!r)return e;const s=[];for(;r;)s.push(r),r=r.parentId?t.get(r.parentId):void 0;return s.reverse()}function iMn(e,n,t){var a;let r=e;for(;r&&r.role!=="user";)r=r.parentId?n.get(r.parentId):void 0;const s=e.role==="user"?e.parentId??null:(r==null?void 0:r.id)??null,i=(a=t.get(s))==null?void 0:a.filter(o=>o.role===e.role);return i!=null&&i.length?i:[e]}function aMn(e,n,t,r){const s=e.filter(u=>!r(u.id)),i=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const d=u.parentId??null,f=a.get(d);f?f.push(u):a.set(d,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const d=iMn(u,i,a),f=d.findIndex(p=>o.has(p.id));c.set(u.id,{count:d.length,index:f,prevId:f>0?d[f-1].id:void 0,nextId:f=0;i--)for(const a of e[i].parts)if(!(a.type!=="prompt"||(r=a.prompt)!=null&&r.resolved||((s=a.prompt)==null?void 0:s.kind)!=="question"))return a.prompt.nativeId&&!t?null:a.id;return null}function qh(e,n){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(n!==void 0)return e.id===n}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function ug(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function cMn(e,n){var r,s;const t=e.at(-1);return(n==null?void 0:n.id)==="turn-recovery"&&(t==null?void 0:t.type)==="tool"&&t.tool==="error"&&((r=t.state)!=null&&r.error)&&t.state.error===((s=n.state)==null?void 0:s.error)?e.slice(0,-1):e}function oF(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||ug(r)||!qh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function cF(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=oF(n.parts);return t?{messageId:n.id,toolId:t}:null}function lMn(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return!1;for(let t=n.parts.length-1;t>=0;t--){const r=n.parts[t];if(!(r.type==="steer"||ug(r)))return r.type==="text"&&!!r.text}return!1}function uMn(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(c=>c.id===o)&&o!==s);if(i.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const o of i)a.add(o);return s&&a.delete(s),a}function lF(e,n){if(e.some(r=>{var s;return r.type==="prompt"&&!((s=r.prompt)!=null&&s.resolved)}))return{work:[],answer:e};let t=e.findIndex(r=>r.type==="text"&&r.phase==="final_answer");if(t<0&&!n&&!e.some(r=>r.phase))for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="reasoning"){if(s.type!=="text")break;s.text&&(t=r)}}return t<0||!n&&!e.slice(t).some(r=>qh(r))||!e.slice(0,t).some(r=>qh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function uF(e){return e.flatMap(n=>{var r;const t=n.type==="text"?(r=n.text)==null?void 0:r.trim():void 0;return t?[t]:[]}).join(` -`)}function _F(e){return uF(lF(e.parts,!1).answer)}function HRn(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=_F(e[n]);if(t)return t}return""}function qRn(e,n,t){const r=n.flatMap(s=>{const i=uF(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} +`)}function _F(e){return uF(lF(e.parts,!1).answer)}function _Mn(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=_F(e[n]);if(t)return t}return""}function fMn(e,n,t){const r=n.flatMap(s=>{const i=uF(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} ${i}`]:[]});return r.length===0?null:[`# ${e}`,...r].join(` `)+` -`}function URn(e){return`${e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").slice(0,80).replace(/^-+|-+$/g,"")||"chat"}.md`}function fF(e){var n,t;return e.type==="tool"&&e.tool==="error"&&/^(?:ActionRequiredError:\s*)?Named models unavailable\b/i.test(((t=(n=e.state)==null?void 0:n.error)==null?void 0:t.trim())??"")}function Y5(e){var t,r,s;if(fF(e)||((r=(t=e.state)==null?void 0:t.input)==null?void 0:r.errorKind)==="claude_usage_limit")return!0;const n=e.type==="text"?e.text:e.tool==="error"?(s=e.state)==null?void 0:s.error:null;return e.type==="tool"&&e.tool==="error"&&n&&/usageLimitExceeded|rateLimitExceeded|insufficient_quota|(?:usage|rate|session) limit|(?:exceeded|exhausted) (?:your |the |current )*quota|insufficient (?:credits|balance)|(?:credit|quota)[ _-](?:exhausted|exceeded)/i.test(n)?!0:!!(n&&(/^(?:claude: )?you(?:'ve| have) reached your .+ limit\./i.test(n.trim())&&n.includes("claude.ai/settings/usage")||/^(?:claude: )?you(?:'ve| have) hit your session limit · resets /i.test(n.trim())))}const vc=e=>new Intl.NumberFormat(E()).format(e);function GRn(e,n){const t=typeof e.nextRetryAt=="number"?Math.max(0,Math.ceil((e.nextRetryAt-n)/1e3)):null;return e.retryOwner==="native"&&e.maximum==null&&t==null?N9t():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?d9t({attempt:vc(e.attempt),maximum:vc(e.maximum),seconds:vc(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?a9t({attempt:vc(e.attempt),maximum:vc(e.maximum)}):typeof e.attempt=="number"&&t!=null?y9t({attempt:vc(e.attempt),seconds:vc(t)}):typeof e.attempt=="number"?J8t({attempt:vc(e.attempt)}):t!=null?O9t({seconds:vc(t)}):FL()}function VRn(e,n){if(typeof e!="number")return F9t();const t=Math.max(0,Math.ceil((e-n)/1e3));return W9t({seconds:vc(t)})}function dF(e){return e==="retry"||e==="continue"?e:null}function KRn(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}const r4={draft:"",attachments:[],annotations:[]};function WRn(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function QRn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function zT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function XRn(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";if(t.includes("pubmed.ncbi.nlm.nih.gov")||t.includes("ncbi.nlm.nih.gov/pubmed")||t.startsWith("pmid:"))return"pubmed";const r=n.match(/10\.\d+\/\S+/);if(r)return r[0].startsWith("10.1101/")?"biorxiv":"openalex";const s=n.split("/").pop()??"";return/^W\d+$/i.test(s)?"openalex":/^\d{1,9}$/.test(n)?"pubmed":"alphaxiv"}function ug(e,n=!1){const t=[];let r="",s=!1,i=!1,a=null;const o=()=>{s&&t.push(n&&i?"":r),r="",s=!1,i=!1};for(let c=0;c"||u==="&")break;/\s/.test(u)?o():(r+=u,s=!0)}return o(),t}function YRn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=ug(e);if(t.length===1)return t[0]}return e}function hF(e){var t,r,s;let n=0;for(;["do","then","else","if","while","until"].includes(e[n]);)n++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="env")for(n++;(t=e[n])!=null&&t.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="command"){if(n++,["-v","-V"].includes(e[n]))return null;for(;(r=e[n])!=null&&r.startsWith("-");)n++}return((s=e[n])==null?void 0:s.split("/").pop())!=="orx"?null:e.slice(n+1)}function fm(e){return hF(typeof e=="string"?ug(e):e)}function jT(e){var t;const n=(t=e[0])==null?void 0:t.split("/").pop();return!n||!["sh","bash","zsh"].includes(n)||e[1]!=="-lc"?null:e[2]??null}function ZRn(e,n){const t=fm(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function JRn(e){var c;const n=hF(typeof e=="string"?ug(e,!0):e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],i=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let u=1;ui.startsWith("=== ")).map(i=>i.slice(4))),s=[];for(const i of e.matchAll(/\bfor\s+([A-Za-z_][A-Za-z0-9_]*)\s+in\s+([^;\n]+);\s*do\b([\s\S]*?)\bdone\b/g)){const[,a,o,c]=i;if(!new RegExp(`(?:^|[;\\n])\\s*orx\\s+discover\\s+${t}\\s+"?\\$${a}"?(?=\\s|[;|]|$)`).test(c)||!c.includes(`echo "=== $${a}"`))continue;const d=ug(o,!0);for(const _ of d)_&&r.has(_)&&s.push(_)}return s}const tMn=` +`}function dMn(e){return`${e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").slice(0,80).replace(/^-+|-+$/g,"")||"chat"}.md`}function fF(e){var n,t;return e.type==="tool"&&e.tool==="error"&&/^(?:ActionRequiredError:\s*)?Named models unavailable\b/i.test(((t=(n=e.state)==null?void 0:n.error)==null?void 0:t.trim())??"")}function Y5(e){var t,r,s;if(fF(e)||((r=(t=e.state)==null?void 0:t.input)==null?void 0:r.errorKind)==="claude_usage_limit")return!0;const n=e.type==="text"?e.text:e.tool==="error"?(s=e.state)==null?void 0:s.error:null;return e.type==="tool"&&e.tool==="error"&&n&&/usageLimitExceeded|rateLimitExceeded|insufficient_quota|(?:usage|rate|session) limit|(?:exceeded|exhausted) (?:your |the |current )*quota|insufficient (?:credits|balance)|(?:credit|quota)[ _-](?:exhausted|exceeded)/i.test(n)?!0:!!(n&&(/^(?:claude: )?you(?:'ve| have) reached your .+ limit\./i.test(n.trim())&&n.includes("claude.ai/settings/usage")||/^(?:claude: )?you(?:'ve| have) hit your session limit · resets /i.test(n.trim())))}const vc=e=>new Intl.NumberFormat(E()).format(e);function hMn(e,n){const t=typeof e.nextRetryAt=="number"?Math.max(0,Math.ceil((e.nextRetryAt-n)/1e3)):null;return e.retryOwner==="native"&&e.maximum==null&&t==null?W9t():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?O9t({attempt:vc(e.attempt),maximum:vc(e.maximum),seconds:vc(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?N9t({attempt:vc(e.attempt),maximum:vc(e.maximum)}):typeof e.attempt=="number"&&t!=null?F9t({attempt:vc(e.attempt),seconds:vc(t)}):typeof e.attempt=="number"?y9t({attempt:vc(e.attempt)}):t!=null?tEt({seconds:vc(t)}):FL()}function pMn(e,n){if(typeof e!="number")return cEt();const t=Math.max(0,Math.ceil((e-n)/1e3));return pEt({seconds:vc(t)})}function dF(e){return e==="retry"||e==="continue"?e:null}function mMn(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}const r4={draft:"",attachments:[],annotations:[]};function gMn(e,n){return(e.draft===""||e.draft===n)&&e.attachments.length===0&&e.annotations.length===0?null:{...e,annotations:e.annotations.map(({range:r,...s})=>s)}}function vMn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function zT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function bMn(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";if(t.includes("pubmed.ncbi.nlm.nih.gov")||t.includes("ncbi.nlm.nih.gov/pubmed")||t.startsWith("pmid:"))return"pubmed";const r=n.match(/10\.\d+\/\S+/);if(r)return r[0].startsWith("10.1101/")?"biorxiv":"openalex";const s=n.split("/").pop()??"";return/^W\d+$/i.test(s)?"openalex":/^\d{1,9}$/.test(n)?"pubmed":"alphaxiv"}function _g(e,n=!1){const t=[];let r="",s=!1,i=!1,a=null;const o=()=>{s&&t.push(n&&i?"":r),r="",s=!1,i=!1};for(let c=0;c"||u==="&")break;/\s/.test(u)?o():(r+=u,s=!0)}return o(),t}function yMn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=_g(e);if(t.length===1)return t[0]}return e}function hF(e){var t,r,s;let n=0;for(;["do","then","else","if","while","until"].includes(e[n]);)n++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="env")for(n++;(t=e[n])!=null&&t.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="command"){if(n++,["-v","-V"].includes(e[n]))return null;for(;(r=e[n])!=null&&r.startsWith("-");)n++}return((s=e[n])==null?void 0:s.split("/").pop())!=="orx"?null:e.slice(n+1)}function dm(e){return hF(typeof e=="string"?_g(e):e)}function jT(e){var t;const n=(t=e[0])==null?void 0:t.split("/").pop();return!n||!["sh","bash","zsh"].includes(n)||e[1]!=="-lc"?null:e[2]??null}function xMn(e,n){const t=dm(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function wMn(e){var c;const n=hF(typeof e=="string"?_g(e,!0):e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],i=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let u=1;ui.startsWith("=== ")).map(i=>i.slice(4))),s=[];for(const i of e.matchAll(/\bfor\s+([A-Za-z_][A-Za-z0-9_]*)\s+in\s+([^;\n]+);\s*do\b([\s\S]*?)\bdone\b/g)){const[,a,o,c]=i;if(!new RegExp(`(?:^|[;\\n])\\s*orx\\s+discover\\s+${t}\\s+"?\\$${a}"?(?=\\s|[;|]|$)`).test(c)||!c.includes(`echo "=== $${a}"`))continue;const d=_g(o,!0);for(const f of d)f&&r.has(f)&&s.push(f)}return s}const SMn=` -`,nMn='',rMn=` +`,CMn='',EMn=` -`,sMn=`Pm -`,pF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},iMn={alphaxiv:tMn,openalex:rMn,biorxiv:nMn,pubmed:sMn};function mF({source:e,size:n=16,decorative:t=!1,className:r=""}){return f.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${r}`,style:{width:n,height:n},...t?{"aria-hidden":!0}:{role:"img","aria-label":pF[e]},dangerouslySetInnerHTML:{__html:iMn[e]}})}function aMn(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function oMn(e,n){const t=n.trim();if(e==="alphaxiv"){const i=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(i)}`}if(e==="pubmed"){const s=t.split(/[?#]/)[0],i=/^pmid:/i.test(s)?s.slice(5).trim():s.replace(/\/+$/,"").split("/").pop();if(i&&/^\d{1,9}$/.test(i))return`https://pubmed.ncbi.nlm.nih.gov/${i}/`}const r=aMn(t);if(r)return`https://doi.org/${r}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const cMn=["alphaxiv","openalex","biorxiv","pubmed"];function lMn(){const e=V3n(),{data:n}=ft(e),t=vn({mutationFn:q4n,onSuccess:i=>ts(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?f.jsx("div",{className:"flex flex-col",children:cMn.map(i=>{const a=n[i];return f.jsxs(on,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[f.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[f.jsx(mF,{source:i,size:16,decorative:!0}),pF[i]]}),f.jsx(Rkn,{checked:a,"aria-hidden":"true"})]},i)})}):f.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:NJe()})}function s4(e,n){if(!e)throw new Error("Assertion Error")}function q_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}var AT=Object.prototype.hasOwnProperty;function TT(e,n,t){for(t of e.keys())if(P0(t,n))return t}function P0(e,n){var t,r,s;if(e===n)return!0;if(e&&n&&(t=e.constructor)===n.constructor){if(t===Date)return e.getTime()===n.getTime();if(t===RegExp)return e.toString()===n.toString();if(t===Array){if((r=e.length)===n.length)for(;r--&&P0(e[r],n[r]););return r===-1}if(t===Set){if(e.size!==n.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=TT(n,s),!s)||!n.has(s))return!1;return!0}if(t===Map){if(e.size!==n.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=TT(n,s),!s)||!P0(r[1],n.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),n=new Uint8Array(n);else if(t===DataView){if((r=e.byteLength)===n.byteLength)for(;r--&&e.getInt8(r)===n.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===n.byteLength)for(;r--&&e[r]===n[r];);return r===-1}if(!t||typeof e=="object"){r=0;for(t in e)if(AT.call(e,t)&&++r&&!AT.call(n,t)||!(t in n)||!P0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const uMn=new Set(["table","tbody","thead","tfoot","tr"]),_Mn=/^[\t\n\f\r ]*$/;function fMn(e,n,t={}){const r=gF(e,n??null,{Fragment:f.Fragment,components:t,jsx:f.jsx,jsxs:f.jsxs},void 0);return{react:r.react,state:r}}function gF(e,n,t,r){var k,v,y,x;if(n&&n.key===r&&e===n.node)return n;if(!("children"in e)||!Array.isArray(e.children))return n&&n.key===r&&lh(e,n.node)?n:{children:[],key:r,node:e,react:e.type==="text"&&"value"in e&&typeof e.value=="string"?e.value:void 0,shell:null};const s=(n==null?void 0:n.children)??[],i=[],a=[],o=new Map,c=new Set(s.map(b=>b.key).filter(b=>b!==void 0));let u=0;for(;u=e.children.length-d&&(z=s.length-(e.children.length-b)),z>=0&&(N=((y=s[z])==null?void 0:y.key)??N);N&&c.has(N)&&((x=s[z])==null?void 0:x.key)!==N;)N=`${N}+`;N&&c.add(N);const A=gF(C,s[z]??null,t,N);i.push(A),A.react!==void 0&&a.push(A.react)}const _=n!==null&&dMn(e,n.node);if(n&&n.key===r&&_&&s.length===i.length&&i.every((b,C)=>b===s[C]))return n;const p=e.type==="element"&&uMn.has(e.tagName)?a.filter(b=>typeof b!="string"||!_Mn.test(b)):a,m=p.length>0?p.length===1?p[0]:p:null;let w=_?n==null?void 0:n.shell:null;if(!w){const b=AP({...e,children:[]},t);w={props:b.props,type:b.type}}return{children:i,key:r,node:e,react:f.jsx(w.type,{...w.props,children:m},r),shell:w}}function dMn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return P0(s,o)}function lh(e,n){if(e===n)return!0;if(Array.isArray(e)||Array.isArray(n)){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let a=0;a0&&(Ve(this,Ku,ue(this,Ku)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=RT(t)),ue(this,Ku)+EMn(t,r)}}Ku=new WeakMap;const pMn=new Set(["*","**","_","__"]);function RT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tPm +`,pF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},zMn={alphaxiv:SMn,openalex:EMn,biorxiv:CMn,pubmed:NMn};function mF({source:e,size:n=16,decorative:t=!1,className:r=""}){return _.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${r}`,style:{width:n,height:n},...t?{"aria-hidden":!0}:{role:"img","aria-label":pF[e]},dangerouslySetInnerHTML:{__html:zMn[e]}})}function jMn(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function AMn(e,n){const t=n.trim();if(e==="alphaxiv"){const i=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(i)}`}if(e==="pubmed"){const s=t.split(/[?#]/)[0],i=/^pmid:/i.test(s)?s.slice(5).trim():s.replace(/\/+$/,"").split("/").pop();if(i&&/^\d{1,9}$/.test(i))return`https://pubmed.ncbi.nlm.nih.gov/${i}/`}const r=jMn(t);if(r)return`https://doi.org/${r}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const TMn=["alphaxiv","openalex","biorxiv","pubmed"];function RMn(){const e=h5n(),{data:n}=dt(e),t=pn({mutationFn:_3n,onSuccess:i=>ts(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?_.jsx("div",{className:"flex flex-col",children:TMn.map(i=>{const a=n[i];return _.jsxs(un,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[_.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[_.jsx(mF,{source:i,size:16,decorative:!0}),pF[i]]}),_.jsx(eSn,{checked:a,"aria-hidden":"true"})]},i)})}):_.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:NJe()})}function s4(e,n){if(!e)throw new Error("Assertion Error")}function q_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}var AT=Object.prototype.hasOwnProperty;function TT(e,n,t){for(t of e.keys())if(F0(t,n))return t}function F0(e,n){var t,r,s;if(e===n)return!0;if(e&&n&&(t=e.constructor)===n.constructor){if(t===Date)return e.getTime()===n.getTime();if(t===RegExp)return e.toString()===n.toString();if(t===Array){if((r=e.length)===n.length)for(;r--&&F0(e[r],n[r]););return r===-1}if(t===Set){if(e.size!==n.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=TT(n,s),!s)||!n.has(s))return!1;return!0}if(t===Map){if(e.size!==n.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=TT(n,s),!s)||!F0(r[1],n.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),n=new Uint8Array(n);else if(t===DataView){if((r=e.byteLength)===n.byteLength)for(;r--&&e.getInt8(r)===n.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===n.byteLength)for(;r--&&e[r]===n[r];);return r===-1}if(!t||typeof e=="object"){r=0;for(t in e)if(AT.call(e,t)&&++r&&!AT.call(n,t)||!(t in n)||!F0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const MMn=new Set(["table","tbody","thead","tfoot","tr"]),OMn=/^[\t\n\f\r ]*$/;function DMn(e,n,t={}){const r=gF(e,n??null,{Fragment:_.Fragment,components:t,jsx:_.jsx,jsxs:_.jsxs},void 0);return{react:r.react,state:r}}function gF(e,n,t,r){var k,v,y,x;if(n&&n.key===r&&e===n.node)return n;if(!("children"in e)||!Array.isArray(e.children))return n&&n.key===r&&lh(e,n.node)?n:{children:[],key:r,node:e,react:e.type==="text"&&"value"in e&&typeof e.value=="string"?e.value:void 0,shell:null};const s=(n==null?void 0:n.children)??[],i=[],a=[],o=new Map,c=new Set(s.map(b=>b.key).filter(b=>b!==void 0));let u=0;for(;u=e.children.length-d&&(z=s.length-(e.children.length-b)),z>=0&&(N=((y=s[z])==null?void 0:y.key)??N);N&&c.has(N)&&((x=s[z])==null?void 0:x.key)!==N;)N=`${N}+`;N&&c.add(N);const A=gF(C,s[z]??null,t,N);i.push(A),A.react!==void 0&&a.push(A.react)}const f=n!==null&&LMn(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((b,C)=>b===s[C]))return n;const p=e.type==="element"&&MMn.has(e.tagName)?a.filter(b=>typeof b!="string"||!OMn.test(b)):a,m=p.length>0?p.length===1?p[0]:p:null;let w=f?n==null?void 0:n.shell:null;if(!w){const b=AP({...e,children:[]},t);w={props:b.props,type:b.type}}return{children:i,key:r,node:e,react:_.jsx(w.type,{...w.props,children:m},r),shell:w}}function LMn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return F0(s,o)}function lh(e,n){if(e===n)return!0;if(Array.isArray(e)||Array.isArray(n)){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let a=0;a0&&(Ge(this,Ku,ue(this,Ku)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=RT(t)),ue(this,Ku)+QMn(t,r)}}Ku=new WeakMap;const $Mn=new Set(["*","**","_","__"]);function RT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tt){t=s-1;continue}if(n.exclusive)continue;if(CMn(n)){MT(n,t,r);continue}const i=yMn(n,e,t);if(i>t){t=i-1;continue}const a=xMn(n,e,t);if(a>t){t=a-1;continue}Vo(e,t)||MT(n,t,r)}return n}function mMn(e,n,t){const r=n[t];return r==="`"?gMn(e,n,t):r==="$"?vMn(e,n,t):r==="~"?bMn(e,n,t):t}function gMn(e,n,t){const r=gC(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&Nb(n,t)&&!Vo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!Vo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||Vo(n,t)?t+r:r>=3&&Nb(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function vMn(e,n,t){const r=gC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Vo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Vo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function bMn(e,n,t){const r=gC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(Nb(n,t)&&!Vo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!Nb(n,t)||Vo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function yMn(e,n,t){if(n[t]!=="<"||Vo(n,t))return t;const r=n[t+1];if(r!==void 0&&!yF(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function xMn(e,n,t){const r=wMn(n,t);if(!r)return t;if(Vo(n,t))return t+r.length;const s=e.delims.findLastIndex(i=>i.token===r);return s!==-1?(e.delims.splice(s,1),t+r.length):t+r.length===n.length?(e.pendingDelim={start:t,token:r},t+r.length):(kMn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function wMn(e,n){const t=e[n];if(t==="*")return e.startsWith("***",n)?"***":e.startsWith("**",n)?"**":"*";if(t==="_")return e.startsWith("__",n)?"__":"_";if(t==="~"&&e.startsWith("~~",n))return"~~"}function kMn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!LT(s)||!LT(r)}function MT(e,n,t){const r=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:n});return}if(t==="]"&&(r==null?void 0:r.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:r.start,textEnd:n};return}if(t==="("&&(r==null?void 0:r.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:r.start,textEnd:r.textEnd,parenDepth:0};return}if(t==="("&&(r==null?void 0:r.phase)==="url"){r.parenDepth+=1;return}if(t===")"&&(r==null?void 0:r.phase)==="url"){if(r.parenDepth>0){r.parenDepth-=1;return}e.links.pop()}}function SMn(e){var n,t;e.delims.length=0,e.links.length=0,((n=e.exclusive)==null?void 0:n.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function CMn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function EMn(e,n){n.pendingHtml!==null&&(e=e.slice(0,jMn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return mc(NMn(e,t));const r=zMn(n);if(r)return mc(th(e,r));const s=RMn(n);return s?s.kind==="delim"?mc(Z5(e,s.start,s.token.length)?vF(e,s.token):e.slice(0,s.start)):Z5(e,s.start,s.token.length)?s.kind==="fence"?mc(e):s.kind==="code"?mc(th(e,s.token)):s.token==="$$"?mc(th(e,(e.endsWith(` +`){KMn(n),n.exclusive||(n.commitIndex=t+1);continue}const s=BMn(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(WMn(n)){MT(n,t,r);continue}const i=qMn(n,e,t);if(i>t){t=i-1;continue}const a=UMn(n,e,t);if(a>t){t=a-1;continue}Vo(e,t)||MT(n,t,r)}return n}function BMn(e,n,t){const r=n[t];return r==="`"?PMn(e,n,t):r==="$"?FMn(e,n,t):r==="~"?HMn(e,n,t):t}function PMn(e,n,t){const r=gC(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&zb(n,t)&&!Vo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!Vo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||Vo(n,t)?t+r:r>=3&&zb(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function FMn(e,n,t){const r=gC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Vo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Vo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function HMn(e,n,t){const r=gC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(zb(n,t)&&!Vo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!zb(n,t)||Vo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function qMn(e,n,t){if(n[t]!=="<"||Vo(n,t))return t;const r=n[t+1];if(r!==void 0&&!yF(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function UMn(e,n,t){const r=GMn(n,t);if(!r)return t;if(Vo(n,t))return t+r.length;const s=e.delims.findLastIndex(i=>i.token===r);return s!==-1?(e.delims.splice(s,1),t+r.length):t+r.length===n.length?(e.pendingDelim={start:t,token:r},t+r.length):(VMn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function GMn(e,n){const t=e[n];if(t==="*")return e.startsWith("***",n)?"***":e.startsWith("**",n)?"**":"*";if(t==="_")return e.startsWith("__",n)?"__":"_";if(t==="~"&&e.startsWith("~~",n))return"~~"}function VMn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!LT(s)||!LT(r)}function MT(e,n,t){const r=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:n});return}if(t==="]"&&(r==null?void 0:r.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:r.start,textEnd:n};return}if(t==="("&&(r==null?void 0:r.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:r.start,textEnd:r.textEnd,parenDepth:0};return}if(t==="("&&(r==null?void 0:r.phase)==="url"){r.parenDepth+=1;return}if(t===")"&&(r==null?void 0:r.phase)==="url"){if(r.parenDepth>0){r.parenDepth-=1;return}e.links.pop()}}function KMn(e){var n,t;e.delims.length=0,e.links.length=0,((n=e.exclusive)==null?void 0:n.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function WMn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function QMn(e,n){n.pendingHtml!==null&&(e=e.slice(0,ZMn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return mc(XMn(e,t));const r=YMn(n);if(r)return mc(th(e,r));const s=tOn(n);return s?s.kind==="delim"?mc(Z5(e,s.start,s.token.length)?vF(e,s.token):e.slice(0,s.start)):Z5(e,s.start,s.token.length)?s.kind==="fence"?mc(e):s.kind==="code"?mc(th(e,s.token)):s.token==="$$"?mc(th(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?mc(e):mc(th(e,"$")):mc(s.kind==="fence"?e:e.slice(0,s.start)):mc(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function NMn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return Z5(e,n.start,1)?t+e.slice(n.start+1):t;const r=e.slice(n.start+1,n.textEnd);return n.phase==="url_wait"?t+r+e.slice(n.textEnd+1):t+r}function zMn(e){const n=[];if(e.exclusive){if(e.exclusive.kind!=="code")return;n.push(e.exclusive.token)}for(let t=e.delims.length-1;t>=0;t--){const r=e.delims[t].token;if(!pMn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function jMn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!AMn(e,s,r))break;t=s,r=s}return t}function AMn(e,n,t){if(e[t-1]!==">"||Vo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!yF(r))return!1;for(let s=n+1;s"||i===` +`)+"$$")):/\s/.test(e[e.length-1]??"")?mc(e):mc(th(e,"$")):mc(s.kind==="fence"?e:e.slice(0,s.start)):mc(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function XMn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return Z5(e,n.start,1)?t+e.slice(n.start+1):t;const r=e.slice(n.start+1,n.textEnd);return n.phase==="url_wait"?t+r+e.slice(n.textEnd+1):t+r}function YMn(e){const n=[];if(e.exclusive){if(e.exclusive.kind!=="code")return;n.push(e.exclusive.token)}for(let t=e.delims.length-1;t>=0;t--){const r=e.delims[t].token;if(!$Mn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function ZMn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!JMn(e,s,r))break;t=s,r=s}return t}function JMn(e,n,t){if(e[t-1]!==">"||Vo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!yF(r))return!1;for(let s=n+1;s"||i===` `)return!1}return!0}function mc(e){var v;const n=e.lastIndexOf(` `),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),i=s.indexOf(` -`),a=i===-1?s:s.slice(0,i),o=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(OT(a)<2&&!MMn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:vF(a," |"),u=OT(c),d=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(d===0)return e;const _=i===-1?"":s.slice(i+1),p=DT(o,Array.from({length:d},()=>"-"));if(_.length===0)return r+c+` -`+p;const m=_.indexOf(` -`),w=m===-1?_:_.slice(0,m),k=m===-1?"":_.slice(m);if(OMn(w,o,d))return e;if(w.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(w.slice(o.length))){const y=bF(w,o).map(x=>{const b=x.trim();if(b.length===0)return"-";let C=0;for(let N=0;N1&&b.endsWith(":")?":":"")});for(;y.length"-"));if(f.length===0)return r+c+` +`+p;const m=f.indexOf(` +`),w=m===-1?f:f.slice(0,m),k=m===-1?"":f.slice(m);if(rOn(w,o,d))return e;if(w.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(w.slice(o.length))){const y=bF(w,o).map(x=>{const b=x.trim();if(b.length===0)return"-";let C=0;for(let N=0;N1&&b.endsWith(":")?":":"")});for(;y.length0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function RMn(e){const n=e.delims.at(-1);return e.exclusive&&(!n||e.exclusive.start>n.start)?e.exclusive:n?{kind:"delim",start:n.start,token:n.token}:e.exclusive}function OT(e){let n=0;for(let t=0;t0}function DT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function bF(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function OMn(e,n,t){if(!e.startsWith(n))return!1;const r=e.slice(n.length).trim();if(!r.startsWith("|")||!r.endsWith("|"))return!1;const s=bF(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function gC(e,n){let t=n+1;for(;tn+t}function Nb(e,n){return n===0||e[n-1]===` -`}function Vo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function LT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function yF(e){return!!e&&/[A-Za-z]/.test(e)}const xF=Gy().use(Hy);var $m,Th,Rh,pf,Mh,Bm,Pm,Fm,mf,Hm,gf;class DMn{constructor(){lt(this,$m,xF);lt(this,Th,null);lt(this,Rh,{});lt(this,pf,null);lt(this,Mh,"");lt(this,Bm,[]);lt(this,Pm,[]);lt(this,Fm,[]);lt(this,mf,0);lt(this,Hm,[]);lt(this,gf,[])}reconfigure(n,t,r){ue(this,Th)!==null&&ue(this,$m)===n&&wF(ue(this,Rh),r)&&!!ue(this,pf)===t||(Ve(this,$m,n),n.attachers.some(s=>s[0]===Cb)||(n=n(),n.use(Cb),n.freeze()),Ve(this,Th,n),Ve(this,Rh,r),Ve(this,Mh,""),Ve(this,Bm,[]),Ve(this,Pm,[]),Ve(this,Fm,[]),Ve(this,mf,0),Ve(this,Hm,[]),Ve(this,pf,t?new hMn:null))}update(n){ue(this,pf)&&(n=ue(this,pf).update(n));let t=ue(this,Mh);if(n===t)return ue(this,gf);const r=ue(this,Bm),s=LMn(n,t);let i=r.length-1;for(;i>=0&&!(s>=r[i]);i-=1);let a=r[i]??0;i===-1&&(i=0);const o=q_(ue(this,Th)),c=ue(this,Pm),u=c.slice(i).some(z=>z.some(J5));let d=o.parse(n.slice(a)),_=d.children.map(z=>q_(q_(z.position).start.offset)+a);Ve(this,Mh,n),s4(r.length===c.length),r.splice(i,r.length-i,..._);{const z=i4(d,_,a);s4(z.length===_.length),c.splice(i,c.length-i,...z)}if(u||J5(d)){i=0,a=0,d=o.parse(n),_=d.children.map(A=>q_(q_(A.position).start.offset)+a),r.splice(0,r.length,..._);const z=i4(d,_,a);s4(z.length===_.length),c.splice(0,c.length,...z)}const p=i4(o.runSync(d),_,a),m=ue(this,Fm),w=ue(this,Hm),k=ue(this,gf),v=w.length;let y=null,x=0;for(;xv&&(m.length=w.length=r.length);for(let z=r.length=C?M=v-(r.length-A):A=v){m[A]=String(ue(this,mf)),Ve(this,mf,ue(this,mf)+1),w[A]=null,y&&(y[A]=void 0);continue}m[A]=m[M]??String(n0(this,mf)._++),w[A]=w[M]??null,y&&(y[A]=k[M])}r.length[]);let s=0;for(const a of e.children){const o=(i=a.position)==null?void 0:i.start.offset;if(o!==void 0){for(;s+1u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` -`.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function EF(e,n,t){return e.type==="element"?rOn(e,n,t):e.type==="text"?t.whitespace==="normal"?NF(e,t):sOn(e):[]}function rOn(e,n,t){const r=zF(e,t),s=e.children||[];let i=-1,a=[];if(tOn(e))return a;let o,c;for(ek(e)||qT(e)&&BT(n,e,qT)?c=` -`:eOn(e)?(o=2,c=2):CF(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var d;i+15e.replace(lOn,"-$1").toLowerCase(),_On={"&":"&",">":">","<":"<",'"':""","'":"'"},fOn=/[&><"']/g,gi=e=>String(e).replace(fOn,n=>_On[n]),Tv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Tv(e.body[0]):e:e.type==="font"?Tv(e.body):e,dOn=new Set(["mathord","textord","atom"]),Kl=e=>dOn.has(Tv(e).type),hOn=e=>{var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},tk={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,n)=>(n.push(e),n)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function pOn(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function mOn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return pOn(n)}function gOn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:mOn(r)}class bC{constructor(n){n===void 0&&(n={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,n=n||{};for(var t of Object.keys(tk)){var r=tk[t];r&&gOn(this,t,n,r)}}reportNonstrict(n,t,r){var s=this.strict;if(typeof s=="function"&&(s=s(n,t,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new et("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+n+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]"))}}useStrictBehavior(n,t,r){var s=this.strict;if(typeof s=="function")try{s=s(n,t,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]")),!1)}isTrusted(n){if("url"in n&&n.url&&!n.protocol){var t=hOn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Au{constructor(n,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=n,this.size=t,this.cramped=r}sup(){return Cc[vOn[this.id]]}sub(){return Cc[bOn[this.id]]}fracNum(){return Cc[yOn[this.id]]}fracDen(){return Cc[xOn[this.id]]}cramp(){return Cc[wOn[this.id]]}text(){return Cc[kOn[this.id]]}isTight(){return this.size>=2}}var yC=0,zb=1,uh=2,Fl=3,dm=4,po=5,Uh=6,Mi=7,Cc=[new Au(yC,0,!1),new Au(zb,0,!0),new Au(uh,1,!1),new Au(Fl,1,!0),new Au(dm,2,!1),new Au(po,2,!0),new Au(Uh,3,!1),new Au(Mi,3,!0)],vOn=[dm,po,dm,po,Uh,Mi,Uh,Mi],bOn=[po,po,po,po,Mi,Mi,Mi,Mi],yOn=[uh,Fl,dm,po,Uh,Mi,Uh,Mi],xOn=[Fl,Fl,po,po,Mi,Mi,Mi,Mi],wOn=[zb,zb,Fl,Fl,po,po,Mi,Mi],kOn=[yC,zb,uh,Fl,uh,Fl,uh,Fl],rn={DISPLAY:Cc[yC],TEXT:Cc[uh],SCRIPT:Cc[dm],SCRIPTSCRIPT:Cc[Uh]},nk=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function SOn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var Rv=[];nk.forEach(e=>e.blocks.forEach(n=>Rv.push(...n)));function jF(e){for(var n=0;n=Rv[n]&&e<=Rv[n+1])return!0;return!1}var Is=e=>e+" "+e,Fd=80,COn=function(n,t){return"M95,"+(622+n+t)+` +`+f}function th(e,n){return e+n.slice(eOn(e,n))}function vF(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return th(e,n);const r=e.slice(0,-t.length);return th(r,n)+t}function eOn(e,n){for(let t=Math.min(e.length,n.length);t>0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function tOn(e){const n=e.delims.at(-1);return e.exclusive&&(!n||e.exclusive.start>n.start)?e.exclusive:n?{kind:"delim",start:n.start,token:n.token}:e.exclusive}function OT(e){let n=0;for(let t=0;t0}function DT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function bF(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function rOn(e,n,t){if(!e.startsWith(n))return!1;const r=e.slice(n.length).trim();if(!r.startsWith("|")||!r.endsWith("|"))return!1;const s=bF(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function gC(e,n){let t=n+1;for(;tn+t}function zb(e,n){return n===0||e[n-1]===` +`}function Vo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function LT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function yF(e){return!!e&&/[A-Za-z]/.test(e)}const xF=Vy().use(qy);var Bm,Th,Rh,pf,Mh,Pm,Fm,Hm,mf,qm,gf;class sOn{constructor(){ut(this,Bm,xF);ut(this,Th,null);ut(this,Rh,{});ut(this,pf,null);ut(this,Mh,"");ut(this,Pm,[]);ut(this,Fm,[]);ut(this,Hm,[]);ut(this,mf,0);ut(this,qm,[]);ut(this,gf,[])}reconfigure(n,t,r){ue(this,Th)!==null&&ue(this,Bm)===n&&wF(ue(this,Rh),r)&&!!ue(this,pf)===t||(Ge(this,Bm,n),n.attachers.some(s=>s[0]===Eb)||(n=n(),n.use(Eb),n.freeze()),Ge(this,Th,n),Ge(this,Rh,r),Ge(this,Mh,""),Ge(this,Pm,[]),Ge(this,Fm,[]),Ge(this,Hm,[]),Ge(this,mf,0),Ge(this,qm,[]),Ge(this,pf,t?new IMn:null))}update(n){ue(this,pf)&&(n=ue(this,pf).update(n));let t=ue(this,Mh);if(n===t)return ue(this,gf);const r=ue(this,Pm),s=iOn(n,t);let i=r.length-1;for(;i>=0&&!(s>=r[i]);i-=1);let a=r[i]??0;i===-1&&(i=0);const o=q_(ue(this,Th)),c=ue(this,Fm),u=c.slice(i).some(z=>z.some(J5));let d=o.parse(n.slice(a)),f=d.children.map(z=>q_(q_(z.position).start.offset)+a);Ge(this,Mh,n),s4(r.length===c.length),r.splice(i,r.length-i,...f);{const z=i4(d,f,a);s4(z.length===f.length),c.splice(i,c.length-i,...z)}if(u||J5(d)){i=0,a=0,d=o.parse(n),f=d.children.map(A=>q_(q_(A.position).start.offset)+a),r.splice(0,r.length,...f);const z=i4(d,f,a);s4(z.length===f.length),c.splice(0,c.length,...z)}const p=i4(o.runSync(d),f,a),m=ue(this,Hm),w=ue(this,qm),k=ue(this,gf),v=w.length;let y=null,x=0;for(;xv&&(m.length=w.length=r.length);for(let z=r.length=C?M=v-(r.length-A):A=v){m[A]=String(ue(this,mf)),Ge(this,mf,ue(this,mf)+1),w[A]=null,y&&(y[A]=void 0);continue}m[A]=m[M]??String(n0(this,mf)._++),w[A]=w[M]??null,y&&(y[A]=k[M])}r.length[]);let s=0;for(const a of e.children){const o=(i=a.position)==null?void 0:i.start.offset;if(o!==void 0){for(;s+1u&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` +`.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function EF(e,n,t){return e.type==="element"?EOn(e,n,t):e.type==="text"?t.whitespace==="normal"?NF(e,t):NOn(e):[]}function EOn(e,n,t){const r=zF(e,t),s=e.children||[];let i=-1,a=[];if(SOn(e))return a;let o,c;for(ek(e)||qT(e)&&BT(n,e,qT)?c=` +`:kOn(e)?(o=2,c=2):CF(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var d;i+15e.replace(ROn,"-$1").toLowerCase(),OOn={"&":"&",">":">","<":"<",'"':""","'":"'"},DOn=/[&><"']/g,gi=e=>String(e).replace(DOn,n=>OOn[n]),Rv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Rv(e.body[0]):e:e.type==="font"?Rv(e.body):e,LOn=new Set(["mathord","textord","atom"]),Kl=e=>LOn.has(Rv(e).type),IOn=e=>{var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},tk={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,n)=>(n.push(e),n)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function $On(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function BOn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return $On(n)}function POn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:BOn(r)}class bC{constructor(n){n===void 0&&(n={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,n=n||{};for(var t of Object.keys(tk)){var r=tk[t];r&&POn(this,t,n,r)}}reportNonstrict(n,t,r){var s=this.strict;if(typeof s=="function"&&(s=s(n,t,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new et("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+n+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]"))}}useStrictBehavior(n,t,r){var s=this.strict;if(typeof s=="function")try{s=s(n,t,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]")),!1)}isTrusted(n){if("url"in n&&n.url&&!n.protocol){var t=IOn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Au{constructor(n,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=n,this.size=t,this.cramped=r}sup(){return Cc[FOn[this.id]]}sub(){return Cc[HOn[this.id]]}fracNum(){return Cc[qOn[this.id]]}fracDen(){return Cc[UOn[this.id]]}cramp(){return Cc[GOn[this.id]]}text(){return Cc[VOn[this.id]]}isTight(){return this.size>=2}}var yC=0,jb=1,uh=2,Fl=3,hm=4,po=5,Uh=6,Mi=7,Cc=[new Au(yC,0,!1),new Au(jb,0,!0),new Au(uh,1,!1),new Au(Fl,1,!0),new Au(hm,2,!1),new Au(po,2,!0),new Au(Uh,3,!1),new Au(Mi,3,!0)],FOn=[hm,po,hm,po,Uh,Mi,Uh,Mi],HOn=[po,po,po,po,Mi,Mi,Mi,Mi],qOn=[uh,Fl,hm,po,Uh,Mi,Uh,Mi],UOn=[Fl,Fl,po,po,Mi,Mi,Mi,Mi],GOn=[jb,jb,Fl,Fl,po,po,Mi,Mi],VOn=[yC,jb,uh,Fl,uh,Fl,uh,Fl],on={DISPLAY:Cc[yC],TEXT:Cc[uh],SCRIPT:Cc[hm],SCRIPTSCRIPT:Cc[Uh]},nk=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function KOn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var Mv=[];nk.forEach(e=>e.blocks.forEach(n=>Mv.push(...n)));function jF(e){for(var n=0;n=Mv[n]&&e<=Mv[n+1])return!0;return!1}var Is=e=>e+" "+e,Fd=80,WOn=function(n,t){return"M95,"+(622+n+t)+` c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 @@ -794,7 +794,7 @@ c5.3,-9.3,12,-14,20,-14 H400000v`+(40+n)+`H845.2724 s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},EOn=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 +M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},QOn=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 c340,-704.7,510.7,-1060.3,512,-1067 l`+n/2.084+" -"+n+` @@ -804,7 +804,7 @@ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5, c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},NOn=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},XOn=function(n,t){return"M983 "+(10+n+t)+` l`+n/3.13+" -"+n+` c4,-6.7,10,-10,18,-10 H400000v`+(40+n)+` H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 @@ -813,7 +813,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},zOn=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},YOn=function(n,t){return"M424,"+(2398+n+t)+` c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 @@ -823,18 +823,18 @@ v`+(40+n)+`H1014.6 s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2z M`+(1001+n)+" "+t+` -h400000v`+(40+n)+"h-400000z"},jOn=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},ZOn=function(n,t){return"M473,"+(2713+n+t)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+n/5.298+" -"+n+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+n)+`H1017.7 s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},AOn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},TOn=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` +606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},JOn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},eDn=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},ROn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=COn(t,Fd);break;case"sqrtSize1":s=EOn(t,Fd);break;case"sqrtSize2":s=NOn(t,Fd);break;case"sqrtSize3":s=zOn(t,Fd);break;case"sqrtSize4":s=jOn(t,Fd);break;case"sqrtTall":s=TOn(t,Fd,r)}return s},MOn=function(n,t){switch(n){case"⎜":return Is("M291 0 H417 V"+t+" H291z");case"∣":return Is("M145 0 H188 V"+t+" H145z");case"∥":return Is("M145 0 H188 V"+t+" H145z")+Is("M367 0 H410 V"+t+" H367z");case"⎟":return Is("M457 0 H583 V"+t+" H457z");case"⎢":return Is("M319 0 H403 V"+t+" H319z");case"⎥":return Is("M263 0 H347 V"+t+" H263z");case"⎪":return Is("M384 0 H504 V"+t+" H384z");case"⏐":return Is("M312 0 H355 V"+t+" H312z");case"‖":return Is("M257 0 H300 V"+t+" H257z")+Is("M478 0 H521 V"+t+" H478z");default:return""}},UT={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},tDn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=WOn(t,Fd);break;case"sqrtSize1":s=QOn(t,Fd);break;case"sqrtSize2":s=XOn(t,Fd);break;case"sqrtSize3":s=YOn(t,Fd);break;case"sqrtSize4":s=ZOn(t,Fd);break;case"sqrtTall":s=eDn(t,Fd,r)}return s},nDn=function(n,t){switch(n){case"⎜":return Is("M291 0 H417 V"+t+" H291z");case"∣":return Is("M145 0 H188 V"+t+" H145z");case"∥":return Is("M145 0 H188 V"+t+" H145z")+Is("M367 0 H410 V"+t+" H367z");case"⎟":return Is("M457 0 H583 V"+t+" H457z");case"⎢":return Is("M319 0 H403 V"+t+" H319z");case"⎥":return Is("M263 0 H347 V"+t+" H263z");case"⎪":return Is("M384 0 H504 V"+t+" H384z");case"⏐":return Is("M312 0 H355 V"+t+" H312z");case"‖":return Is("M257 0 H300 V"+t+" H257z")+Is("M478 0 H521 V"+t+" H478z");default:return""}},UT={doubleleftarrow:`M262 157 l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 @@ -1005,7 +1005,7 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},OOn=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},rDn=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 @@ -1033,43 +1033,43 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6 c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function DOn(e){return"toText"in e}class _p{constructor(n){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=n,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(n){return this.classes.includes(n)}toNode(){for(var n=document.createDocumentFragment(),t=0;t{if(DOn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var rk={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},LOn={ex:!0,em:!0,mu:!0},AF=function(n){return typeof n!="string"&&(n=n.unit),n in rk||n in LOn||n==="ex"},Hr=function(n,t){var r;if(n.unit in rk)r=rk[n.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(n.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,n.unit==="ex")r=s.fontMetrics().xHeight;else if(n.unit==="em")r=s.fontMetrics().quad;else throw new et("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},st=function(n){return+n.toFixed(4)+"em"},a_=function(n){return n.filter(t=>t).join(" ")},xC=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=uOn(r)+":"+s+";")}return t},TF=function(n,t,r){if(this.classes=n||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},RF=function(n){var t=document.createElement(n);t.className=a_(this.classes),Object.assign(t.style,this.style);for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s/=\x00-\x1f]/,MF=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+gi(a_(this.classes))+'"');var r=xC(this.style);r&&(t+=' style="'+gi(r)+'"');for(var s of Object.keys(this.attributes)){if(IOn.test(s))throw new et("Invalid attribute name '"+s+"'");t+=" "+s+'="'+gi(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class fp{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,TF.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return RF.call(this,"span")}toMarkup(){return MF.call(this,"span")}}class Vy{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,TF.call(this,t,s),this.children=r||[],this.setAttribute("href",n)}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return RF.call(this,"a")}toMarkup(){return MF.call(this,"a")}}class $On{constructor(n,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=n,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(n){return this.classes.includes(n)}toNode(){var n=document.createElement("img");return n.src=this.src,n.alt=this.alt,n.className="mord",Object.assign(n.style,this.style),n}toMarkup(){var n=''+gi(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=st(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=a_(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+st(this.italic)+";"),r+=xC(this.style),r&&(n=!0,t+=' style="'+gi(r)+'"');var s=gi(this.text);return n?(t+=">",t+=s,t+="",t):s}}class Ul{constructor(n,t){this.children=void 0,this.attributes=void 0,this.children=n||[],this.attributes=t||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s':''}}class sk{constructor(n){this.attributes=void 0,this.attributes=n||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var n=" but got "+String(e)+".")}var HOn=e=>e instanceof fp||e instanceof Vy||e instanceof _p,Nc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},U1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},GT={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function qOn(e,n){Nc[e]=n}function wC(e,n,t){if(!Nc[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Nc[n][r];if(!s&&e[0]in GT&&(r=GT[e[0]].charCodeAt(0),s=Nc[n][r]),!s&&t==="text"&&jF(r)&&(s=Nc[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var o4={};function UOn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!o4[n]){var t=o4[n]={cssEmPerMu:U1.quad[n]/18};for(var r in U1)U1.hasOwnProperty(r)&&(t[r]=U1[r][n])}return o4[n]}var Rr={math:{},text:{}};function P(e,n,t,r,s,i){Rr[e][s]={font:n,group:t,replace:r},i&&r&&(Rr[e][r]=Rr[e][s])}var W="math",Ke="text",te="main",fe="ams",Or="accent-token",mt="bin",Li="close",dp="inner",Xt="mathord",Ss="op-token",Fa="open",_g="punct",de="rel",Wl="spacing",ye="textord";P(W,te,de,"≡","\\equiv",!0);P(W,te,de,"≺","\\prec",!0);P(W,te,de,"≻","\\succ",!0);P(W,te,de,"∼","\\sim",!0);P(W,te,de,"⊥","\\perp");P(W,te,de,"⪯","\\preceq",!0);P(W,te,de,"⪰","\\succeq",!0);P(W,te,de,"≃","\\simeq",!0);P(W,te,de,"∣","\\mid",!0);P(W,te,de,"≪","\\ll",!0);P(W,te,de,"≫","\\gg",!0);P(W,te,de,"≍","\\asymp",!0);P(W,te,de,"∥","\\parallel");P(W,te,de,"⋈","\\bowtie",!0);P(W,te,de,"⌣","\\smile",!0);P(W,te,de,"⊑","\\sqsubseteq",!0);P(W,te,de,"⊒","\\sqsupseteq",!0);P(W,te,de,"≐","\\doteq",!0);P(W,te,de,"⌢","\\frown",!0);P(W,te,de,"∋","\\ni",!0);P(W,te,de,"∝","\\propto",!0);P(W,te,de,"⊢","\\vdash",!0);P(W,te,de,"⊣","\\dashv",!0);P(W,te,de,"∋","\\owns");P(W,te,_g,".","\\ldotp");P(W,te,_g,"⋅","\\cdotp");P(W,te,_g,"⋅","·");P(Ke,te,ye,"⋅","·");P(W,te,ye,"#","\\#");P(Ke,te,ye,"#","\\#");P(W,te,ye,"&","\\&");P(Ke,te,ye,"&","\\&");P(W,te,ye,"ℵ","\\aleph",!0);P(W,te,ye,"∀","\\forall",!0);P(W,te,ye,"ℏ","\\hbar",!0);P(W,te,ye,"∃","\\exists",!0);P(W,te,ye,"∇","\\nabla",!0);P(W,te,ye,"♭","\\flat",!0);P(W,te,ye,"ℓ","\\ell",!0);P(W,te,ye,"♮","\\natural",!0);P(W,te,ye,"♣","\\clubsuit",!0);P(W,te,ye,"℘","\\wp",!0);P(W,te,ye,"♯","\\sharp",!0);P(W,te,ye,"♢","\\diamondsuit",!0);P(W,te,ye,"ℜ","\\Re",!0);P(W,te,ye,"♡","\\heartsuit",!0);P(W,te,ye,"ℑ","\\Im",!0);P(W,te,ye,"♠","\\spadesuit",!0);P(W,te,ye,"§","\\S",!0);P(Ke,te,ye,"§","\\S");P(W,te,ye,"¶","\\P",!0);P(Ke,te,ye,"¶","\\P");P(W,te,ye,"†","\\dag");P(Ke,te,ye,"†","\\dag");P(Ke,te,ye,"†","\\textdagger");P(W,te,ye,"‡","\\ddag");P(Ke,te,ye,"‡","\\ddag");P(Ke,te,ye,"‡","\\textdaggerdbl");P(W,te,Li,"⎱","\\rmoustache",!0);P(W,te,Fa,"⎰","\\lmoustache",!0);P(W,te,Li,"⟯","\\rgroup",!0);P(W,te,Fa,"⟮","\\lgroup",!0);P(W,te,mt,"∓","\\mp",!0);P(W,te,mt,"⊖","\\ominus",!0);P(W,te,mt,"⊎","\\uplus",!0);P(W,te,mt,"⊓","\\sqcap",!0);P(W,te,mt,"∗","\\ast");P(W,te,mt,"⊔","\\sqcup",!0);P(W,te,mt,"◯","\\bigcirc",!0);P(W,te,mt,"∙","\\bullet",!0);P(W,te,mt,"‡","\\ddagger");P(W,te,mt,"≀","\\wr",!0);P(W,te,mt,"⨿","\\amalg");P(W,te,mt,"&","\\And");P(W,te,de,"⟵","\\longleftarrow",!0);P(W,te,de,"⇐","\\Leftarrow",!0);P(W,te,de,"⟸","\\Longleftarrow",!0);P(W,te,de,"⟶","\\longrightarrow",!0);P(W,te,de,"⇒","\\Rightarrow",!0);P(W,te,de,"⟹","\\Longrightarrow",!0);P(W,te,de,"↔","\\leftrightarrow",!0);P(W,te,de,"⟷","\\longleftrightarrow",!0);P(W,te,de,"⇔","\\Leftrightarrow",!0);P(W,te,de,"⟺","\\Longleftrightarrow",!0);P(W,te,de,"↦","\\mapsto",!0);P(W,te,de,"⟼","\\longmapsto",!0);P(W,te,de,"↗","\\nearrow",!0);P(W,te,de,"↩","\\hookleftarrow",!0);P(W,te,de,"↪","\\hookrightarrow",!0);P(W,te,de,"↘","\\searrow",!0);P(W,te,de,"↼","\\leftharpoonup",!0);P(W,te,de,"⇀","\\rightharpoonup",!0);P(W,te,de,"↙","\\swarrow",!0);P(W,te,de,"↽","\\leftharpoondown",!0);P(W,te,de,"⇁","\\rightharpoondown",!0);P(W,te,de,"↖","\\nwarrow",!0);P(W,te,de,"⇌","\\rightleftharpoons",!0);P(W,fe,de,"≮","\\nless",!0);P(W,fe,de,"","\\@nleqslant");P(W,fe,de,"","\\@nleqq");P(W,fe,de,"⪇","\\lneq",!0);P(W,fe,de,"≨","\\lneqq",!0);P(W,fe,de,"","\\@lvertneqq");P(W,fe,de,"⋦","\\lnsim",!0);P(W,fe,de,"⪉","\\lnapprox",!0);P(W,fe,de,"⊀","\\nprec",!0);P(W,fe,de,"⋠","\\npreceq",!0);P(W,fe,de,"⋨","\\precnsim",!0);P(W,fe,de,"⪹","\\precnapprox",!0);P(W,fe,de,"≁","\\nsim",!0);P(W,fe,de,"","\\@nshortmid");P(W,fe,de,"∤","\\nmid",!0);P(W,fe,de,"⊬","\\nvdash",!0);P(W,fe,de,"⊭","\\nvDash",!0);P(W,fe,de,"⋪","\\ntriangleleft");P(W,fe,de,"⋬","\\ntrianglelefteq",!0);P(W,fe,de,"⊊","\\subsetneq",!0);P(W,fe,de,"","\\@varsubsetneq");P(W,fe,de,"⫋","\\subsetneqq",!0);P(W,fe,de,"","\\@varsubsetneqq");P(W,fe,de,"≯","\\ngtr",!0);P(W,fe,de,"","\\@ngeqslant");P(W,fe,de,"","\\@ngeqq");P(W,fe,de,"⪈","\\gneq",!0);P(W,fe,de,"≩","\\gneqq",!0);P(W,fe,de,"","\\@gvertneqq");P(W,fe,de,"⋧","\\gnsim",!0);P(W,fe,de,"⪊","\\gnapprox",!0);P(W,fe,de,"⊁","\\nsucc",!0);P(W,fe,de,"⋡","\\nsucceq",!0);P(W,fe,de,"⋩","\\succnsim",!0);P(W,fe,de,"⪺","\\succnapprox",!0);P(W,fe,de,"≆","\\ncong",!0);P(W,fe,de,"","\\@nshortparallel");P(W,fe,de,"∦","\\nparallel",!0);P(W,fe,de,"⊯","\\nVDash",!0);P(W,fe,de,"⋫","\\ntriangleright");P(W,fe,de,"⋭","\\ntrianglerighteq",!0);P(W,fe,de,"","\\@nsupseteqq");P(W,fe,de,"⊋","\\supsetneq",!0);P(W,fe,de,"","\\@varsupsetneq");P(W,fe,de,"⫌","\\supsetneqq",!0);P(W,fe,de,"","\\@varsupsetneqq");P(W,fe,de,"⊮","\\nVdash",!0);P(W,fe,de,"⪵","\\precneqq",!0);P(W,fe,de,"⪶","\\succneqq",!0);P(W,fe,de,"","\\@nsubseteqq");P(W,fe,mt,"⊴","\\unlhd");P(W,fe,mt,"⊵","\\unrhd");P(W,fe,de,"↚","\\nleftarrow",!0);P(W,fe,de,"↛","\\nrightarrow",!0);P(W,fe,de,"⇍","\\nLeftarrow",!0);P(W,fe,de,"⇏","\\nRightarrow",!0);P(W,fe,de,"↮","\\nleftrightarrow",!0);P(W,fe,de,"⇎","\\nLeftrightarrow",!0);P(W,fe,de,"△","\\vartriangle");P(W,fe,ye,"ℏ","\\hslash");P(W,fe,ye,"▽","\\triangledown");P(W,fe,ye,"◊","\\lozenge");P(W,fe,ye,"Ⓢ","\\circledS");P(W,fe,ye,"®","\\circledR");P(Ke,fe,ye,"®","\\circledR");P(W,fe,ye,"∡","\\measuredangle",!0);P(W,fe,ye,"∄","\\nexists");P(W,fe,ye,"℧","\\mho");P(W,fe,ye,"Ⅎ","\\Finv",!0);P(W,fe,ye,"⅁","\\Game",!0);P(W,fe,ye,"‵","\\backprime");P(W,fe,ye,"▲","\\blacktriangle");P(W,fe,ye,"▼","\\blacktriangledown");P(W,fe,ye,"■","\\blacksquare");P(W,fe,ye,"⧫","\\blacklozenge");P(W,fe,ye,"★","\\bigstar");P(W,fe,ye,"∢","\\sphericalangle",!0);P(W,fe,ye,"∁","\\complement",!0);P(W,fe,ye,"ð","\\eth",!0);P(Ke,te,ye,"ð","ð");P(W,fe,ye,"╱","\\diagup");P(W,fe,ye,"╲","\\diagdown");P(W,fe,ye,"□","\\square");P(W,fe,ye,"□","\\Box");P(W,fe,ye,"◊","\\Diamond");P(W,fe,ye,"¥","\\yen",!0);P(Ke,fe,ye,"¥","\\yen",!0);P(W,fe,ye,"✓","\\checkmark",!0);P(Ke,fe,ye,"✓","\\checkmark");P(W,fe,ye,"ℶ","\\beth",!0);P(W,fe,ye,"ℸ","\\daleth",!0);P(W,fe,ye,"ℷ","\\gimel",!0);P(W,fe,ye,"ϝ","\\digamma",!0);P(W,fe,ye,"ϰ","\\varkappa");P(W,fe,Fa,"┌","\\@ulcorner",!0);P(W,fe,Li,"┐","\\@urcorner",!0);P(W,fe,Fa,"└","\\@llcorner",!0);P(W,fe,Li,"┘","\\@lrcorner",!0);P(W,fe,de,"≦","\\leqq",!0);P(W,fe,de,"⩽","\\leqslant",!0);P(W,fe,de,"⪕","\\eqslantless",!0);P(W,fe,de,"≲","\\lesssim",!0);P(W,fe,de,"⪅","\\lessapprox",!0);P(W,fe,de,"≊","\\approxeq",!0);P(W,fe,mt,"⋖","\\lessdot");P(W,fe,de,"⋘","\\lll",!0);P(W,fe,de,"≶","\\lessgtr",!0);P(W,fe,de,"⋚","\\lesseqgtr",!0);P(W,fe,de,"⪋","\\lesseqqgtr",!0);P(W,fe,de,"≑","\\doteqdot");P(W,fe,de,"≓","\\risingdotseq",!0);P(W,fe,de,"≒","\\fallingdotseq",!0);P(W,fe,de,"∽","\\backsim",!0);P(W,fe,de,"⋍","\\backsimeq",!0);P(W,fe,de,"⫅","\\subseteqq",!0);P(W,fe,de,"⋐","\\Subset",!0);P(W,fe,de,"⊏","\\sqsubset",!0);P(W,fe,de,"≼","\\preccurlyeq",!0);P(W,fe,de,"⋞","\\curlyeqprec",!0);P(W,fe,de,"≾","\\precsim",!0);P(W,fe,de,"⪷","\\precapprox",!0);P(W,fe,de,"⊲","\\vartriangleleft");P(W,fe,de,"⊴","\\trianglelefteq");P(W,fe,de,"⊨","\\vDash",!0);P(W,fe,de,"⊪","\\Vvdash",!0);P(W,fe,de,"⌣","\\smallsmile");P(W,fe,de,"⌢","\\smallfrown");P(W,fe,de,"≏","\\bumpeq",!0);P(W,fe,de,"≎","\\Bumpeq",!0);P(W,fe,de,"≧","\\geqq",!0);P(W,fe,de,"⩾","\\geqslant",!0);P(W,fe,de,"⪖","\\eqslantgtr",!0);P(W,fe,de,"≳","\\gtrsim",!0);P(W,fe,de,"⪆","\\gtrapprox",!0);P(W,fe,mt,"⋗","\\gtrdot");P(W,fe,de,"⋙","\\ggg",!0);P(W,fe,de,"≷","\\gtrless",!0);P(W,fe,de,"⋛","\\gtreqless",!0);P(W,fe,de,"⪌","\\gtreqqless",!0);P(W,fe,de,"≖","\\eqcirc",!0);P(W,fe,de,"≗","\\circeq",!0);P(W,fe,de,"≜","\\triangleq",!0);P(W,fe,de,"∼","\\thicksim");P(W,fe,de,"≈","\\thickapprox");P(W,fe,de,"⫆","\\supseteqq",!0);P(W,fe,de,"⋑","\\Supset",!0);P(W,fe,de,"⊐","\\sqsupset",!0);P(W,fe,de,"≽","\\succcurlyeq",!0);P(W,fe,de,"⋟","\\curlyeqsucc",!0);P(W,fe,de,"≿","\\succsim",!0);P(W,fe,de,"⪸","\\succapprox",!0);P(W,fe,de,"⊳","\\vartriangleright");P(W,fe,de,"⊵","\\trianglerighteq");P(W,fe,de,"⊩","\\Vdash",!0);P(W,fe,de,"∣","\\shortmid");P(W,fe,de,"∥","\\shortparallel");P(W,fe,de,"≬","\\between",!0);P(W,fe,de,"⋔","\\pitchfork",!0);P(W,fe,de,"∝","\\varpropto");P(W,fe,de,"◀","\\blacktriangleleft");P(W,fe,de,"∴","\\therefore",!0);P(W,fe,de,"∍","\\backepsilon");P(W,fe,de,"▶","\\blacktriangleright");P(W,fe,de,"∵","\\because",!0);P(W,fe,de,"⋘","\\llless");P(W,fe,de,"⋙","\\gggtr");P(W,fe,mt,"⊲","\\lhd");P(W,fe,mt,"⊳","\\rhd");P(W,fe,de,"≂","\\eqsim",!0);P(W,te,de,"⋈","\\Join");P(W,fe,de,"≑","\\Doteq",!0);P(W,fe,mt,"∔","\\dotplus",!0);P(W,fe,mt,"∖","\\smallsetminus");P(W,fe,mt,"⋒","\\Cap",!0);P(W,fe,mt,"⋓","\\Cup",!0);P(W,fe,mt,"⩞","\\doublebarwedge",!0);P(W,fe,mt,"⊟","\\boxminus",!0);P(W,fe,mt,"⊞","\\boxplus",!0);P(W,fe,mt,"⋇","\\divideontimes",!0);P(W,fe,mt,"⋉","\\ltimes",!0);P(W,fe,mt,"⋊","\\rtimes",!0);P(W,fe,mt,"⋋","\\leftthreetimes",!0);P(W,fe,mt,"⋌","\\rightthreetimes",!0);P(W,fe,mt,"⋏","\\curlywedge",!0);P(W,fe,mt,"⋎","\\curlyvee",!0);P(W,fe,mt,"⊝","\\circleddash",!0);P(W,fe,mt,"⊛","\\circledast",!0);P(W,fe,mt,"⋅","\\centerdot");P(W,fe,mt,"⊺","\\intercal",!0);P(W,fe,mt,"⋒","\\doublecap");P(W,fe,mt,"⋓","\\doublecup");P(W,fe,mt,"⊠","\\boxtimes",!0);P(W,fe,de,"⇢","\\dashrightarrow",!0);P(W,fe,de,"⇠","\\dashleftarrow",!0);P(W,fe,de,"⇇","\\leftleftarrows",!0);P(W,fe,de,"⇆","\\leftrightarrows",!0);P(W,fe,de,"⇚","\\Lleftarrow",!0);P(W,fe,de,"↞","\\twoheadleftarrow",!0);P(W,fe,de,"↢","\\leftarrowtail",!0);P(W,fe,de,"↫","\\looparrowleft",!0);P(W,fe,de,"⇋","\\leftrightharpoons",!0);P(W,fe,de,"↶","\\curvearrowleft",!0);P(W,fe,de,"↺","\\circlearrowleft",!0);P(W,fe,de,"↰","\\Lsh",!0);P(W,fe,de,"⇈","\\upuparrows",!0);P(W,fe,de,"↿","\\upharpoonleft",!0);P(W,fe,de,"⇃","\\downharpoonleft",!0);P(W,te,de,"⊶","\\origof",!0);P(W,te,de,"⊷","\\imageof",!0);P(W,fe,de,"⊸","\\multimap",!0);P(W,fe,de,"↭","\\leftrightsquigarrow",!0);P(W,fe,de,"⇉","\\rightrightarrows",!0);P(W,fe,de,"⇄","\\rightleftarrows",!0);P(W,fe,de,"↠","\\twoheadrightarrow",!0);P(W,fe,de,"↣","\\rightarrowtail",!0);P(W,fe,de,"↬","\\looparrowright",!0);P(W,fe,de,"↷","\\curvearrowright",!0);P(W,fe,de,"↻","\\circlearrowright",!0);P(W,fe,de,"↱","\\Rsh",!0);P(W,fe,de,"⇊","\\downdownarrows",!0);P(W,fe,de,"↾","\\upharpoonright",!0);P(W,fe,de,"⇂","\\downharpoonright",!0);P(W,fe,de,"⇝","\\rightsquigarrow",!0);P(W,fe,de,"⇝","\\leadsto");P(W,fe,de,"⇛","\\Rrightarrow",!0);P(W,fe,de,"↾","\\restriction");P(W,te,ye,"‘","`");P(W,te,ye,"$","\\$");P(Ke,te,ye,"$","\\$");P(Ke,te,ye,"$","\\textdollar");P(W,te,ye,"%","\\%");P(Ke,te,ye,"%","\\%");P(W,te,ye,"_","\\_");P(Ke,te,ye,"_","\\_");P(Ke,te,ye,"_","\\textunderscore");P(W,te,ye,"∠","\\angle",!0);P(W,te,ye,"∞","\\infty",!0);P(W,te,ye,"′","\\prime");P(W,te,ye,"△","\\triangle");P(W,te,ye,"Γ","\\Gamma",!0);P(W,te,ye,"Δ","\\Delta",!0);P(W,te,ye,"Θ","\\Theta",!0);P(W,te,ye,"Λ","\\Lambda",!0);P(W,te,ye,"Ξ","\\Xi",!0);P(W,te,ye,"Π","\\Pi",!0);P(W,te,ye,"Σ","\\Sigma",!0);P(W,te,ye,"Υ","\\Upsilon",!0);P(W,te,ye,"Φ","\\Phi",!0);P(W,te,ye,"Ψ","\\Psi",!0);P(W,te,ye,"Ω","\\Omega",!0);P(W,te,ye,"A","Α");P(W,te,ye,"B","Β");P(W,te,ye,"E","Ε");P(W,te,ye,"Z","Ζ");P(W,te,ye,"H","Η");P(W,te,ye,"I","Ι");P(W,te,ye,"K","Κ");P(W,te,ye,"M","Μ");P(W,te,ye,"N","Ν");P(W,te,ye,"O","Ο");P(W,te,ye,"P","Ρ");P(W,te,ye,"T","Τ");P(W,te,ye,"X","Χ");P(W,te,ye,"¬","\\neg",!0);P(W,te,ye,"¬","\\lnot");P(W,te,ye,"⊤","\\top");P(W,te,ye,"⊥","\\bot");P(W,te,ye,"∅","\\emptyset");P(W,fe,ye,"∅","\\varnothing");P(W,te,Xt,"α","\\alpha",!0);P(W,te,Xt,"β","\\beta",!0);P(W,te,Xt,"γ","\\gamma",!0);P(W,te,Xt,"δ","\\delta",!0);P(W,te,Xt,"ϵ","\\epsilon",!0);P(W,te,Xt,"ζ","\\zeta",!0);P(W,te,Xt,"η","\\eta",!0);P(W,te,Xt,"θ","\\theta",!0);P(W,te,Xt,"ι","\\iota",!0);P(W,te,Xt,"κ","\\kappa",!0);P(W,te,Xt,"λ","\\lambda",!0);P(W,te,Xt,"μ","\\mu",!0);P(W,te,Xt,"ν","\\nu",!0);P(W,te,Xt,"ξ","\\xi",!0);P(W,te,Xt,"ο","\\omicron",!0);P(W,te,Xt,"π","\\pi",!0);P(W,te,Xt,"ρ","\\rho",!0);P(W,te,Xt,"σ","\\sigma",!0);P(W,te,Xt,"τ","\\tau",!0);P(W,te,Xt,"υ","\\upsilon",!0);P(W,te,Xt,"ϕ","\\phi",!0);P(W,te,Xt,"χ","\\chi",!0);P(W,te,Xt,"ψ","\\psi",!0);P(W,te,Xt,"ω","\\omega",!0);P(W,te,Xt,"ε","\\varepsilon",!0);P(W,te,Xt,"ϑ","\\vartheta",!0);P(W,te,Xt,"ϖ","\\varpi",!0);P(W,te,Xt,"ϱ","\\varrho",!0);P(W,te,Xt,"ς","\\varsigma",!0);P(W,te,Xt,"φ","\\varphi",!0);P(W,te,mt,"∗","*",!0);P(W,te,mt,"+","+");P(W,te,mt,"−","-",!0);P(W,te,mt,"⋅","\\cdot",!0);P(W,te,mt,"∘","\\circ",!0);P(W,te,mt,"÷","\\div",!0);P(W,te,mt,"±","\\pm",!0);P(W,te,mt,"×","\\times",!0);P(W,te,mt,"∩","\\cap",!0);P(W,te,mt,"∪","\\cup",!0);P(W,te,mt,"∖","\\setminus",!0);P(W,te,mt,"∧","\\land");P(W,te,mt,"∨","\\lor");P(W,te,mt,"∧","\\wedge",!0);P(W,te,mt,"∨","\\vee",!0);P(W,te,ye,"√","\\surd");P(W,te,Fa,"⟨","\\langle",!0);P(W,te,Fa,"∣","\\lvert");P(W,te,Fa,"∥","\\lVert");P(W,te,Li,"?","?");P(W,te,Li,"!","!");P(W,te,Li,"⟩","\\rangle",!0);P(W,te,Li,"∣","\\rvert");P(W,te,Li,"∥","\\rVert");P(W,te,de,"=","=");P(W,te,de,":",":");P(W,te,de,"≈","\\approx",!0);P(W,te,de,"≅","\\cong",!0);P(W,te,de,"≥","\\ge");P(W,te,de,"≥","\\geq",!0);P(W,te,de,"←","\\gets");P(W,te,de,">","\\gt",!0);P(W,te,de,"∈","\\in",!0);P(W,te,de,"","\\@not");P(W,te,de,"⊂","\\subset",!0);P(W,te,de,"⊃","\\supset",!0);P(W,te,de,"⊆","\\subseteq",!0);P(W,te,de,"⊇","\\supseteq",!0);P(W,fe,de,"⊈","\\nsubseteq",!0);P(W,fe,de,"⊉","\\nsupseteq",!0);P(W,te,de,"⊨","\\models");P(W,te,de,"←","\\leftarrow",!0);P(W,te,de,"≤","\\le");P(W,te,de,"≤","\\leq",!0);P(W,te,de,"<","\\lt",!0);P(W,te,de,"→","\\rightarrow",!0);P(W,te,de,"→","\\to");P(W,fe,de,"≱","\\ngeq",!0);P(W,fe,de,"≰","\\nleq",!0);P(W,te,Wl," ","\\ ");P(W,te,Wl," ","\\space");P(W,te,Wl," ","\\nobreakspace");P(Ke,te,Wl," ","\\ ");P(Ke,te,Wl," "," ");P(Ke,te,Wl," ","\\space");P(Ke,te,Wl," ","\\nobreakspace");P(W,te,Wl,"","\\nobreak");P(W,te,Wl,"","\\allowbreak");P(W,te,_g,",",",");P(W,te,_g,";",";");P(W,fe,mt,"⊼","\\barwedge",!0);P(W,fe,mt,"⊻","\\veebar",!0);P(W,te,mt,"⊙","\\odot",!0);P(W,te,mt,"⊕","\\oplus",!0);P(W,te,mt,"⊗","\\otimes",!0);P(W,te,ye,"∂","\\partial",!0);P(W,te,mt,"⊘","\\oslash",!0);P(W,fe,mt,"⊚","\\circledcirc",!0);P(W,fe,mt,"⊡","\\boxdot",!0);P(W,te,mt,"△","\\bigtriangleup");P(W,te,mt,"▽","\\bigtriangledown");P(W,te,mt,"†","\\dagger");P(W,te,mt,"⋄","\\diamond");P(W,te,mt,"⋆","\\star");P(W,te,mt,"◃","\\triangleleft");P(W,te,mt,"▹","\\triangleright");P(W,te,Fa,"{","\\{");P(Ke,te,ye,"{","\\{");P(Ke,te,ye,"{","\\textbraceleft");P(W,te,Li,"}","\\}");P(Ke,te,ye,"}","\\}");P(Ke,te,ye,"}","\\textbraceright");P(W,te,Fa,"{","\\lbrace");P(W,te,Li,"}","\\rbrace");P(W,te,Fa,"[","\\lbrack",!0);P(Ke,te,ye,"[","\\lbrack",!0);P(W,te,Li,"]","\\rbrack",!0);P(Ke,te,ye,"]","\\rbrack",!0);P(W,te,Fa,"(","\\lparen",!0);P(W,te,Li,")","\\rparen",!0);P(Ke,te,ye,"<","\\textless",!0);P(Ke,te,ye,">","\\textgreater",!0);P(W,te,Fa,"⌊","\\lfloor",!0);P(W,te,Li,"⌋","\\rfloor",!0);P(W,te,Fa,"⌈","\\lceil",!0);P(W,te,Li,"⌉","\\rceil",!0);P(W,te,ye,"\\","\\backslash");P(W,te,ye,"∣","|");P(W,te,ye,"∣","\\vert");P(Ke,te,ye,"|","\\textbar",!0);P(W,te,ye,"∥","\\|");P(W,te,ye,"∥","\\Vert");P(Ke,te,ye,"∥","\\textbardbl");P(Ke,te,ye,"~","\\textasciitilde");P(Ke,te,ye,"\\","\\textbackslash");P(Ke,te,ye,"^","\\textasciicircum");P(W,te,de,"↑","\\uparrow",!0);P(W,te,de,"⇑","\\Uparrow",!0);P(W,te,de,"↓","\\downarrow",!0);P(W,te,de,"⇓","\\Downarrow",!0);P(W,te,de,"↕","\\updownarrow",!0);P(W,te,de,"⇕","\\Updownarrow",!0);P(W,te,Ss,"∐","\\coprod");P(W,te,Ss,"⋁","\\bigvee");P(W,te,Ss,"⋀","\\bigwedge");P(W,te,Ss,"⨄","\\biguplus");P(W,te,Ss,"⋂","\\bigcap");P(W,te,Ss,"⋃","\\bigcup");P(W,te,Ss,"∫","\\int");P(W,te,Ss,"∫","\\intop");P(W,te,Ss,"∬","\\iint");P(W,te,Ss,"∭","\\iiint");P(W,te,Ss,"∏","\\prod");P(W,te,Ss,"∑","\\sum");P(W,te,Ss,"⨂","\\bigotimes");P(W,te,Ss,"⨁","\\bigoplus");P(W,te,Ss,"⨀","\\bigodot");P(W,te,Ss,"∮","\\oint");P(W,te,Ss,"∯","\\oiint");P(W,te,Ss,"∰","\\oiiint");P(W,te,Ss,"⨆","\\bigsqcup");P(W,te,Ss,"∫","\\smallint");P(Ke,te,dp,"…","\\textellipsis");P(W,te,dp,"…","\\mathellipsis");P(Ke,te,dp,"…","\\ldots",!0);P(W,te,dp,"…","\\ldots",!0);P(W,te,dp,"⋯","\\@cdots",!0);P(W,te,dp,"⋱","\\ddots",!0);P(W,te,ye,"⋮","\\varvdots");P(Ke,te,ye,"⋮","\\varvdots");P(W,te,Or,"ˊ","\\acute");P(W,te,Or,"ˋ","\\grave");P(W,te,Or,"¨","\\ddot");P(W,te,Or,"~","\\tilde");P(W,te,Or,"ˉ","\\bar");P(W,te,Or,"˘","\\breve");P(W,te,Or,"ˇ","\\check");P(W,te,Or,"^","\\hat");P(W,te,Or,"⃗","\\vec");P(W,te,Or,"˙","\\dot");P(W,te,Or,"˚","\\mathring");P(W,te,Xt,"","\\@imath");P(W,te,Xt,"","\\@jmath");P(W,te,ye,"ı","ı");P(W,te,ye,"ȷ","ȷ");P(Ke,te,ye,"ı","\\i",!0);P(Ke,te,ye,"ȷ","\\j",!0);P(Ke,te,ye,"ß","\\ss",!0);P(Ke,te,ye,"æ","\\ae",!0);P(Ke,te,ye,"œ","\\oe",!0);P(Ke,te,ye,"ø","\\o",!0);P(Ke,te,ye,"Æ","\\AE",!0);P(Ke,te,ye,"Œ","\\OE",!0);P(Ke,te,ye,"Ø","\\O",!0);P(Ke,te,Or,"ˊ","\\'");P(Ke,te,Or,"ˋ","\\`");P(Ke,te,Or,"ˆ","\\^");P(Ke,te,Or,"˜","\\~");P(Ke,te,Or,"ˉ","\\=");P(Ke,te,Or,"˘","\\u");P(Ke,te,Or,"˙","\\.");P(Ke,te,Or,"¸","\\c");P(Ke,te,Or,"˚","\\r");P(Ke,te,Or,"ˇ","\\v");P(Ke,te,Or,"¨",'\\"');P(Ke,te,Or,"˝","\\H");P(Ke,te,Or,"◯","\\textcircled");var OF={"--":!0,"---":!0,"``":!0,"''":!0};P(Ke,te,ye,"–","--",!0);P(Ke,te,ye,"–","\\textendash");P(Ke,te,ye,"—","---",!0);P(Ke,te,ye,"—","\\textemdash");P(Ke,te,ye,"‘","`",!0);P(Ke,te,ye,"‘","\\textquoteleft");P(Ke,te,ye,"’","'",!0);P(Ke,te,ye,"’","\\textquoteright");P(Ke,te,ye,"“","``",!0);P(Ke,te,ye,"“","\\textquotedblleft");P(Ke,te,ye,"”","''",!0);P(Ke,te,ye,"”","\\textquotedblright");P(W,te,ye,"°","\\degree",!0);P(Ke,te,ye,"°","\\degree");P(Ke,te,ye,"°","\\textdegree",!0);P(W,te,ye,"£","\\pounds");P(W,te,ye,"£","\\mathsterling",!0);P(Ke,te,ye,"£","\\pounds");P(Ke,te,ye,"£","\\textsterling",!0);P(W,fe,ye,"✠","\\maltese");P(Ke,fe,ye,"✠","\\maltese");var VT='0123456789/@."';for(var c4=0;c4{var n=e.charCodeAt(0),t=e.charCodeAt(1),r=(n-55296)*1024+(t-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return nR[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return VOn[i]}else{if(r===120485||r===120486)return nR[0];if(120486{if(a_(e.classes)!==a_(n.classes)||e.skew!==n.skew||e.maxFontSize!==n.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==n.style[r])return!1;for(var s of Object.keys(n.style))if(e.style[s]!==n.style[s])return!1;return!0},DF=e=>{for(var n=0;nt&&(t=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Xe=function(n,t,r,s){var i=new fp(n,t,r,s);return SC(i),i},c_=(e,n,t,r)=>new fp(e,n,t,r),Gh=function(n,t,r){var s=Xe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=st(s.height),s.maxFontSize=1,s},XOn=function(n,t,r,s){var i=new Vy(n,t,r,s);return SC(i),i},Ql=function(n){var t=new _p(n);return SC(t),t},Vh=function(n,t){return n instanceof _p?Xe([],[n],t):n},YOn=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,i=s,a=1;a{var t=Xe(["mspace"],[],n),r=Hr(e,n);return t.style.marginRight=st(r),t},K1=(e,n,t)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return n==="textbf"&&t==="textit"?s="BoldItalic":n==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",r+"-"+s},uk={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},IF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},$F=function(n,t){var[r,s,i]=IF[n],a=new o_(r),o=new Ul([a],{width:st(s),height:st(i),style:"width:"+st(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=c_(["overlay"],[o],t);return c.height=i,c.style.height=st(i),c.style.width=st(s),c},Pr={number:3,unit:"mu"},G_={number:4,unit:"mu"},wl={number:5,unit:"mu"},ZOn={mord:{mop:Pr,mbin:G_,mrel:wl,minner:Pr},mop:{mord:Pr,mop:Pr,mrel:wl,minner:Pr},mbin:{mord:G_,mop:G_,mopen:G_,minner:G_},mrel:{mord:wl,mop:wl,mopen:wl,minner:wl},mopen:{},mclose:{mop:Pr,mbin:G_,mrel:wl,minner:Pr},mpunct:{mord:Pr,mop:Pr,mrel:wl,mopen:Pr,mclose:Pr,mpunct:Pr,minner:Pr},minner:{mord:Pr,mop:Pr,mbin:G_,mrel:wl,mopen:Pr,mpunct:Pr,minner:Pr}},JOn={mord:{mop:Pr},mop:{mord:Pr,mop:Pr},mbin:{},mrel:{},mopen:{},mclose:{mop:Pr},mpunct:{},minner:{mop:Pr}},BF={},Ab={},Tb={};function ht(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},c=0;c{var v=k.classes[0],y=w.classes[0];v==="mbin"&&tDn.has(y)?k.classes[0]="mord":y==="mbin"&&eDn.has(v)&&(w.classes[0]="mord")},{node:_},p,m),_k(i,(w,k)=>{var v,y,x=dk(k),b=dk(w),C=x&&b?w.hasClass("mtight")?(v=JOn[x])==null?void 0:v[b]:(y=ZOn[x])==null?void 0:y[b]:null;if(C)return LF(C,u)},{node:_},p,m),i},_k=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(_+1,0,p),a++})(a)}s&&n.pop()},PF=function(n){return n instanceof _p||n instanceof Vy||n instanceof fp&&n.hasClass("enclosing")?n:null},fk=function(n,t){var r=PF(n);if(r){var s=r.children;if(s.length){if(t==="right")return fk(s[s.length-1],"right");if(t==="left")return fk(s[0],"left")}}return n},dk=function(n,t){if(!n)return null;t&&(n=fk(n,t));var r=n.classes[0];return rDn[r]||null},hm=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Xe(t.concat(r))},nr=function(n,t,r){if(!n)return Xe();if(Ab[n.type]){var s=Ab[n.type](n,t);if(r&&t.size!==r.size){s=Xe(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new et("Got group of unknown type: '"+n.type+"'")};function W1(e,n){var t=Xe(["base"],e,n),r=Xe(["strut"]);return r.style.height=st(t.height+t.depth),t.depth&&(r.style.verticalAlign=st(-t.depth)),t.children.unshift(r),t}function hk(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Bs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(W1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(W1(a,n));var u;t?(u=W1(Bs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var d=Xe(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var _=u.children[0];_.style.height=st(d.height+d.depth),d.depth&&(_.style.verticalAlign=st(-d.depth))}return d}function FF(e){return new _p(e)}class tt{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=a_(this.classes));for(var r=0;r0&&(n+=' class ="'+gi(a_(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class ks{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return gi(this.toText())}toText(){return this.text}}class HF{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",st(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var sDn=new Set(["\\imath","\\jmath"]),iDn=new Set(["mrow","mtable"]),bo=function(n,t,r){return Rr[t][n]&&Rr[t][n].replace&&n.charCodeAt(0)!==55349&&!(OF.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Rr[t][n].replace),new ks(n)},CC=function(n){return n.length===1?n[0]:new tt("mrow",n)},aDn={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},EC=(e,n)=>{if(e.mode==="text"){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold"}var t=n.font;if(!t||t==="mathnormal")return null;var r=e.mode,s=aDn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(sDn.has(i))return null;if(Rr[r][i]){var a=Rr[r][i].replace;a&&(i=a)}var o=uk[t].fontName;return wC(i,o,r)?uk[t].variant:null};function f4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof ks&&n.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof ks&&t.text===","}else return!1}var Ha=function(n,t,r){if(n.length===1){var s=wr(n[0],t);return r&&s instanceof tt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||f4(a))){var u=c.children[0];u instanceof tt&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof ks&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var _=c.children[0];_ instanceof ks&&_.text.length>0&&(_.text=_.text.slice(0,1)+"̸"+_.text.slice(1),i.pop())}}}i.push(c),a=c}return i},l_=function(n,t,r){return CC(Ha(n,t,r))},wr=function(n,t){if(!n)return new tt("mrow");if(Tb[n.type])return Tb[n.type](n,t);throw new et("Got group of unknown type: '"+n.type+"'")};function rR(e,n,t,r,s){var i=Ha(e,t),a;i.length===1&&i[0]instanceof tt&&iDn.has(i[0].type)?a=i[0]:a=new tt("mrow",i);var o=new tt("annotation",[new ks(n)]);o.setAttribute("encoding","application/x-tex");var c=new tt("semantics",[a,o]),u=new tt("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Xe([d],[u])}var oDn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],iR=function(n,t){return t.size<2?n:oDn[n-1][t.size-1]};class Nl{constructor(n){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=n.style,this.color=n.color,this.size=n.size||Nl.BASESIZE,this.textSize=n.textSize||this.size,this.phantom=!!n.phantom,this.font=n.font||"",this.fontFamily=n.fontFamily||"",this.fontWeight=n.fontWeight||"",this.fontShape=n.fontShape||"",this.sizeMultiplier=sR[this.size-1],this.maxSize=n.maxSize,this.minRuleThickness=n.minRuleThickness,this._fontMetrics=void 0}extend(n){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,n),new Nl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:iR(this.textSize,n)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(n){return this.size===n&&this.textSize===n?this:this.extend({style:this.style.text(),size:n,textSize:n,sizeMultiplier:sR[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=iR(Nl.BASESIZE,n);return this.size===t&&this.textSize===Nl.BASESIZE&&this.style===n?this:this.extend({style:n,size:t})}havingBaseSizing(){var n;switch(this.style.id){case 4:case 5:n=3;break;case 6:case 7:n=1;break;default:n=6}return this.extend({style:this.style.text(),size:n})}withColor(n){return this.extend({color:n})}withPhantom(){return this.extend({phantom:!0})}withFont(n){return this.extend({font:n})}withTextFontFamily(n){return this.extend({fontFamily:n,font:""})}withTextFontWeight(n){return this.extend({fontWeight:n,font:""})}withTextFontShape(n){return this.extend({fontShape:n,font:""})}sizingClasses(n){return n.size!==this.size?["sizing","reset-size"+n.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Nl.BASESIZE?["sizing","reset-size"+this.size,"size"+Nl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=UOn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Nl.BASESIZE=6;var qF=function(n){return new Nl({style:n.displayMode?rn.DISPLAY:rn.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},UF=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Xe(r,[n])}return n},cDn=function(n,t,r){var s=qF(r),i;if(r.output==="mathml")return rR(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=hk(n,s);i=Xe(["katex"],[a])}else{var o=rR(n,t,s,r.displayMode,!1),c=hk(n,s);i=Xe(["katex"],[o,c])}return UF(i,r)},lDn=function(n,t,r){var s=qF(r),i=hk(n,s),a=Xe(["katex"],[i]);return UF(a,r)},uDn={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Qy=function(n){var t=new tt("mo",[new ks(uDn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},_Dn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},fDn=new Set(["widehat","widecheck","widetilde","utilde"]),Xy=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(fDn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,d,_,p;if(u>5)c==="widehat"||c==="widecheck"?(d=420,o=2364,p=.42,_=c+"4"):(d=312,o=2340,p=.34,_="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],_=c+m):(o=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],_="tilde"+m)}var w=new o_(_),k=new Ul([w],{width:"100%",height:st(p),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:c_([],[k],t),minWidth:0,height:p}}else{var v=[],y=_Dn[c];if(!y)throw new Error('No SVG data for "'+c+'".');var[x,b,C]=y,N=C/1e3,z=x.length,A,j;if(z===1){if(y.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],j=[y[3]]}else if(z===2)A=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(z===3)A=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+z+" children.");for(var M=0;M0&&(s.style.minWidth=st(i)),s},dDn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Xe(["stretchy",t],[],i),t==="fbox"){var c=i.color&&i.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new sk({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new sk({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Ul(u,{width:"100%",height:st(o)});a=c_([],[d],i)}return a.height=o,a.style.height=st(o),a},hDn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},pDn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function mDn(e){return e in hDn}function bn(e,n){if(!e||e.type!==n)throw new Error("Expected node of type "+n+", but got "+(e?"node of type "+e.type:String(e)));return e}function Yy(e){var n=Zy(e);if(!n)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return n}function Zy(e){return e&&(e.type==="atom"||pDn.hasOwnProperty(e.type))?e:null}var GF=e=>{if(e instanceof Ia)return e;if(HOn(e)&&e.children.length===1)return GF(e.children[0])},NC=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=bn(e.base,"accent"),t=r.base,e.base=t,s=FOn(nr(e,n)),e.base=r):(r=bn(e,"accent"),t=r.base);var i=nr(t,n.havingCrampedStyle()),a=r.isShifty&&Kl(t),o=0;if(a){var c,u;o=(c=(u=GF(i))==null?void 0:u.skew)!=null?c:0}var d=r.label==="\\c",_=d?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Xy(r,n),p=er({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+st(2*o)+")",marginLeft:st(2*o)}:void 0}]});else{var m,w;r.label==="\\vec"?(m=$F("vec",n),w=IF.vec[1]):(m=Wy({mode:r.mode,text:r.label},n,"textord"),m=POn(m),m.italic=0,w=m.width,d&&(_+=m.depth)),p=Xe(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),_=i.height);var v=o;k||(v-=w/2),p.style.left=st(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=er({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-_},{type:"elem",elem:p}]})}var y=Xe(["mord","accent"],[p],n);return s?(s.children[0]=y,s.height=Math.max(y.height,s.height),s.classes[0]="mord",s):y},VF=(e,n)=>{var t=e.isStretchy?Qy(e.label):new tt("mo",[bo(e.label,e.mode)]),r=new tt("mover",[wr(e.base,n),t]);return r.setAttribute("accent","true"),r},gDn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ht({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=Rb(n[0]),r=!gDn.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:t}},htmlBuilder:NC,mathmlBuilder:VF});ht({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:NC,mathmlBuilder:VF});ht({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=nr(e.base,n),r=Xy(e,n),s=e.label==="\\utilde"?.12:0,i=er({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Xe(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Qy(e.label),r=new tt("munder",[wr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var Q1=e=>{var n=new tt("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};ht({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=Vh(nr(e.body,r,n),n),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;e.below&&(r=n.havingStyle(t.sub()),a=Vh(nr(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Xy(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var d;if(a){var _=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;d=er({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:_}]})}else d=er({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Xe(["mrel","x-arrow"],[d],n)},mathmlBuilder(e,n){var t=Qy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=Q1(wr(e.body,n));if(e.below){var i=Q1(wr(e.below,n));r=new tt("munderover",[t,i,s])}else r=new tt("mover",[t,s])}else if(e.below){var a=Q1(wr(e.below,n));r=new tt("munder",[t,a])}else r=Q1(),r=new tt("mover",[t,r]);return r}});function KF(e,n){var t=Bs(e.body,n,!0);return Xe([e.mclass],t,n)}function WF(e,n){var t,r=Ha(e.body,n);return e.mclass==="minner"?t=new tt("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new tt("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new tt("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}ht({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:ws(s),isCharacterBox:Kl(s)}},htmlBuilder:KF,mathmlBuilder:WF});var Jy=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};ht({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:Jy(n[0]),body:ws(n[1]),isCharacterBox:Kl(n[1])}}});ht({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],i=n[0],a;r!=="\\stackrel"?a=Jy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ws(s)},c={type:"supsub",mode:i.mode,base:o,sup:r==="\\underset"?null:i,sub:r==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:a,body:[c],isCharacterBox:Kl(c)}},htmlBuilder:KF,mathmlBuilder:WF});ht({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:Jy(n[0]),body:ws(n[0])}},htmlBuilder(e,n){var t=Bs(e.body,n,!0),r=Xe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Ha(e.body,n),r=new tt("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var vDn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},aR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),oR=e=>e.type==="textord"&&e.text==="@",bDn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function yDn(e,n,t){var r=vDn[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[n[0]],[n[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[n[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},a=t.callFunction("\\Big",[i],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function xDn(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){n[n.length-1].length===0&&n.pop();break}else throw new et("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var _=0;_<2;_++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var w=yDn(u,d,e),k={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(k),o=aR()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}ht({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=Vh(nr(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=st(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new tt("mrow",[wr(e.label,n)]);return t=new tt("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new tt("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});ht({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=Vh(nr(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new tt("mrow",[wr(e.fragment,n)])}});ht({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=bn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new et("\\@char with invalid code point "+i);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var QF=(e,n)=>{var t=Bs(e.body,n.withColor(e.color),!1);return Ql(t)},XF=(e,n)=>{var t=Ha(e.body,n.withColor(e.color)),r=new tt("mstyle",t);return r.setAttribute("mathcolor",e.color),r};ht({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=bn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ws(s)}},htmlBuilder:QF,mathmlBuilder:XF});ht({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=bn(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var i=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:i}},htmlBuilder:QF,mathmlBuilder:XF});ht({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:s&&bn(s,"size").value}},htmlBuilder(e,n){var t=Xe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=st(Hr(e.size,n)))),t},mathmlBuilder(e,n){var t=new tt("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",st(Hr(e.size,n)))),t}});var pk={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},YF=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new et("Expected a control sequence",e);return n},wDn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},ZF=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};ht({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(pk[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=pk[r.text]),bn(n.parseFunction(),"internal");throw new et("Invalid token after macro prefix",r)}});ht({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new et("Expected a control sequence",r);for(var i=0,a,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){a=n.gullet.future(),o[i].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new et('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new et('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new et("Expected a macro definition");o[i].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:i,delimiters:o},t===pk[t]),{type:"internal",mode:n.mode}}});ht({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=YF(n.gullet.popToken());n.gullet.consumeSpaces();var s=wDn(n);return ZF(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});ht({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=YF(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return ZF(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var E0=function(n,t,r){var s=Rr.math[n]&&Rr.math[n].replace,i=wC(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},zC=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Xe(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},JF=function(n,t,r){var s=t.havingBaseStyle(r),i=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=st(i),n.height-=i,n.depth+=i},kDn=function(n,t,r,s,i,a){var o=Ti(n,"Main-Regular",i,s),c=zC(o,t,s,a);return JF(c,s,t),c},SDn=function(n,t,r,s){return Ti(n,"Size"+t+"-Regular",r,s)},eH=function(n,t,r,s,i,a){var o=SDn(n,t,i,s),c=zC(Xe(["delimsizing","size"+t],[o],s),rn.TEXT,s,a);return r&&JF(c,s,rn.TEXT),c},d4=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Xe(["delimsizinginner",s],[Xe([],[Ti(n,t,r)])]);return{type:"elem",elem:i}},h4=function(n,t,r){var s=Nc["Size4-Regular"][n.charCodeAt(0)]?Nc["Size4-Regular"][n.charCodeAt(0)][4]:Nc["Size1-Regular"][n.charCodeAt(0)][4],i=new o_("inner",MOn(n,Math.round(1e3*t))),a=new Ul([i],{width:st(s),height:st(t),style:"width:"+st(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=c_([],[a],r);return o.height=t,o.style.height=st(t),o.style.width=st(s),{type:"elem",elem:o}},mk=.008,X1={type:"kern",size:-1*mk},CDn=new Set(["|","\\lvert","\\rvert","\\vert"]),EDn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),tH=function(n,t,r,s,i,a){var o,c,u,d,_="",p=0;o=u=d=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=d="⏐":n==="\\Uparrow"?u=d="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",d="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",d="\\Downarrow"):CDn.has(n)?(u="∣",_="vert",p=333):EDn.has(n)?(u="∥",_="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",d="⎣",m="Size4-Regular",_="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",d="⎦",m="Size4-Regular",_="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",d="⎣",m="Size4-Regular",_="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=d="⎢",m="Size4-Regular",_="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",d="⎦",m="Size4-Regular",_="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=d="⎥",m="Size4-Regular",_="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",d="⎝",m="Size4-Regular",_="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",d="⎠",m="Size4-Regular",_="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",d="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",d="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",d="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",d="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",d="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",d="⎩",u="⎪",m="Size4-Regular");var w=E0(o,m,i),k=w.height+w.depth,v=E0(u,m,i),y=v.height+v.depth,x=E0(d,m,i),b=x.height+x.depth,C=0,N=1;if(c!==null){var z=E0(c,m,i);C=z.height+z.depth,N=2}var A=k+b+C,j=Math.max(0,Math.ceil((t-A)/(N*y))),M=A+j*N*y,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var L=M/2-D,B=[];if(_.length>0){var U=M-k-b,H=Math.round(M*1e3),Q=OOn(_,Math.round(U*1e3)),K=new o_(_,Q),Z=st(p/1e3),ee=st(H/1e3),$=new Ul([K],{width:Z,height:ee,viewBox:"0 0 "+p+" "+H}),I=c_([],[$],s);I.height=H/1e3,I.style.width=Z,I.style.height=ee,B.push({type:"elem",elem:I})}else{if(B.push(d4(d,m,i)),B.push(X1),c===null){var F=M-k-b+2*mk;B.push(h4(u,F,s))}else{var q=(M-k-b-C)/2+2*mk;B.push(h4(u,q,s)),B.push(X1),B.push(d4(c,m,i)),B.push(X1),B.push(h4(u,q,s))}B.push(X1),B.push(d4(o,m,i))}var V=s.havingBaseStyle(rn.TEXT),ie=er({positionType:"bottom",positionData:L,children:B});return zC(Xe(["delimsizing","mult"],[ie],V),rn.TEXT,s,a)},p4=80,m4=.08,g4=function(n,t,r,s,i){var a=ROn(n,s,r),o=new o_(n,a),c=new Ul([o],{width:"400em",height:st(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return c_(["hide-tail"],[c],i)},NDn=function(n,t){var r=t.havingBaseSizing(),s=aH("\\surd",n*r.sizeMultiplier,iH,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,d,_;return s.type==="small"?(d=1e3+1e3*a+p4,n<1?i=1:n<1.4&&(i=.7),c=(1+a+m4)/i,u=(1+a)/i,o=g4("sqrtMain",c,d,a,t),o.style.minWidth="0.853em",_=.833/i):s.type==="large"?(d=(1e3+p4)*F0[s.size],u=(F0[s.size]+a)/i,c=(F0[s.size]+a+m4)/i,o=g4("sqrtSize"+s.size,c,d,a,t),o.style.minWidth="1.02em",_=1/i):(c=n+a+m4,u=n+a,d=Math.floor(1e3*n+a)+p4,o=g4("sqrtTall",c,d,a,t),o.style.minWidth="0.742em",_=1.056),o.height=u,o.style.height=st(c),{span:o,advanceWidth:_,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},nH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),zDn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),rH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),F0=[0,1.2,1.8,2.4,3],sH=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),nH.has(n)||rH.has(n))return eH(n,t,!1,r,s,i);if(zDn.has(n))return tH(n,F0[t],!1,r,s,i);throw new et("Illegal delimiter: '"+n+"'")},jDn=[{type:"small",style:rn.SCRIPTSCRIPT},{type:"small",style:rn.SCRIPT},{type:"small",style:rn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ADn=[{type:"small",style:rn.SCRIPTSCRIPT},{type:"small",style:rn.SCRIPT},{type:"small",style:rn.TEXT},{type:"stack"}],iH=[{type:"small",style:rn.SCRIPTSCRIPT},{type:"small",style:rn.SCRIPT},{type:"small",style:rn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],TDn=function(n){if(n.type==="small")return"Main-Regular";if(n.type==="large")return"Size"+n.size+"-Regular";if(n.type==="stack")return"Size4-Regular";var t=n.type;throw new Error("Add support for delim type '"+t+"' here.")},aH=function(n,t,r,s){for(var i=Math.min(2,3-s.style.size),a=i;at)return o}return r[r.length-1]},gk=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;rH.has(n)?o=jDn:nH.has(n)?o=iH:o=ADn;var c=aH(n,t,o,s);return c.type==="small"?kDn(n,c.style,r,s,i,a):c.type==="large"?eH(n,c.size,r,s,i,a):tH(n,t,r,s,i,a)},v4=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(t-o,r+o),_=Math.max(d/500*c,2*d-u);return gk(n,_,!0,s,i,a)},cR={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},RDn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function lR(e){return"isMiddle"in e}function ex(e,n){var t=Zy(e);if(t&&RDn.has(t.text))return t;throw t?new et("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new et("Invalid delimiter type '"+e.type+"'",e)}ht({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=ex(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:cR[e.funcName].size,mclass:cR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Xe([e.mclass]):sH(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(bo(e.delim,e.mode));var t=new tt("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=st(F0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function uR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ht({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new et("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:ex(n[0],e).text,color:t}}});ht({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=ex(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=bn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{uR(e);for(var t=Bs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{uR(e);var t=Ha(e.body,n);if(e.left!=="."){var r=new tt("mo",[bo(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new tt("mo",[bo(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return CC(t)}});ht({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=ex(n[0],e);if(!e.parser.leftrightDepth)throw new et("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=hm(n,[]):(t=sH(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?bo("|","text"):bo(e.delim,e.mode),r=new tt("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var tx=(e,n)=>{var t=Vh(nr(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=Kl(e.body);if(r==="sout")i=Xe(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=Hr({number:.6,unit:"pt"},n),u=Hr({number:.35,unit:"ex"},n),d=n.havingBaseSizing();s=s/d.sizeMultiplier;var _=t.height+t.depth+c+u;t.style.paddingLeft=st(_/2+c);var p=Math.floor(1e3*_*s),m=AOn(p),w=new Ul([new o_("phase",m)],{width:"400em",height:st(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=c_(["hide-tail"],[w],n),i.style.height=st(_),a=t.depth+c+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,y=0;/box/.test(r)?(y=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:y),v=k):r==="angl"?(y=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*y,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=dDn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=st(y)):r==="angl"&&y!==.049&&(i.style.borderTopWidth=st(y),i.style.borderRightWidth=st(y)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=er({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var b=/cancel|phase/.test(r)?["svg-align"]:[];x=er({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:b}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!o?Xe(["mord","cancel-lap"],[x],n):Xe(["mord"],[x],n)},nx=(e,n)=>{var t,r=new tt(e.label.includes("colorbox")?"mpadded":"menclose",[wr(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+st(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ht({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=bn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:tx,mathmlBuilder:nx});ht({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=bn(n[0],"color-token").color,a=bn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:tx,mathmlBuilder:nx});ht({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});ht({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:tx,mathmlBuilder:nx});ht({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:tx,mathmlBuilder:nx});ht({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var oH={};function Gc(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},c=0;c{var n=e.parser.settings;if(!n.displayMode)throw new et("{"+e.envName+"} can be used only in display mode.")},MDn=new Set(["gather","gather*"]);function jC(e){if(!e.includes("ed"))return!e.includes("*")}function g_(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:_,leqno:p}=n;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new et("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var w=[],k=[w],v=[],y=[],x=c!=null?[]:void 0;function b(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Oa("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),y.push(_R(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:N};t&&(z={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[z]}),w.push(z);var A=e.fetch().text;if(A==="&"){if(_&&w.length===_){if(u||o)throw new et("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){C(),w.length===1&&z.type==="styling"&&z.body.length===1&&z.body[0].type==="ordgroup"&&z.body[0].body.length===0&&(k.length>1||!d)&&k.pop(),y.length0&&(b+=.25),u.push({pos:b,isDashed:He[We]})}for(C(a[0]),r=0;r0&&(L+=x,AHe))for(r=0;r=o)){var ae=void 0;if(s>0||n.hskipBeforeAndAfter){var le,ge;ae=(le=(ge=V)==null?void 0:ge.pregap)!=null?le:p,ae!==0&&(Q=Xe(["arraycolsep"],[]),Q.style.width=st(ae),H.push(Q))}var be=[];for(r=0;r0){for(var Ht=Gh("hline",t,d),qt=Gh("hdashline",t,d),$e=[{type:"elem",elem:Ft,shift:0}];u.length>0;){var ot=u.pop(),Ce=ot.pos-B;ot.isDashed?$e.push({type:"elem",elem:qt,shift:Ce}):$e.push({type:"elem",elem:Ht,shift:Ce})}Ft=er({positionType:"individualShift",children:$e})}if(Z.length===0)return Xe(["mord"],[Ft],t);var me=er({positionType:"individualShift",children:Z}),ze=Xe(["tag"],[me],t);return Ql([Ft,ze])},ODn={c:"center ",l:"left ",r:"right "},Kc=function(n,t){for(var r=[],s=new tt("mtd",[],["mtr-glue"]),i=new tt("mtd",[],["mml-eqn-num"]),a=0;a0){var w=n.cols,k="",v=!1,y=0,x=w.length;w[0].type==="separator"&&(p+="top ",y=1),w[w.length-1].type==="separator"&&(p+="bottom ",x-=1);for(var b=y;b0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var D=1;D0&&m&&(v=1),r[w]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};Gc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=Zy(n[0]),r=t?[n[0]]:bn(n[0],"ordgroup").body,s=r.map(function(a){var o=Yy(a),c=o.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new et("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return g_(e.parser,i,AC(e.envName))},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new et("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=g_(e.parser,r,AC(e.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[i],left:n[0],right:n[1],rightColor:void 0}:i},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=g_(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=Zy(n[0]),r=t?[n[0]]:bn(n[0],"ordgroup").body,s=r.map(function(o){var c=Yy(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new et("Unknown column alignment: "+u,o)});if(s.length>1)throw new et("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=g_(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new et("{subarray} can contain only one column");return a},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var n={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=g_(e.parser,n,AC(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:lH,htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){MDn.has(e.envName)&&rx(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:jC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return g_(e.parser,n,"display")},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:lH,htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){rx(e);var n={autoTag:jC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return g_(e.parser,n,"display")},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return rx(e),xDn(e.parser)},htmlBuilder:Vc,mathmlBuilder:Kc});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");ht({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new et(e.funcName+" valid only within array environment")}});var fR=oH;ht({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new et("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return nr(e.body,r)},_H=(e,n)=>{var t=e.font,r=n.withFont(t);return wr(e.body,r)},dR={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ht({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=Rb(n[0]),i=r;return i in dR&&(i=dR[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:uH,mathmlBuilder:_H});ht({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:Jy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:Kl(r)}}});ht({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:i}=t,a=t.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:uH,mathmlBuilder:_H});var DDn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=nr(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?w=3*p:w=7*p,k=n.fontMetrics().denom1):(_>0?(m=n.fontMetrics().num2,w=p):(m=n.fontMetrics().num3,w=3*p),k=n.fontMetrics().denom2);var v;if(d){var x=n.fontMetrics().axisHeight;m-a.depth-(x+.5*_){var t=new tt("mfrac",[wr(e.numer,n),wr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Hr(e.barSize,n);t.setAttribute("linethickness",st(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new tt("mo",[new ks(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new tt("mo",[new ks(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return CC(s)}return t},fH=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};ht({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=n[1],a,o=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",c=")";break;case"\\\\bracefrac":a=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;return u||r.startsWith("\\d")?d="display":r.startsWith("\\t")&&(d="text"),fH({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},d)},htmlBuilder:DDn,mathmlBuilder:LDn});ht({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var hR=["display","text","script","scriptscript"],pR=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};ht({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],i=Rb(n[0]),a=i.type==="atom"&&i.family==="open"?pR(i.text):null,o=Rb(n[1]),c=o.type==="atom"&&o.family==="close"?pR(o.text):null,u=bn(n[2],"size"),d,_=null;u.isBlank?d=!0:(_=u.value,d=_.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var w=bn(m.body[0],"textord");p=hR[Number(w.text)]}}else m=bn(m,"textord"),p=hR[Number(m.text)];return fH({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:_,leftDelim:a,rightDelim:c},p)}});ht({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:bn(n[0],"size").value,token:s}}});ht({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=bn(n[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var a=n[2],o=i.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var dH=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?nr(e.sup,n.havingStyle(t.sup()),n):nr(e.sub,n.havingStyle(t.sub()),n),s=bn(e.base,"horizBrace")):s=bn(e,"horizBrace");var i=nr(s.base,n.havingBaseStyle(rn.DISPLAY)),a=Xy(s,n),o;if(s.isOver?o=er({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=er({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),r){var c=Xe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=er({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=er({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Xe(["minner",s.isOver?"mover":"munder"],[o],n)},IDn=(e,n)=>{var t=Qy(e.label);return new tt(e.isOver?"mover":"munder",[wr(e.base,n),t])};ht({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:dH,mathmlBuilder:IDn});ht({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=bn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ws(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Bs(e.body,n,!1);return XOn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=l_(e.body,n);return t instanceof tt||(t=new tt("mrow",[t])),t.setAttribute("href",e.href),t}});ht({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=bn(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:t,funcName:r,token:s}=e,i=bn(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,c={};switch(r){case"\\htmlClass":c.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),d=0;d{var t=Bs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Xe(r,t,n);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&s.setAttribute(i,e.attributes[i]);return s},mathmlBuilder:(e,n)=>l_(e.body,n)});ht({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:ws(n[0]),mathml:ws(n[1])}},htmlBuilder:(e,n)=>{var t=Bs(e.html,n,!1);return Ql(t)},mathmlBuilder:(e,n)=>l_(e.mathml,n)});var b4=function(n){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(n))return{number:+n,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n);if(!t)throw new et("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!AF(r))throw new et("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ht({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var c=bn(t[0],"raw").string,u=c.split(","),d=0;d{var t=Hr(e.height,n),r=0;e.totalheight.number>0&&(r=Hr(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Hr(e.width,n));var i={height:st(t+r)};s>0&&(i.width=st(s)),r>0&&(i.verticalAlign=st(-r));var a=new $On(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new tt("mglyph",[]);t.setAttribute("alt",e.alt);var r=Hr(e.height,n),s=0;if(e.totalheight.number>0&&(s=Hr(e.totalheight,n)-r,t.setAttribute("valign",st(-s))),t.setAttribute("height",st(r+s)),e.width.number>0){var i=Hr(e.width,n);t.setAttribute("width",st(i))}return t.setAttribute("src",e.src),t}});ht({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=bn(n[0],"size");if(t.settings.strict){var i=r[1]==="m",a=s.value.unit==="mu";i?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,n){return LF(e.dimension,n)},mathmlBuilder(e,n){var t=Hr(e.dimension,n);return new HF(t)}});ht({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=Xe([],[nr(e.body,n)]),t=Xe(["inner"],[t],n)):t=Xe(["inner"],[nr(e.body,n)]);var r=Xe(["fix"],[]),s=Xe([e.alignment],[t,r],n),i=Xe(["strut"]);return i.style.height=st(s.height+s.depth),s.depth&&(i.style.verticalAlign=st(-s.depth)),s.children.unshift(i),s=Xe(["thinbox"],[s],n),Xe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new tt("mpadded",[wr(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});ht({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var i=t==="\\("?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});ht({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new et("Mismatched "+e.funcName)}});var mR=(e,n)=>{switch(n.style.size){case rn.DISPLAY.size:return e.display;case rn.TEXT.size:return e.text;case rn.SCRIPT.size:return e.script;case rn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ht({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ws(n[0]),text:ws(n[1]),script:ws(n[2]),scriptscript:ws(n[3])}},htmlBuilder:(e,n)=>{var t=mR(e,n),r=Bs(t,n,!1);return Ql(r)},mathmlBuilder:(e,n)=>{var t=mR(e,n);return l_(t,n)}});var hH=(e,n,t,r,s,i,a)=>{e=Xe([],[e]);var o=t&&Kl(t),c,u;if(n){var d=nr(n,r.havingStyle(s.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var _=nr(t,r.havingStyle(s.sub()),r);c={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-_.height)}}var p;if(u&&c){var m=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=er({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:st(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:st(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var w=e.height-a;p=er({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:st(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=er({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:st(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var y=Xe(["mspace"],[],r);y.style.marginRight=st(i),v.unshift(y)}return Xe(["mop","op-limits"],v,r)},pH=new Set(["\\smallint"]),hp=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=bn(e.base,"op"),s=!0):i=bn(e,"op");var a=n.style,o=!1;a.size===rn.DISPLAY.size&&i.symbol&&!pH.has(i.name)&&(o=!0);var c,u;if(i.symbol){var d=o?"Size2-Regular":"Size1-Regular",_="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(_=i.name.slice(1),i.name=_==="oiint"?"\\iint":"\\iiint"),c=Ti(i.name,d,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,_.length>0){var p=$F(_+"Size"+(o?"2":"1"),n);c=er({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+_,c.classes.unshift("mop"),c.italic=u}}else if(i.body){var m=Bs(i.body,n,!0);m.length===1&&m[0]instanceof Ia?(c=m[0],c.classes[0]="mop"):c=Xe(["mop"],m,n)}else{for(var w=[],k=1;k{var t;if(e.symbol)t=new tt("mo",[bo(e.name,e.mode)]),pH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new tt("mo",Ha(e.body,n));else{t=new tt("mi",[new ks(e.name.slice(1))]);var r=new tt("mo",[bo("⁡","text")]);e.parentIsSupSub?t=new tt("mrow",[t,r]):t=FF([t,r])}return t},$Dn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ht({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=$Dn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:hp,mathmlBuilder:fg});ht({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ws(r)}},htmlBuilder:hp,mathmlBuilder:fg});var BDn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ht({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:hp,mathmlBuilder:fg});ht({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:hp,mathmlBuilder:fg});ht({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=BDn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:hp,mathmlBuilder:fg});var mH=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=bn(e.base,"operatorname"),s=!0):i=bn(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(_=>{var p="text"in _?_.text:void 0;return typeof p=="string"?{type:"textord",mode:_.mode,text:p}:_}),c=Bs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=Ha(e.body,n.withFont("mathrm")),r=!0,s=0;sd.toText()).join("");t=[new ks(o)]}var c=new tt("mi",t);c.setAttribute("mathvariant","normal");var u=new tt("mo",[bo("⁡","text")]);return e.parentIsSupSub?new tt("mrow",[c,u]):FF([c,u])};ht({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:ws(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:mH,mathmlBuilder:PDn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");rd({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?Ql(Bs(e.body,n,!1)):Xe(["mord"],Bs(e.body,n,!0),n)},mathmlBuilder(e,n){return l_(e.body,n,!0)}});ht({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=nr(e.body,n.havingCrampedStyle()),r=Gh("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=er({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Xe(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new tt("mo",[new ks("‾")]);t.setAttribute("stretchy","true");var r=new tt("mover",[wr(e.body,n),t]);return r.setAttribute("accent","true"),r}});ht({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:ws(r)}},htmlBuilder:(e,n)=>{var t=Bs(e.body,n.withPhantom(),!1);return Ql(t)},mathmlBuilder:(e,n)=>{var t=Ha(e.body,n);return new tt("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");ht({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=Xe(["inner"],[nr(e.body,n.withPhantom())]),r=Xe(["fix"],[]);return Xe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Ha(ws(e.body),n),r=new tt("mphantom",t),s=new tt("mpadded",[r]);return s.setAttribute("width","0px"),s}});ht({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=bn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=nr(e.body,n),r=Hr(e.dy,n);return er({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new tt("mpadded",[wr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});ht({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});ht({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],i=bn(n[0],"size"),a=bn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&bn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Xe(["mord","rule"],[],n),r=Hr(e.width,n),s=Hr(e.height,n),i=e.shift?Hr(e.shift,n):0;return t.style.borderRightWidth=st(r),t.style.borderTopWidth=st(s),t.style.bottom=st(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Hr(e.width,n),r=Hr(e.height,n),s=e.shift?Hr(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new tt("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",st(t)),a.setAttribute("height",st(r));var o=new tt("mpadded",[a]);return s>=0?o.setAttribute("height",st(s)):(o.setAttribute("height",st(s)),o.setAttribute("depth",st(-s))),o.setAttribute("voffset",st(s)),o}});function gH(e,n,t){for(var r=Bs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return gH(e.body,t,n)};ht({type:"sizing",names:gR,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:gR.indexOf(r)+1,body:i}},htmlBuilder:FDn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Ha(e.body,t),s=new tt("mstyle",r);return s.setAttribute("mathsize",st(t.sizeMultiplier)),s}});ht({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,i=!1,a=t[0]&&bn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Xe([],[nr(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Xe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new tt("mpadded",[wr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});ht({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],i=n[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,n){var t=nr(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Vh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+_-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=st(d);var m=er({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var w=n.havingStyle(rn.SCRIPTSCRIPT),k=nr(e.index,w,n),v=.6*(m.height-m.depth),y=er({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),x=Xe(["root"],[y]);return Xe(["mord","sqrt"],[x,m],n)}else return Xe(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new tt("mroot",[wr(t,n),wr(r,n)]):new tt("msqrt",[wr(t,n)])}});var vk={display:rn.DISPLAY,text:rn.TEXT,script:rn.SCRIPT,scriptscript:rn.SCRIPTSCRIPT};function HDn(e){return e in vk}ht({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!0,t),a=r.slice(1,r.length-5);if(!HDn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=vk[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),gH(e.body,r,n)},mathmlBuilder(e,n){var t=vk[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Ha(e.body,r),i=new tt("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var qDn=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===rn.DISPLAY.size||r.alwaysHandleSupSub);return s?hp:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===rn.DISPLAY.size||r.limits);return i?mH:null}else{if(r.type==="accent")return Kl(r.base)?NC:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?dH:null}else return null}else return null};rd({type:"supsub",htmlBuilder(e,n){var t=qDn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=nr(r,n),o,c,u=n.fontMetrics(),d=0,_=0,p=r&&Kl(r);if(s){var m=n.havingStyle(n.style.sup());o=nr(s,m,n),p||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var w=n.havingStyle(n.style.sub());c=nr(i,w,n),p||(_=a.depth+w.fontMetrics().subDrop*w.sizeMultiplier/n.sizeMultiplier)}var k;n.style===rn.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,y=st(.5/u.ptPerEm/v),x=null;if(c){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Ia||b){var C;x=st(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){d=Math.max(d,k,o.depth+.25*u.xHeight),_=Math.max(_,u.sub2);var z=u.defaultRuleThickness,A=4*z;if(d-o.depth-(c.height-_)0&&(d+=j,_-=j)}var M=[{type:"elem",elem:c,shift:_,marginRight:y,marginLeft:x},{type:"elem",elem:o,shift:-d,marginRight:y}];N=er({positionType:"individualShift",children:M})}else if(c){_=Math.max(_,u.sub1,c.height-.8*u.xHeight);var D=[{type:"elem",elem:c,marginLeft:x,marginRight:y}];N=er({positionType:"shift",positionData:_,children:D})}else if(o)d=Math.max(d,k,o.depth+.25*u.xHeight),N=er({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:y}]});else throw new Error("supsub must have either sup or sub.");var L=dk(a,"right")||"mord";return Xe([L],[a,Xe(["msupsub"],[N])],n)},mathmlBuilder(e,n){var t=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[wr(e.base,n)];e.sub&&i.push(wr(e.sub,n)),e.sup&&i.push(wr(e.sup,n));var a;if(t)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&n.style===rn.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===rn.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===rn.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===rn.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===rn.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===rn.DISPLAY)?a="mover":a="msup"}return new tt(a,i)}});rd({type:"atom",htmlBuilder(e,n){return kC(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new tt("mo",[bo(e.text,e.mode)]);if(e.family==="bin"){var r=EC(e,n);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var vH={mi:"italic",mn:"normal",mtext:"normal"};rd({type:"mathord",htmlBuilder(e,n){return Wy(e,n,"mathord")},mathmlBuilder(e,n){var t=new tt("mi",[bo(e.text,e.mode,n)]),r=EC(e,n)||"italic";return r!==vH[t.type]&&t.setAttribute("mathvariant",r),t}});rd({type:"textord",htmlBuilder(e,n){return Wy(e,n,"textord")},mathmlBuilder(e,n){var t=bo(e.text,e.mode,n),r=EC(e,n)||"normal",s;return e.mode==="text"?s=new tt("mtext",[t]):/[0-9]/.test(e.text)?s=new tt("mn",[t]):e.text==="\\prime"?s=new tt("mo",[t]):s=new tt("mi",[t]),r!==vH[s.type]&&s.setAttribute("mathvariant",r),s}});var y4={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},x4={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};rd({type:"spacing",htmlBuilder(e,n){if(x4.hasOwnProperty(e.text)){var t=x4[e.text].className||"";if(e.mode==="text"){var r=Wy(e,n,"textord");return r.classes.push(t),r}else return Xe(["mspace",t],[kC(e.text,e.mode,n)],n)}else{if(y4.hasOwnProperty(e.text))return Xe(["mspace",y4[e.text]],[],n);throw new et('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(x4.hasOwnProperty(e.text))t=new tt("mtext",[new ks(" ")]);else{if(y4.hasOwnProperty(e.text))return new tt("mspace");throw new et('Unknown type of space "'+e.text+'"')}return t}});var vR=()=>{var e=new tt("mtd",[]);return e.setAttribute("width","50%"),e};rd({type:"tag",mathmlBuilder(e,n){var t=new tt("mtable",[new tt("mtr",[vR(),new tt("mtd",[l_(e.body,n)]),vR(),new tt("mtd",[l_(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var bR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},yR={"\\textbf":"textbf","\\textmd":"textmd"},UDn={"\\textit":"textit","\\textup":"textup"},xR=(e,n)=>{var t=e.font;if(t){if(bR[t])return n.withTextFontFamily(bR[t]);if(yR[t])return n.withTextFontWeight(yR[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(UDn[t])};ht({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:ws(s),font:r}},htmlBuilder(e,n){var t=xR(e,n),r=Bs(e.body,t,!0);return Xe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=xR(e,n);return l_(e.body,t)}});ht({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=nr(e.body,n),r=Gh("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=er({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Xe(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new tt("mo",[new ks("‾")]);t.setAttribute("stretchy","true");var r=new tt("munder",[wr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});ht({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=nr(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return er({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new tt("mpadded",[wr(e.body,n)],["vcenter"]);return new tt("mrow",[t])}});ht({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new et("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=wR(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Yu=BF,bH=`[ \r - ]`,GDn="\\\\[a-zA-Z@]+",VDn="\\\\[^\uD800-\uDFFF]",KDn="("+GDn+")"+bH+"*",WDn=`\\\\( +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function sDn(e){return"toText"in e}class _p{constructor(n){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=n,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(n){return this.classes.includes(n)}toNode(){for(var n=document.createDocumentFragment(),t=0;t{if(sDn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var rk={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},iDn={ex:!0,em:!0,mu:!0},AF=function(n){return typeof n!="string"&&(n=n.unit),n in rk||n in iDn||n==="ex"},Hr=function(n,t){var r;if(n.unit in rk)r=rk[n.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(n.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,n.unit==="ex")r=s.fontMetrics().xHeight;else if(n.unit==="em")r=s.fontMetrics().quad;else throw new et("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},st=function(n){return+n.toFixed(4)+"em"},a_=function(n){return n.filter(t=>t).join(" ")},xC=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=MOn(r)+":"+s+";")}return t},TF=function(n,t,r){if(this.classes=n||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},RF=function(n){var t=document.createElement(n);t.className=a_(this.classes),Object.assign(t.style,this.style);for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s/=\x00-\x1f]/,MF=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+gi(a_(this.classes))+'"');var r=xC(this.style);r&&(t+=' style="'+gi(r)+'"');for(var s of Object.keys(this.attributes)){if(aDn.test(s))throw new et("Invalid attribute name '"+s+"'");t+=" "+s+'="'+gi(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class fp{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,TF.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return RF.call(this,"span")}toMarkup(){return MF.call(this,"span")}}class Ky{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,TF.call(this,t,s),this.children=r||[],this.setAttribute("href",n)}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return RF.call(this,"a")}toMarkup(){return MF.call(this,"a")}}class oDn{constructor(n,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=n,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(n){return this.classes.includes(n)}toNode(){var n=document.createElement("img");return n.src=this.src,n.alt=this.alt,n.className="mord",Object.assign(n.style,this.style),n}toMarkup(){var n=''+gi(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=st(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=a_(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+st(this.italic)+";"),r+=xC(this.style),r&&(n=!0,t+=' style="'+gi(r)+'"');var s=gi(this.text);return n?(t+=">",t+=s,t+="",t):s}}class Ul{constructor(n,t){this.children=void 0,this.attributes=void 0,this.children=n||[],this.attributes=t||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s':''}}class sk{constructor(n){this.attributes=void 0,this.attributes=n||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var n=" but got "+String(e)+".")}var _Dn=e=>e instanceof fp||e instanceof Ky||e instanceof _p,Nc={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},G1={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},GT={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function fDn(e,n){Nc[e]=n}function wC(e,n,t){if(!Nc[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Nc[n][r];if(!s&&e[0]in GT&&(r=GT[e[0]].charCodeAt(0),s=Nc[n][r]),!s&&t==="text"&&jF(r)&&(s=Nc[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var o4={};function dDn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!o4[n]){var t=o4[n]={cssEmPerMu:G1.quad[n]/18};for(var r in G1)G1.hasOwnProperty(r)&&(t[r]=G1[r][n])}return o4[n]}var Mr={math:{},text:{}};function P(e,n,t,r,s,i){Mr[e][s]={font:n,group:t,replace:r},i&&r&&(Mr[e][r]=Mr[e][s])}var W="math",Ve="text",te="main",fe="ams",Dr="accent-token",gt="bin",Li="close",dp="inner",Xt="mathord",Ss="op-token",Fa="open",fg="punct",de="rel",Wl="spacing",be="textord";P(W,te,de,"≡","\\equiv",!0);P(W,te,de,"≺","\\prec",!0);P(W,te,de,"≻","\\succ",!0);P(W,te,de,"∼","\\sim",!0);P(W,te,de,"⊥","\\perp");P(W,te,de,"⪯","\\preceq",!0);P(W,te,de,"⪰","\\succeq",!0);P(W,te,de,"≃","\\simeq",!0);P(W,te,de,"∣","\\mid",!0);P(W,te,de,"≪","\\ll",!0);P(W,te,de,"≫","\\gg",!0);P(W,te,de,"≍","\\asymp",!0);P(W,te,de,"∥","\\parallel");P(W,te,de,"⋈","\\bowtie",!0);P(W,te,de,"⌣","\\smile",!0);P(W,te,de,"⊑","\\sqsubseteq",!0);P(W,te,de,"⊒","\\sqsupseteq",!0);P(W,te,de,"≐","\\doteq",!0);P(W,te,de,"⌢","\\frown",!0);P(W,te,de,"∋","\\ni",!0);P(W,te,de,"∝","\\propto",!0);P(W,te,de,"⊢","\\vdash",!0);P(W,te,de,"⊣","\\dashv",!0);P(W,te,de,"∋","\\owns");P(W,te,fg,".","\\ldotp");P(W,te,fg,"⋅","\\cdotp");P(W,te,fg,"⋅","·");P(Ve,te,be,"⋅","·");P(W,te,be,"#","\\#");P(Ve,te,be,"#","\\#");P(W,te,be,"&","\\&");P(Ve,te,be,"&","\\&");P(W,te,be,"ℵ","\\aleph",!0);P(W,te,be,"∀","\\forall",!0);P(W,te,be,"ℏ","\\hbar",!0);P(W,te,be,"∃","\\exists",!0);P(W,te,be,"∇","\\nabla",!0);P(W,te,be,"♭","\\flat",!0);P(W,te,be,"ℓ","\\ell",!0);P(W,te,be,"♮","\\natural",!0);P(W,te,be,"♣","\\clubsuit",!0);P(W,te,be,"℘","\\wp",!0);P(W,te,be,"♯","\\sharp",!0);P(W,te,be,"♢","\\diamondsuit",!0);P(W,te,be,"ℜ","\\Re",!0);P(W,te,be,"♡","\\heartsuit",!0);P(W,te,be,"ℑ","\\Im",!0);P(W,te,be,"♠","\\spadesuit",!0);P(W,te,be,"§","\\S",!0);P(Ve,te,be,"§","\\S");P(W,te,be,"¶","\\P",!0);P(Ve,te,be,"¶","\\P");P(W,te,be,"†","\\dag");P(Ve,te,be,"†","\\dag");P(Ve,te,be,"†","\\textdagger");P(W,te,be,"‡","\\ddag");P(Ve,te,be,"‡","\\ddag");P(Ve,te,be,"‡","\\textdaggerdbl");P(W,te,Li,"⎱","\\rmoustache",!0);P(W,te,Fa,"⎰","\\lmoustache",!0);P(W,te,Li,"⟯","\\rgroup",!0);P(W,te,Fa,"⟮","\\lgroup",!0);P(W,te,gt,"∓","\\mp",!0);P(W,te,gt,"⊖","\\ominus",!0);P(W,te,gt,"⊎","\\uplus",!0);P(W,te,gt,"⊓","\\sqcap",!0);P(W,te,gt,"∗","\\ast");P(W,te,gt,"⊔","\\sqcup",!0);P(W,te,gt,"◯","\\bigcirc",!0);P(W,te,gt,"∙","\\bullet",!0);P(W,te,gt,"‡","\\ddagger");P(W,te,gt,"≀","\\wr",!0);P(W,te,gt,"⨿","\\amalg");P(W,te,gt,"&","\\And");P(W,te,de,"⟵","\\longleftarrow",!0);P(W,te,de,"⇐","\\Leftarrow",!0);P(W,te,de,"⟸","\\Longleftarrow",!0);P(W,te,de,"⟶","\\longrightarrow",!0);P(W,te,de,"⇒","\\Rightarrow",!0);P(W,te,de,"⟹","\\Longrightarrow",!0);P(W,te,de,"↔","\\leftrightarrow",!0);P(W,te,de,"⟷","\\longleftrightarrow",!0);P(W,te,de,"⇔","\\Leftrightarrow",!0);P(W,te,de,"⟺","\\Longleftrightarrow",!0);P(W,te,de,"↦","\\mapsto",!0);P(W,te,de,"⟼","\\longmapsto",!0);P(W,te,de,"↗","\\nearrow",!0);P(W,te,de,"↩","\\hookleftarrow",!0);P(W,te,de,"↪","\\hookrightarrow",!0);P(W,te,de,"↘","\\searrow",!0);P(W,te,de,"↼","\\leftharpoonup",!0);P(W,te,de,"⇀","\\rightharpoonup",!0);P(W,te,de,"↙","\\swarrow",!0);P(W,te,de,"↽","\\leftharpoondown",!0);P(W,te,de,"⇁","\\rightharpoondown",!0);P(W,te,de,"↖","\\nwarrow",!0);P(W,te,de,"⇌","\\rightleftharpoons",!0);P(W,fe,de,"≮","\\nless",!0);P(W,fe,de,"","\\@nleqslant");P(W,fe,de,"","\\@nleqq");P(W,fe,de,"⪇","\\lneq",!0);P(W,fe,de,"≨","\\lneqq",!0);P(W,fe,de,"","\\@lvertneqq");P(W,fe,de,"⋦","\\lnsim",!0);P(W,fe,de,"⪉","\\lnapprox",!0);P(W,fe,de,"⊀","\\nprec",!0);P(W,fe,de,"⋠","\\npreceq",!0);P(W,fe,de,"⋨","\\precnsim",!0);P(W,fe,de,"⪹","\\precnapprox",!0);P(W,fe,de,"≁","\\nsim",!0);P(W,fe,de,"","\\@nshortmid");P(W,fe,de,"∤","\\nmid",!0);P(W,fe,de,"⊬","\\nvdash",!0);P(W,fe,de,"⊭","\\nvDash",!0);P(W,fe,de,"⋪","\\ntriangleleft");P(W,fe,de,"⋬","\\ntrianglelefteq",!0);P(W,fe,de,"⊊","\\subsetneq",!0);P(W,fe,de,"","\\@varsubsetneq");P(W,fe,de,"⫋","\\subsetneqq",!0);P(W,fe,de,"","\\@varsubsetneqq");P(W,fe,de,"≯","\\ngtr",!0);P(W,fe,de,"","\\@ngeqslant");P(W,fe,de,"","\\@ngeqq");P(W,fe,de,"⪈","\\gneq",!0);P(W,fe,de,"≩","\\gneqq",!0);P(W,fe,de,"","\\@gvertneqq");P(W,fe,de,"⋧","\\gnsim",!0);P(W,fe,de,"⪊","\\gnapprox",!0);P(W,fe,de,"⊁","\\nsucc",!0);P(W,fe,de,"⋡","\\nsucceq",!0);P(W,fe,de,"⋩","\\succnsim",!0);P(W,fe,de,"⪺","\\succnapprox",!0);P(W,fe,de,"≆","\\ncong",!0);P(W,fe,de,"","\\@nshortparallel");P(W,fe,de,"∦","\\nparallel",!0);P(W,fe,de,"⊯","\\nVDash",!0);P(W,fe,de,"⋫","\\ntriangleright");P(W,fe,de,"⋭","\\ntrianglerighteq",!0);P(W,fe,de,"","\\@nsupseteqq");P(W,fe,de,"⊋","\\supsetneq",!0);P(W,fe,de,"","\\@varsupsetneq");P(W,fe,de,"⫌","\\supsetneqq",!0);P(W,fe,de,"","\\@varsupsetneqq");P(W,fe,de,"⊮","\\nVdash",!0);P(W,fe,de,"⪵","\\precneqq",!0);P(W,fe,de,"⪶","\\succneqq",!0);P(W,fe,de,"","\\@nsubseteqq");P(W,fe,gt,"⊴","\\unlhd");P(W,fe,gt,"⊵","\\unrhd");P(W,fe,de,"↚","\\nleftarrow",!0);P(W,fe,de,"↛","\\nrightarrow",!0);P(W,fe,de,"⇍","\\nLeftarrow",!0);P(W,fe,de,"⇏","\\nRightarrow",!0);P(W,fe,de,"↮","\\nleftrightarrow",!0);P(W,fe,de,"⇎","\\nLeftrightarrow",!0);P(W,fe,de,"△","\\vartriangle");P(W,fe,be,"ℏ","\\hslash");P(W,fe,be,"▽","\\triangledown");P(W,fe,be,"◊","\\lozenge");P(W,fe,be,"Ⓢ","\\circledS");P(W,fe,be,"®","\\circledR");P(Ve,fe,be,"®","\\circledR");P(W,fe,be,"∡","\\measuredangle",!0);P(W,fe,be,"∄","\\nexists");P(W,fe,be,"℧","\\mho");P(W,fe,be,"Ⅎ","\\Finv",!0);P(W,fe,be,"⅁","\\Game",!0);P(W,fe,be,"‵","\\backprime");P(W,fe,be,"▲","\\blacktriangle");P(W,fe,be,"▼","\\blacktriangledown");P(W,fe,be,"■","\\blacksquare");P(W,fe,be,"⧫","\\blacklozenge");P(W,fe,be,"★","\\bigstar");P(W,fe,be,"∢","\\sphericalangle",!0);P(W,fe,be,"∁","\\complement",!0);P(W,fe,be,"ð","\\eth",!0);P(Ve,te,be,"ð","ð");P(W,fe,be,"╱","\\diagup");P(W,fe,be,"╲","\\diagdown");P(W,fe,be,"□","\\square");P(W,fe,be,"□","\\Box");P(W,fe,be,"◊","\\Diamond");P(W,fe,be,"¥","\\yen",!0);P(Ve,fe,be,"¥","\\yen",!0);P(W,fe,be,"✓","\\checkmark",!0);P(Ve,fe,be,"✓","\\checkmark");P(W,fe,be,"ℶ","\\beth",!0);P(W,fe,be,"ℸ","\\daleth",!0);P(W,fe,be,"ℷ","\\gimel",!0);P(W,fe,be,"ϝ","\\digamma",!0);P(W,fe,be,"ϰ","\\varkappa");P(W,fe,Fa,"┌","\\@ulcorner",!0);P(W,fe,Li,"┐","\\@urcorner",!0);P(W,fe,Fa,"└","\\@llcorner",!0);P(W,fe,Li,"┘","\\@lrcorner",!0);P(W,fe,de,"≦","\\leqq",!0);P(W,fe,de,"⩽","\\leqslant",!0);P(W,fe,de,"⪕","\\eqslantless",!0);P(W,fe,de,"≲","\\lesssim",!0);P(W,fe,de,"⪅","\\lessapprox",!0);P(W,fe,de,"≊","\\approxeq",!0);P(W,fe,gt,"⋖","\\lessdot");P(W,fe,de,"⋘","\\lll",!0);P(W,fe,de,"≶","\\lessgtr",!0);P(W,fe,de,"⋚","\\lesseqgtr",!0);P(W,fe,de,"⪋","\\lesseqqgtr",!0);P(W,fe,de,"≑","\\doteqdot");P(W,fe,de,"≓","\\risingdotseq",!0);P(W,fe,de,"≒","\\fallingdotseq",!0);P(W,fe,de,"∽","\\backsim",!0);P(W,fe,de,"⋍","\\backsimeq",!0);P(W,fe,de,"⫅","\\subseteqq",!0);P(W,fe,de,"⋐","\\Subset",!0);P(W,fe,de,"⊏","\\sqsubset",!0);P(W,fe,de,"≼","\\preccurlyeq",!0);P(W,fe,de,"⋞","\\curlyeqprec",!0);P(W,fe,de,"≾","\\precsim",!0);P(W,fe,de,"⪷","\\precapprox",!0);P(W,fe,de,"⊲","\\vartriangleleft");P(W,fe,de,"⊴","\\trianglelefteq");P(W,fe,de,"⊨","\\vDash",!0);P(W,fe,de,"⊪","\\Vvdash",!0);P(W,fe,de,"⌣","\\smallsmile");P(W,fe,de,"⌢","\\smallfrown");P(W,fe,de,"≏","\\bumpeq",!0);P(W,fe,de,"≎","\\Bumpeq",!0);P(W,fe,de,"≧","\\geqq",!0);P(W,fe,de,"⩾","\\geqslant",!0);P(W,fe,de,"⪖","\\eqslantgtr",!0);P(W,fe,de,"≳","\\gtrsim",!0);P(W,fe,de,"⪆","\\gtrapprox",!0);P(W,fe,gt,"⋗","\\gtrdot");P(W,fe,de,"⋙","\\ggg",!0);P(W,fe,de,"≷","\\gtrless",!0);P(W,fe,de,"⋛","\\gtreqless",!0);P(W,fe,de,"⪌","\\gtreqqless",!0);P(W,fe,de,"≖","\\eqcirc",!0);P(W,fe,de,"≗","\\circeq",!0);P(W,fe,de,"≜","\\triangleq",!0);P(W,fe,de,"∼","\\thicksim");P(W,fe,de,"≈","\\thickapprox");P(W,fe,de,"⫆","\\supseteqq",!0);P(W,fe,de,"⋑","\\Supset",!0);P(W,fe,de,"⊐","\\sqsupset",!0);P(W,fe,de,"≽","\\succcurlyeq",!0);P(W,fe,de,"⋟","\\curlyeqsucc",!0);P(W,fe,de,"≿","\\succsim",!0);P(W,fe,de,"⪸","\\succapprox",!0);P(W,fe,de,"⊳","\\vartriangleright");P(W,fe,de,"⊵","\\trianglerighteq");P(W,fe,de,"⊩","\\Vdash",!0);P(W,fe,de,"∣","\\shortmid");P(W,fe,de,"∥","\\shortparallel");P(W,fe,de,"≬","\\between",!0);P(W,fe,de,"⋔","\\pitchfork",!0);P(W,fe,de,"∝","\\varpropto");P(W,fe,de,"◀","\\blacktriangleleft");P(W,fe,de,"∴","\\therefore",!0);P(W,fe,de,"∍","\\backepsilon");P(W,fe,de,"▶","\\blacktriangleright");P(W,fe,de,"∵","\\because",!0);P(W,fe,de,"⋘","\\llless");P(W,fe,de,"⋙","\\gggtr");P(W,fe,gt,"⊲","\\lhd");P(W,fe,gt,"⊳","\\rhd");P(W,fe,de,"≂","\\eqsim",!0);P(W,te,de,"⋈","\\Join");P(W,fe,de,"≑","\\Doteq",!0);P(W,fe,gt,"∔","\\dotplus",!0);P(W,fe,gt,"∖","\\smallsetminus");P(W,fe,gt,"⋒","\\Cap",!0);P(W,fe,gt,"⋓","\\Cup",!0);P(W,fe,gt,"⩞","\\doublebarwedge",!0);P(W,fe,gt,"⊟","\\boxminus",!0);P(W,fe,gt,"⊞","\\boxplus",!0);P(W,fe,gt,"⋇","\\divideontimes",!0);P(W,fe,gt,"⋉","\\ltimes",!0);P(W,fe,gt,"⋊","\\rtimes",!0);P(W,fe,gt,"⋋","\\leftthreetimes",!0);P(W,fe,gt,"⋌","\\rightthreetimes",!0);P(W,fe,gt,"⋏","\\curlywedge",!0);P(W,fe,gt,"⋎","\\curlyvee",!0);P(W,fe,gt,"⊝","\\circleddash",!0);P(W,fe,gt,"⊛","\\circledast",!0);P(W,fe,gt,"⋅","\\centerdot");P(W,fe,gt,"⊺","\\intercal",!0);P(W,fe,gt,"⋒","\\doublecap");P(W,fe,gt,"⋓","\\doublecup");P(W,fe,gt,"⊠","\\boxtimes",!0);P(W,fe,de,"⇢","\\dashrightarrow",!0);P(W,fe,de,"⇠","\\dashleftarrow",!0);P(W,fe,de,"⇇","\\leftleftarrows",!0);P(W,fe,de,"⇆","\\leftrightarrows",!0);P(W,fe,de,"⇚","\\Lleftarrow",!0);P(W,fe,de,"↞","\\twoheadleftarrow",!0);P(W,fe,de,"↢","\\leftarrowtail",!0);P(W,fe,de,"↫","\\looparrowleft",!0);P(W,fe,de,"⇋","\\leftrightharpoons",!0);P(W,fe,de,"↶","\\curvearrowleft",!0);P(W,fe,de,"↺","\\circlearrowleft",!0);P(W,fe,de,"↰","\\Lsh",!0);P(W,fe,de,"⇈","\\upuparrows",!0);P(W,fe,de,"↿","\\upharpoonleft",!0);P(W,fe,de,"⇃","\\downharpoonleft",!0);P(W,te,de,"⊶","\\origof",!0);P(W,te,de,"⊷","\\imageof",!0);P(W,fe,de,"⊸","\\multimap",!0);P(W,fe,de,"↭","\\leftrightsquigarrow",!0);P(W,fe,de,"⇉","\\rightrightarrows",!0);P(W,fe,de,"⇄","\\rightleftarrows",!0);P(W,fe,de,"↠","\\twoheadrightarrow",!0);P(W,fe,de,"↣","\\rightarrowtail",!0);P(W,fe,de,"↬","\\looparrowright",!0);P(W,fe,de,"↷","\\curvearrowright",!0);P(W,fe,de,"↻","\\circlearrowright",!0);P(W,fe,de,"↱","\\Rsh",!0);P(W,fe,de,"⇊","\\downdownarrows",!0);P(W,fe,de,"↾","\\upharpoonright",!0);P(W,fe,de,"⇂","\\downharpoonright",!0);P(W,fe,de,"⇝","\\rightsquigarrow",!0);P(W,fe,de,"⇝","\\leadsto");P(W,fe,de,"⇛","\\Rrightarrow",!0);P(W,fe,de,"↾","\\restriction");P(W,te,be,"‘","`");P(W,te,be,"$","\\$");P(Ve,te,be,"$","\\$");P(Ve,te,be,"$","\\textdollar");P(W,te,be,"%","\\%");P(Ve,te,be,"%","\\%");P(W,te,be,"_","\\_");P(Ve,te,be,"_","\\_");P(Ve,te,be,"_","\\textunderscore");P(W,te,be,"∠","\\angle",!0);P(W,te,be,"∞","\\infty",!0);P(W,te,be,"′","\\prime");P(W,te,be,"△","\\triangle");P(W,te,be,"Γ","\\Gamma",!0);P(W,te,be,"Δ","\\Delta",!0);P(W,te,be,"Θ","\\Theta",!0);P(W,te,be,"Λ","\\Lambda",!0);P(W,te,be,"Ξ","\\Xi",!0);P(W,te,be,"Π","\\Pi",!0);P(W,te,be,"Σ","\\Sigma",!0);P(W,te,be,"Υ","\\Upsilon",!0);P(W,te,be,"Φ","\\Phi",!0);P(W,te,be,"Ψ","\\Psi",!0);P(W,te,be,"Ω","\\Omega",!0);P(W,te,be,"A","Α");P(W,te,be,"B","Β");P(W,te,be,"E","Ε");P(W,te,be,"Z","Ζ");P(W,te,be,"H","Η");P(W,te,be,"I","Ι");P(W,te,be,"K","Κ");P(W,te,be,"M","Μ");P(W,te,be,"N","Ν");P(W,te,be,"O","Ο");P(W,te,be,"P","Ρ");P(W,te,be,"T","Τ");P(W,te,be,"X","Χ");P(W,te,be,"¬","\\neg",!0);P(W,te,be,"¬","\\lnot");P(W,te,be,"⊤","\\top");P(W,te,be,"⊥","\\bot");P(W,te,be,"∅","\\emptyset");P(W,fe,be,"∅","\\varnothing");P(W,te,Xt,"α","\\alpha",!0);P(W,te,Xt,"β","\\beta",!0);P(W,te,Xt,"γ","\\gamma",!0);P(W,te,Xt,"δ","\\delta",!0);P(W,te,Xt,"ϵ","\\epsilon",!0);P(W,te,Xt,"ζ","\\zeta",!0);P(W,te,Xt,"η","\\eta",!0);P(W,te,Xt,"θ","\\theta",!0);P(W,te,Xt,"ι","\\iota",!0);P(W,te,Xt,"κ","\\kappa",!0);P(W,te,Xt,"λ","\\lambda",!0);P(W,te,Xt,"μ","\\mu",!0);P(W,te,Xt,"ν","\\nu",!0);P(W,te,Xt,"ξ","\\xi",!0);P(W,te,Xt,"ο","\\omicron",!0);P(W,te,Xt,"π","\\pi",!0);P(W,te,Xt,"ρ","\\rho",!0);P(W,te,Xt,"σ","\\sigma",!0);P(W,te,Xt,"τ","\\tau",!0);P(W,te,Xt,"υ","\\upsilon",!0);P(W,te,Xt,"ϕ","\\phi",!0);P(W,te,Xt,"χ","\\chi",!0);P(W,te,Xt,"ψ","\\psi",!0);P(W,te,Xt,"ω","\\omega",!0);P(W,te,Xt,"ε","\\varepsilon",!0);P(W,te,Xt,"ϑ","\\vartheta",!0);P(W,te,Xt,"ϖ","\\varpi",!0);P(W,te,Xt,"ϱ","\\varrho",!0);P(W,te,Xt,"ς","\\varsigma",!0);P(W,te,Xt,"φ","\\varphi",!0);P(W,te,gt,"∗","*",!0);P(W,te,gt,"+","+");P(W,te,gt,"−","-",!0);P(W,te,gt,"⋅","\\cdot",!0);P(W,te,gt,"∘","\\circ",!0);P(W,te,gt,"÷","\\div",!0);P(W,te,gt,"±","\\pm",!0);P(W,te,gt,"×","\\times",!0);P(W,te,gt,"∩","\\cap",!0);P(W,te,gt,"∪","\\cup",!0);P(W,te,gt,"∖","\\setminus",!0);P(W,te,gt,"∧","\\land");P(W,te,gt,"∨","\\lor");P(W,te,gt,"∧","\\wedge",!0);P(W,te,gt,"∨","\\vee",!0);P(W,te,be,"√","\\surd");P(W,te,Fa,"⟨","\\langle",!0);P(W,te,Fa,"∣","\\lvert");P(W,te,Fa,"∥","\\lVert");P(W,te,Li,"?","?");P(W,te,Li,"!","!");P(W,te,Li,"⟩","\\rangle",!0);P(W,te,Li,"∣","\\rvert");P(W,te,Li,"∥","\\rVert");P(W,te,de,"=","=");P(W,te,de,":",":");P(W,te,de,"≈","\\approx",!0);P(W,te,de,"≅","\\cong",!0);P(W,te,de,"≥","\\ge");P(W,te,de,"≥","\\geq",!0);P(W,te,de,"←","\\gets");P(W,te,de,">","\\gt",!0);P(W,te,de,"∈","\\in",!0);P(W,te,de,"","\\@not");P(W,te,de,"⊂","\\subset",!0);P(W,te,de,"⊃","\\supset",!0);P(W,te,de,"⊆","\\subseteq",!0);P(W,te,de,"⊇","\\supseteq",!0);P(W,fe,de,"⊈","\\nsubseteq",!0);P(W,fe,de,"⊉","\\nsupseteq",!0);P(W,te,de,"⊨","\\models");P(W,te,de,"←","\\leftarrow",!0);P(W,te,de,"≤","\\le");P(W,te,de,"≤","\\leq",!0);P(W,te,de,"<","\\lt",!0);P(W,te,de,"→","\\rightarrow",!0);P(W,te,de,"→","\\to");P(W,fe,de,"≱","\\ngeq",!0);P(W,fe,de,"≰","\\nleq",!0);P(W,te,Wl," ","\\ ");P(W,te,Wl," ","\\space");P(W,te,Wl," ","\\nobreakspace");P(Ve,te,Wl," ","\\ ");P(Ve,te,Wl," "," ");P(Ve,te,Wl," ","\\space");P(Ve,te,Wl," ","\\nobreakspace");P(W,te,Wl,"","\\nobreak");P(W,te,Wl,"","\\allowbreak");P(W,te,fg,",",",");P(W,te,fg,";",";");P(W,fe,gt,"⊼","\\barwedge",!0);P(W,fe,gt,"⊻","\\veebar",!0);P(W,te,gt,"⊙","\\odot",!0);P(W,te,gt,"⊕","\\oplus",!0);P(W,te,gt,"⊗","\\otimes",!0);P(W,te,be,"∂","\\partial",!0);P(W,te,gt,"⊘","\\oslash",!0);P(W,fe,gt,"⊚","\\circledcirc",!0);P(W,fe,gt,"⊡","\\boxdot",!0);P(W,te,gt,"△","\\bigtriangleup");P(W,te,gt,"▽","\\bigtriangledown");P(W,te,gt,"†","\\dagger");P(W,te,gt,"⋄","\\diamond");P(W,te,gt,"⋆","\\star");P(W,te,gt,"◃","\\triangleleft");P(W,te,gt,"▹","\\triangleright");P(W,te,Fa,"{","\\{");P(Ve,te,be,"{","\\{");P(Ve,te,be,"{","\\textbraceleft");P(W,te,Li,"}","\\}");P(Ve,te,be,"}","\\}");P(Ve,te,be,"}","\\textbraceright");P(W,te,Fa,"{","\\lbrace");P(W,te,Li,"}","\\rbrace");P(W,te,Fa,"[","\\lbrack",!0);P(Ve,te,be,"[","\\lbrack",!0);P(W,te,Li,"]","\\rbrack",!0);P(Ve,te,be,"]","\\rbrack",!0);P(W,te,Fa,"(","\\lparen",!0);P(W,te,Li,")","\\rparen",!0);P(Ve,te,be,"<","\\textless",!0);P(Ve,te,be,">","\\textgreater",!0);P(W,te,Fa,"⌊","\\lfloor",!0);P(W,te,Li,"⌋","\\rfloor",!0);P(W,te,Fa,"⌈","\\lceil",!0);P(W,te,Li,"⌉","\\rceil",!0);P(W,te,be,"\\","\\backslash");P(W,te,be,"∣","|");P(W,te,be,"∣","\\vert");P(Ve,te,be,"|","\\textbar",!0);P(W,te,be,"∥","\\|");P(W,te,be,"∥","\\Vert");P(Ve,te,be,"∥","\\textbardbl");P(Ve,te,be,"~","\\textasciitilde");P(Ve,te,be,"\\","\\textbackslash");P(Ve,te,be,"^","\\textasciicircum");P(W,te,de,"↑","\\uparrow",!0);P(W,te,de,"⇑","\\Uparrow",!0);P(W,te,de,"↓","\\downarrow",!0);P(W,te,de,"⇓","\\Downarrow",!0);P(W,te,de,"↕","\\updownarrow",!0);P(W,te,de,"⇕","\\Updownarrow",!0);P(W,te,Ss,"∐","\\coprod");P(W,te,Ss,"⋁","\\bigvee");P(W,te,Ss,"⋀","\\bigwedge");P(W,te,Ss,"⨄","\\biguplus");P(W,te,Ss,"⋂","\\bigcap");P(W,te,Ss,"⋃","\\bigcup");P(W,te,Ss,"∫","\\int");P(W,te,Ss,"∫","\\intop");P(W,te,Ss,"∬","\\iint");P(W,te,Ss,"∭","\\iiint");P(W,te,Ss,"∏","\\prod");P(W,te,Ss,"∑","\\sum");P(W,te,Ss,"⨂","\\bigotimes");P(W,te,Ss,"⨁","\\bigoplus");P(W,te,Ss,"⨀","\\bigodot");P(W,te,Ss,"∮","\\oint");P(W,te,Ss,"∯","\\oiint");P(W,te,Ss,"∰","\\oiiint");P(W,te,Ss,"⨆","\\bigsqcup");P(W,te,Ss,"∫","\\smallint");P(Ve,te,dp,"…","\\textellipsis");P(W,te,dp,"…","\\mathellipsis");P(Ve,te,dp,"…","\\ldots",!0);P(W,te,dp,"…","\\ldots",!0);P(W,te,dp,"⋯","\\@cdots",!0);P(W,te,dp,"⋱","\\ddots",!0);P(W,te,be,"⋮","\\varvdots");P(Ve,te,be,"⋮","\\varvdots");P(W,te,Dr,"ˊ","\\acute");P(W,te,Dr,"ˋ","\\grave");P(W,te,Dr,"¨","\\ddot");P(W,te,Dr,"~","\\tilde");P(W,te,Dr,"ˉ","\\bar");P(W,te,Dr,"˘","\\breve");P(W,te,Dr,"ˇ","\\check");P(W,te,Dr,"^","\\hat");P(W,te,Dr,"⃗","\\vec");P(W,te,Dr,"˙","\\dot");P(W,te,Dr,"˚","\\mathring");P(W,te,Xt,"","\\@imath");P(W,te,Xt,"","\\@jmath");P(W,te,be,"ı","ı");P(W,te,be,"ȷ","ȷ");P(Ve,te,be,"ı","\\i",!0);P(Ve,te,be,"ȷ","\\j",!0);P(Ve,te,be,"ß","\\ss",!0);P(Ve,te,be,"æ","\\ae",!0);P(Ve,te,be,"œ","\\oe",!0);P(Ve,te,be,"ø","\\o",!0);P(Ve,te,be,"Æ","\\AE",!0);P(Ve,te,be,"Œ","\\OE",!0);P(Ve,te,be,"Ø","\\O",!0);P(Ve,te,Dr,"ˊ","\\'");P(Ve,te,Dr,"ˋ","\\`");P(Ve,te,Dr,"ˆ","\\^");P(Ve,te,Dr,"˜","\\~");P(Ve,te,Dr,"ˉ","\\=");P(Ve,te,Dr,"˘","\\u");P(Ve,te,Dr,"˙","\\.");P(Ve,te,Dr,"¸","\\c");P(Ve,te,Dr,"˚","\\r");P(Ve,te,Dr,"ˇ","\\v");P(Ve,te,Dr,"¨",'\\"');P(Ve,te,Dr,"˝","\\H");P(Ve,te,Dr,"◯","\\textcircled");var OF={"--":!0,"---":!0,"``":!0,"''":!0};P(Ve,te,be,"–","--",!0);P(Ve,te,be,"–","\\textendash");P(Ve,te,be,"—","---",!0);P(Ve,te,be,"—","\\textemdash");P(Ve,te,be,"‘","`",!0);P(Ve,te,be,"‘","\\textquoteleft");P(Ve,te,be,"’","'",!0);P(Ve,te,be,"’","\\textquoteright");P(Ve,te,be,"“","``",!0);P(Ve,te,be,"“","\\textquotedblleft");P(Ve,te,be,"”","''",!0);P(Ve,te,be,"”","\\textquotedblright");P(W,te,be,"°","\\degree",!0);P(Ve,te,be,"°","\\degree");P(Ve,te,be,"°","\\textdegree",!0);P(W,te,be,"£","\\pounds");P(W,te,be,"£","\\mathsterling",!0);P(Ve,te,be,"£","\\pounds");P(Ve,te,be,"£","\\textsterling",!0);P(W,fe,be,"✠","\\maltese");P(Ve,fe,be,"✠","\\maltese");var VT='0123456789/@."';for(var c4=0;c4{var n=e.charCodeAt(0),t=e.charCodeAt(1),r=(n-55296)*1024+(t-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return nR[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return pDn[i]}else{if(r===120485||r===120486)return nR[0];if(120486{if(a_(e.classes)!==a_(n.classes)||e.skew!==n.skew||e.maxFontSize!==n.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==n.style[r])return!1;for(var s of Object.keys(n.style))if(e.style[s]!==n.style[s])return!1;return!0},DF=e=>{for(var n=0;nt&&(t=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Xe=function(n,t,r,s){var i=new fp(n,t,r,s);return SC(i),i},c_=(e,n,t,r)=>new fp(e,n,t,r),Gh=function(n,t,r){var s=Xe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=st(s.height),s.maxFontSize=1,s},bDn=function(n,t,r,s){var i=new Ky(n,t,r,s);return SC(i),i},Ql=function(n){var t=new _p(n);return SC(t),t},Vh=function(n,t){return n instanceof _p?Xe([],[n],t):n},yDn=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,i=s,a=1;a{var t=Xe(["mspace"],[],n),r=Hr(e,n);return t.style.marginRight=st(r),t},W1=(e,n,t)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return n==="textbf"&&t==="textit"?s="BoldItalic":n==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",r+"-"+s},uk={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},IF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},$F=function(n,t){var[r,s,i]=IF[n],a=new o_(r),o=new Ul([a],{width:st(s),height:st(i),style:"width:"+st(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=c_(["overlay"],[o],t);return c.height=i,c.style.height=st(i),c.style.width=st(s),c},Pr={number:3,unit:"mu"},G_={number:4,unit:"mu"},wl={number:5,unit:"mu"},xDn={mord:{mop:Pr,mbin:G_,mrel:wl,minner:Pr},mop:{mord:Pr,mop:Pr,mrel:wl,minner:Pr},mbin:{mord:G_,mop:G_,mopen:G_,minner:G_},mrel:{mord:wl,mop:wl,mopen:wl,minner:wl},mopen:{},mclose:{mop:Pr,mbin:G_,mrel:wl,minner:Pr},mpunct:{mord:Pr,mop:Pr,mrel:wl,mopen:Pr,mclose:Pr,mpunct:Pr,minner:Pr},minner:{mord:Pr,mop:Pr,mbin:G_,mrel:wl,mopen:Pr,mpunct:Pr,minner:Pr}},wDn={mord:{mop:Pr},mop:{mord:Pr,mop:Pr},mbin:{},mrel:{},mopen:{},mclose:{mop:Pr},mpunct:{},minner:{mop:Pr}},BF={},Tb={},Rb={};function pt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},c=0;c{var v=k.classes[0],y=w.classes[0];v==="mbin"&&SDn.has(y)?k.classes[0]="mord":y==="mbin"&&kDn.has(v)&&(w.classes[0]="mord")},{node:f},p,m),_k(i,(w,k)=>{var v,y,x=dk(k),b=dk(w),C=x&&b?w.hasClass("mtight")?(v=wDn[x])==null?void 0:v[b]:(y=xDn[x])==null?void 0:y[b]:null;if(C)return LF(C,u)},{node:f},p,m),i},_k=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(f+1,0,p),a++})(a)}s&&n.pop()},PF=function(n){return n instanceof _p||n instanceof Ky||n instanceof fp&&n.hasClass("enclosing")?n:null},fk=function(n,t){var r=PF(n);if(r){var s=r.children;if(s.length){if(t==="right")return fk(s[s.length-1],"right");if(t==="left")return fk(s[0],"left")}}return n},dk=function(n,t){if(!n)return null;t&&(n=fk(n,t));var r=n.classes[0];return EDn[r]||null},pm=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Xe(t.concat(r))},rr=function(n,t,r){if(!n)return Xe();if(Tb[n.type]){var s=Tb[n.type](n,t);if(r&&t.size!==r.size){s=Xe(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new et("Got group of unknown type: '"+n.type+"'")};function Q1(e,n){var t=Xe(["base"],e,n),r=Xe(["strut"]);return r.style.height=st(t.height+t.depth),t.depth&&(r.style.verticalAlign=st(-t.depth)),t.children.unshift(r),t}function hk(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Bs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(Q1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(Q1(a,n));var u;t?(u=Q1(Bs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var d=Xe(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=st(d.height+d.depth),d.depth&&(f.style.verticalAlign=st(-d.depth))}return d}function FF(e){return new _p(e)}class tt{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=a_(this.classes));for(var r=0;r0&&(n+=' class ="'+gi(a_(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class ks{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return gi(this.toText())}toText(){return this.text}}class HF{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",st(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var NDn=new Set(["\\imath","\\jmath"]),zDn=new Set(["mrow","mtable"]),bo=function(n,t,r){return Mr[t][n]&&Mr[t][n].replace&&n.charCodeAt(0)!==55349&&!(OF.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Mr[t][n].replace),new ks(n)},CC=function(n){return n.length===1?n[0]:new tt("mrow",n)},jDn={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},EC=(e,n)=>{if(e.mode==="text"){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold"}var t=n.font;if(!t||t==="mathnormal")return null;var r=e.mode,s=jDn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(NDn.has(i))return null;if(Mr[r][i]){var a=Mr[r][i].replace;a&&(i=a)}var o=uk[t].fontName;return wC(i,o,r)?uk[t].variant:null};function f4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof ks&&n.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof ks&&t.text===","}else return!1}var Ha=function(n,t,r){if(n.length===1){var s=kr(n[0],t);return r&&s instanceof tt&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||f4(a))){var u=c.children[0];u instanceof tt&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var d=a.children[0];if(d instanceof ks&&d.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof ks&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(c),a=c}return i},l_=function(n,t,r){return CC(Ha(n,t,r))},kr=function(n,t){if(!n)return new tt("mrow");if(Rb[n.type])return Rb[n.type](n,t);throw new et("Got group of unknown type: '"+n.type+"'")};function rR(e,n,t,r,s){var i=Ha(e,t),a;i.length===1&&i[0]instanceof tt&&zDn.has(i[0].type)?a=i[0]:a=new tt("mrow",i);var o=new tt("annotation",[new ks(n)]);o.setAttribute("encoding","application/x-tex");var c=new tt("semantics",[a,o]),u=new tt("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var d=s?"katex":"katex-mathml";return Xe([d],[u])}var ADn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],iR=function(n,t){return t.size<2?n:ADn[n-1][t.size-1]};class Nl{constructor(n){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=n.style,this.color=n.color,this.size=n.size||Nl.BASESIZE,this.textSize=n.textSize||this.size,this.phantom=!!n.phantom,this.font=n.font||"",this.fontFamily=n.fontFamily||"",this.fontWeight=n.fontWeight||"",this.fontShape=n.fontShape||"",this.sizeMultiplier=sR[this.size-1],this.maxSize=n.maxSize,this.minRuleThickness=n.minRuleThickness,this._fontMetrics=void 0}extend(n){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,n),new Nl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:iR(this.textSize,n)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(n){return this.size===n&&this.textSize===n?this:this.extend({style:this.style.text(),size:n,textSize:n,sizeMultiplier:sR[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=iR(Nl.BASESIZE,n);return this.size===t&&this.textSize===Nl.BASESIZE&&this.style===n?this:this.extend({style:n,size:t})}havingBaseSizing(){var n;switch(this.style.id){case 4:case 5:n=3;break;case 6:case 7:n=1;break;default:n=6}return this.extend({style:this.style.text(),size:n})}withColor(n){return this.extend({color:n})}withPhantom(){return this.extend({phantom:!0})}withFont(n){return this.extend({font:n})}withTextFontFamily(n){return this.extend({fontFamily:n,font:""})}withTextFontWeight(n){return this.extend({fontWeight:n,font:""})}withTextFontShape(n){return this.extend({fontShape:n,font:""})}sizingClasses(n){return n.size!==this.size?["sizing","reset-size"+n.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Nl.BASESIZE?["sizing","reset-size"+this.size,"size"+Nl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=dDn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Nl.BASESIZE=6;var qF=function(n){return new Nl({style:n.displayMode?on.DISPLAY:on.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},UF=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Xe(r,[n])}return n},TDn=function(n,t,r){var s=qF(r),i;if(r.output==="mathml")return rR(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=hk(n,s);i=Xe(["katex"],[a])}else{var o=rR(n,t,s,r.displayMode,!1),c=hk(n,s);i=Xe(["katex"],[o,c])}return UF(i,r)},RDn=function(n,t,r){var s=qF(r),i=hk(n,s),a=Xe(["katex"],[i]);return UF(a,r)},MDn={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Xy=function(n){var t=new tt("mo",[new ks(MDn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},ODn={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},DDn=new Set(["widehat","widecheck","widetilde","utilde"]),Yy=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(DDn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,d,f,p;if(u>5)c==="widehat"||c==="widecheck"?(d=420,o=2364,p=.42,f=c+"4"):(d=312,o=2340,p=.34,f="tilde4");else{var m=[1,1,2,2,3,3][u];c==="widehat"||c==="widecheck"?(o=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=c+m):(o=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var w=new o_(f),k=new Ul([w],{width:"100%",height:st(p),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:c_([],[k],t),minWidth:0,height:p}}else{var v=[],y=ODn[c];if(!y)throw new Error('No SVG data for "'+c+'".');var[x,b,C]=y,N=C/1e3,z=x.length,A,j;if(z===1){if(y.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],j=[y[3]]}else if(z===2)A=["halfarrow-left","halfarrow-right"],j=["xMinYMin","xMaxYMin"];else if(z===3)A=["brace-left","brace-center","brace-right"],j=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+z+" children.");for(var M=0;M0&&(s.style.minWidth=st(i)),s},LDn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Xe(["stretchy",t],[],i),t==="fbox"){var c=i.color&&i.getColor();c&&(a.style.borderColor=c)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new sk({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new sk({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Ul(u,{width:"100%",height:st(o)});a=c_([],[d],i)}return a.height=o,a.style.height=st(o),a},IDn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},$Dn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function BDn(e){return e in IDn}function bn(e,n){if(!e||e.type!==n)throw new Error("Expected node of type "+n+", but got "+(e?"node of type "+e.type:String(e)));return e}function Zy(e){var n=Jy(e);if(!n)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return n}function Jy(e){return e&&(e.type==="atom"||$Dn.hasOwnProperty(e.type))?e:null}var GF=e=>{if(e instanceof Ia)return e;if(_Dn(e)&&e.children.length===1)return GF(e.children[0])},NC=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=bn(e.base,"accent"),t=r.base,e.base=t,s=uDn(rr(e,n)),e.base=r):(r=bn(e,"accent"),t=r.base);var i=rr(t,n.havingCrampedStyle()),a=r.isShifty&&Kl(t),o=0;if(a){var c,u;o=(c=(u=GF(i))==null?void 0:u.skew)!=null?c:0}var d=r.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Yy(r,n),p=tr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+st(2*o)+")",marginLeft:st(2*o)}:void 0}]});else{var m,w;r.label==="\\vec"?(m=$F("vec",n),w=IF.vec[1]):(m=Qy({mode:r.mode,text:r.label},n,"textord"),m=lDn(m),m.italic=0,w=m.width,d&&(f+=m.depth)),p=Xe(["accent-body"],[m]);var k=r.label==="\\textcircled";k&&(p.classes.push("accent-full"),f=i.height);var v=o;k||(v-=w/2),p.style.left=st(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=tr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var y=Xe(["mord","accent"],[p],n);return s?(s.children[0]=y,s.height=Math.max(y.height,s.height),s.classes[0]="mord",s):y},VF=(e,n)=>{var t=e.isStretchy?Xy(e.label):new tt("mo",[bo(e.label,e.mode)]),r=new tt("mover",[kr(e.base,n),t]);return r.setAttribute("accent","true"),r},PDn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));pt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=Mb(n[0]),r=!PDn.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:t}},htmlBuilder:NC,mathmlBuilder:VF});pt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:NC,mathmlBuilder:VF});pt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=rr(e.base,n),r=Yy(e,n),s=e.label==="\\utilde"?.12:0,i=tr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Xe(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Xy(e.label),r=new tt("munder",[kr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var X1=e=>{var n=new tt("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};pt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=Vh(rr(e.body,r,n),n),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;e.below&&(r=n.havingStyle(t.sub()),a=Vh(rr(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Yy(e,n),c=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var d;if(a){var f=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;d=tr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:f}]})}else d=tr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Xe(["mrel","x-arrow"],[d],n)},mathmlBuilder(e,n){var t=Xy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=X1(kr(e.body,n));if(e.below){var i=X1(kr(e.below,n));r=new tt("munderover",[t,i,s])}else r=new tt("mover",[t,s])}else if(e.below){var a=X1(kr(e.below,n));r=new tt("munder",[t,a])}else r=X1(),r=new tt("mover",[t,r]);return r}});function KF(e,n){var t=Bs(e.body,n,!0);return Xe([e.mclass],t,n)}function WF(e,n){var t,r=Ha(e.body,n);return e.mclass==="minner"?t=new tt("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new tt("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new tt("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}pt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:ws(s),isCharacterBox:Kl(s)}},htmlBuilder:KF,mathmlBuilder:WF});var ex=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};pt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:ex(n[0]),body:ws(n[1]),isCharacterBox:Kl(n[1])}}});pt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],i=n[0],a;r!=="\\stackrel"?a=ex(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ws(s)},c={type:"supsub",mode:i.mode,base:o,sup:r==="\\underset"?null:i,sub:r==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:a,body:[c],isCharacterBox:Kl(c)}},htmlBuilder:KF,mathmlBuilder:WF});pt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:ex(n[0]),body:ws(n[0])}},htmlBuilder(e,n){var t=Bs(e.body,n,!0),r=Xe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Ha(e.body,n),r=new tt("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var FDn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},aR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),oR=e=>e.type==="textord"&&e.text==="@",HDn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function qDn(e,n,t){var r=FDn[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[n[0]],[n[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[n[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},a=t.callFunction("\\Big",[i],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function UDn(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){n[n.length-1].length===0&&n.pop();break}else throw new et("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var f=0;f<2;f++){for(var p=!0,m=c+1;mAV=|." after @',a[c]);var w=qDn(u,d,e),k={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(k),o=aR()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}pt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=Vh(rr(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=st(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new tt("mrow",[kr(e.label,n)]);return t=new tt("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new tt("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});pt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=Vh(rr(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new tt("mrow",[kr(e.fragment,n)])}});pt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=bn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new et("\\@char with invalid code point "+i);return c<=65535?u=String.fromCharCode(c):(c-=65536,u=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var QF=(e,n)=>{var t=Bs(e.body,n.withColor(e.color),!1);return Ql(t)},XF=(e,n)=>{var t=Ha(e.body,n.withColor(e.color)),r=new tt("mstyle",t);return r.setAttribute("mathcolor",e.color),r};pt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=bn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ws(s)}},htmlBuilder:QF,mathmlBuilder:XF});pt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=bn(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var i=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:i}},htmlBuilder:QF,mathmlBuilder:XF});pt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:s&&bn(s,"size").value}},htmlBuilder(e,n){var t=Xe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=st(Hr(e.size,n)))),t},mathmlBuilder(e,n){var t=new tt("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",st(Hr(e.size,n)))),t}});var pk={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},YF=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new et("Expected a control sequence",e);return n},GDn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},ZF=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};pt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(pk[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=pk[r.text]),bn(n.parseFunction(),"internal");throw new et("Invalid token after macro prefix",r)}});pt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new et("Expected a control sequence",r);for(var i=0,a,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){a=n.gullet.future(),o[i].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new et('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new et('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new et("Expected a macro definition");o[i].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return a&&c.unshift(a),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:i,delimiters:o},t===pk[t]),{type:"internal",mode:n.mode}}});pt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=YF(n.gullet.popToken());n.gullet.consumeSpaces();var s=GDn(n);return ZF(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});pt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=YF(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return ZF(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var N0=function(n,t,r){var s=Mr.math[n]&&Mr.math[n].replace,i=wC(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},zC=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Xe(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},JF=function(n,t,r){var s=t.havingBaseStyle(r),i=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=st(i),n.height-=i,n.depth+=i},VDn=function(n,t,r,s,i,a){var o=Ti(n,"Main-Regular",i,s),c=zC(o,t,s,a);return JF(c,s,t),c},KDn=function(n,t,r,s){return Ti(n,"Size"+t+"-Regular",r,s)},eH=function(n,t,r,s,i,a){var o=KDn(n,t,i,s),c=zC(Xe(["delimsizing","size"+t],[o],s),on.TEXT,s,a);return r&&JF(c,s,on.TEXT),c},d4=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Xe(["delimsizinginner",s],[Xe([],[Ti(n,t,r)])]);return{type:"elem",elem:i}},h4=function(n,t,r){var s=Nc["Size4-Regular"][n.charCodeAt(0)]?Nc["Size4-Regular"][n.charCodeAt(0)][4]:Nc["Size1-Regular"][n.charCodeAt(0)][4],i=new o_("inner",nDn(n,Math.round(1e3*t))),a=new Ul([i],{width:st(s),height:st(t),style:"width:"+st(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=c_([],[a],r);return o.height=t,o.style.height=st(t),o.style.width=st(s),{type:"elem",elem:o}},mk=.008,Y1={type:"kern",size:-1*mk},WDn=new Set(["|","\\lvert","\\rvert","\\vert"]),QDn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),tH=function(n,t,r,s,i,a){var o,c,u,d,f="",p=0;o=u=d=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=d="⏐":n==="\\Uparrow"?u=d="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",d="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",d="\\Downarrow"):WDn.has(n)?(u="∣",f="vert",p=333):QDn.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",d="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",d="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",d="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=d="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",d="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=d="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",d="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",d="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",d="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",d="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",d="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",d="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",d="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",d="⎩",u="⎪",m="Size4-Regular");var w=N0(o,m,i),k=w.height+w.depth,v=N0(u,m,i),y=v.height+v.depth,x=N0(d,m,i),b=x.height+x.depth,C=0,N=1;if(c!==null){var z=N0(c,m,i);C=z.height+z.depth,N=2}var A=k+b+C,j=Math.max(0,Math.ceil((t-A)/(N*y))),M=A+j*N*y,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var L=M/2-D,B=[];if(f.length>0){var U=M-k-b,H=Math.round(M*1e3),Q=rDn(f,Math.round(U*1e3)),K=new o_(f,Q),Z=st(p/1e3),ee=st(H/1e3),$=new Ul([K],{width:Z,height:ee,viewBox:"0 0 "+p+" "+H}),I=c_([],[$],s);I.height=H/1e3,I.style.width=Z,I.style.height=ee,B.push({type:"elem",elem:I})}else{if(B.push(d4(d,m,i)),B.push(Y1),c===null){var F=M-k-b+2*mk;B.push(h4(u,F,s))}else{var q=(M-k-b-C)/2+2*mk;B.push(h4(u,q,s)),B.push(Y1),B.push(d4(c,m,i)),B.push(Y1),B.push(h4(u,q,s))}B.push(Y1),B.push(d4(o,m,i))}var V=s.havingBaseStyle(on.TEXT),ie=tr({positionType:"bottom",positionData:L,children:B});return zC(Xe(["delimsizing","mult"],[ie],V),on.TEXT,s,a)},p4=80,m4=.08,g4=function(n,t,r,s,i){var a=tDn(n,s,r),o=new o_(n,a),c=new Ul([o],{width:"400em",height:st(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return c_(["hide-tail"],[c],i)},XDn=function(n,t){var r=t.havingBaseSizing(),s=aH("\\surd",n*r.sizeMultiplier,iH,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,d,f;return s.type==="small"?(d=1e3+1e3*a+p4,n<1?i=1:n<1.4&&(i=.7),c=(1+a+m4)/i,u=(1+a)/i,o=g4("sqrtMain",c,d,a,t),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(d=(1e3+p4)*H0[s.size],u=(H0[s.size]+a)/i,c=(H0[s.size]+a+m4)/i,o=g4("sqrtSize"+s.size,c,d,a,t),o.style.minWidth="1.02em",f=1/i):(c=n+a+m4,u=n+a,d=Math.floor(1e3*n+a)+p4,o=g4("sqrtTall",c,d,a,t),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=st(c),{span:o,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},nH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),YDn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),rH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),H0=[0,1.2,1.8,2.4,3],sH=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),nH.has(n)||rH.has(n))return eH(n,t,!1,r,s,i);if(YDn.has(n))return tH(n,H0[t],!1,r,s,i);throw new et("Illegal delimiter: '"+n+"'")},ZDn=[{type:"small",style:on.SCRIPTSCRIPT},{type:"small",style:on.SCRIPT},{type:"small",style:on.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],JDn=[{type:"small",style:on.SCRIPTSCRIPT},{type:"small",style:on.SCRIPT},{type:"small",style:on.TEXT},{type:"stack"}],iH=[{type:"small",style:on.SCRIPTSCRIPT},{type:"small",style:on.SCRIPT},{type:"small",style:on.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],eLn=function(n){if(n.type==="small")return"Main-Regular";if(n.type==="large")return"Size"+n.size+"-Regular";if(n.type==="stack")return"Size4-Regular";var t=n.type;throw new Error("Add support for delim type '"+t+"' here.")},aH=function(n,t,r,s){for(var i=Math.min(2,3-s.style.size),a=i;at)return o}return r[r.length-1]},gk=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;rH.has(n)?o=ZDn:nH.has(n)?o=iH:o=JDn;var c=aH(n,t,o,s);return c.type==="small"?VDn(n,c.style,r,s,i,a):c.type==="large"?eH(n,c.size,r,s,i,a):tH(n,t,r,s,i,a)},v4=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,d=Math.max(t-o,r+o),f=Math.max(d/500*c,2*d-u);return gk(n,f,!0,s,i,a)},cR={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},tLn=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function lR(e){return"isMiddle"in e}function tx(e,n){var t=Jy(e);if(t&&tLn.has(t.text))return t;throw t?new et("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new et("Invalid delimiter type '"+e.type+"'",e)}pt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=tx(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:cR[e.funcName].size,mclass:cR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Xe([e.mclass]):sH(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(bo(e.delim,e.mode));var t=new tt("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=st(H0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function uR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}pt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new et("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:tx(n[0],e).text,color:t}}});pt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=tx(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=bn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{uR(e);for(var t=Bs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{uR(e);var t=Ha(e.body,n);if(e.left!=="."){var r=new tt("mo",[bo(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new tt("mo",[bo(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return CC(t)}});pt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=tx(n[0],e);if(!e.parser.leftrightDepth)throw new et("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=pm(n,[]):(t=sH(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?bo("|","text"):bo(e.delim,e.mode),r=new tt("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var nx=(e,n)=>{var t=Vh(rr(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=Kl(e.body);if(r==="sout")i=Xe(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=Hr({number:.6,unit:"pt"},n),u=Hr({number:.35,unit:"ex"},n),d=n.havingBaseSizing();s=s/d.sizeMultiplier;var f=t.height+t.depth+c+u;t.style.paddingLeft=st(f/2+c);var p=Math.floor(1e3*f*s),m=JOn(p),w=new Ul([new o_("phase",m)],{width:"400em",height:st(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=c_(["hide-tail"],[w],n),i.style.height=st(f),a=t.depth+c+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,v,y=0;/box/.test(r)?(y=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:y),v=k):r==="angl"?(y=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*y,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=LDn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=st(y)):r==="angl"&&y!==.049&&(i.style.borderTopWidth=st(y),i.style.borderRightWidth=st(y)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=tr({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var b=/cancel|phase/.test(r)?["svg-align"]:[];x=tr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:b}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!o?Xe(["mord","cancel-lap"],[x],n):Xe(["mord"],[x],n)},rx=(e,n)=>{var t,r=new tt(e.label.includes("colorbox")?"mpadded":"menclose",[kr(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+st(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};pt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=bn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:nx,mathmlBuilder:rx});pt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=bn(n[0],"color-token").color,a=bn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:nx,mathmlBuilder:rx});pt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});pt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:nx,mathmlBuilder:rx});pt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:nx,mathmlBuilder:rx});pt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var oH={};function Gc(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},c=0;c{var n=e.parser.settings;if(!n.displayMode)throw new et("{"+e.envName+"} can be used only in display mode.")},nLn=new Set(["gather","gather*"]);function jC(e){if(!e.includes("ed"))return!e.includes("*")}function g_(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:d,maxNumCols:f,leqno:p}=n;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new et("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var w=[],k=[w],v=[],y=[],x=c!=null?[]:void 0;function b(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Oa("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(b(),y.push(_R(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var z={type:"ordgroup",mode:e.mode,body:N};t&&(z={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[z]}),w.push(z);var A=e.fetch().text;if(A==="&"){if(f&&w.length===f){if(u||o)throw new et("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(A==="\\end"){C(),w.length===1&&z.type==="styling"&&z.body.length===1&&z.body[0].type==="ordgroup"&&z.body[0].body.length===0&&(k.length>1||!d)&&k.pop(),y.length0&&(b+=.25),u.push({pos:b,isDashed:Ke[Ce]})}for(C(a[0]),r=0;r0&&(L+=x,AKe))for(r=0;r=o)){var ae=void 0;if(s>0||n.hskipBeforeAndAfter){var le,me;ae=(le=(me=V)==null?void 0:me.pregap)!=null?le:p,ae!==0&&(Q=Xe(["arraycolsep"],[]),Q.style.width=st(ae),H.push(Q))}var ve=[];for(r=0;r0){for(var Ut=Gh("hline",t,d),Ht=Gh("hdashline",t,d),$e=[{type:"elem",elem:Kt,shift:0}];u.length>0;){var ot=u.pop(),ct=ot.pos-B;ot.isDashed?$e.push({type:"elem",elem:Ht,shift:ct}):$e.push({type:"elem",elem:Ut,shift:ct})}Kt=tr({positionType:"individualShift",children:$e})}if(Z.length===0)return Xe(["mord"],[Kt],t);var ye=tr({positionType:"individualShift",children:Z}),Be=Xe(["tag"],[ye],t);return Ql([Kt,Be])},rLn={c:"center ",l:"left ",r:"right "},Kc=function(n,t){for(var r=[],s=new tt("mtd",[],["mtr-glue"]),i=new tt("mtd",[],["mml-eqn-num"]),a=0;a0){var w=n.cols,k="",v=!1,y=0,x=w.length;w[0].type==="separator"&&(p+="top ",y=1),w[w.length-1].type==="separator"&&(p+="bottom ",x-=1);for(var b=y;b0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var D=1;D0&&m&&(v=1),r[w]={type:"align",align:k,pregap:v,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};Gc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=Jy(n[0]),r=t?[n[0]]:bn(n[0],"ordgroup").body,s=r.map(function(a){var o=Zy(a),c=o.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new et("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return g_(e.parser,i,AC(e.envName))},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new et("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=g_(e.parser,r,AC(e.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[i],left:n[0],right:n[1],rightColor:void 0}:i},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=g_(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=Jy(n[0]),r=t?[n[0]]:bn(n[0],"ordgroup").body,s=r.map(function(o){var c=Zy(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new et("Unknown column alignment: "+u,o)});if(s.length>1)throw new et("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=g_(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new et("{subarray} can contain only one column");return a},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var n={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=g_(e.parser,n,AC(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:lH,htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){nLn.has(e.envName)&&sx(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:jC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return g_(e.parser,n,"display")},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:lH,htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){sx(e);var n={autoTag:jC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return g_(e.parser,n,"display")},htmlBuilder:Vc,mathmlBuilder:Kc});Gc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return sx(e),UDn(e.parser)},htmlBuilder:Vc,mathmlBuilder:Kc});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");pt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new et(e.funcName+" valid only within array environment")}});var fR=oH;pt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new et("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return rr(e.body,r)},_H=(e,n)=>{var t=e.font,r=n.withFont(t);return kr(e.body,r)},dR={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};pt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=Mb(n[0]),i=r;return i in dR&&(i=dR[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:uH,mathmlBuilder:_H});pt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:ex(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:Kl(r)}}});pt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:i}=t,a=t.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:uH,mathmlBuilder:_H});var sLn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=rr(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?w=3*p:w=7*p,k=n.fontMetrics().denom1):(f>0?(m=n.fontMetrics().num2,w=p):(m=n.fontMetrics().num3,w=3*p),k=n.fontMetrics().denom2);var v;if(d){var x=n.fontMetrics().axisHeight;m-a.depth-(x+.5*f){var t=new tt("mfrac",[kr(e.numer,n),kr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Hr(e.barSize,n);t.setAttribute("linethickness",st(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new tt("mo",[new ks(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new tt("mo",[new ks(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return CC(s)}return t},fH=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};pt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=n[1],a,o=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",c=")";break;case"\\\\bracefrac":a=!1,o="\\{",c="\\}";break;case"\\\\brackfrac":a=!1,o="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",d=null;return u||r.startsWith("\\d")?d="display":r.startsWith("\\t")&&(d="text"),fH({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},d)},htmlBuilder:sLn,mathmlBuilder:iLn});pt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var hR=["display","text","script","scriptscript"],pR=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};pt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],i=Mb(n[0]),a=i.type==="atom"&&i.family==="open"?pR(i.text):null,o=Mb(n[1]),c=o.type==="atom"&&o.family==="close"?pR(o.text):null,u=bn(n[2],"size"),d,f=null;u.isBlank?d=!0:(f=u.value,d=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var w=bn(m.body[0],"textord");p=hR[Number(w.text)]}}else m=bn(m,"textord"),p=hR[Number(m.text)];return fH({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:d,barSize:f,leftDelim:a,rightDelim:c},p)}});pt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:bn(n[0],"size").value,token:s}}});pt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=bn(n[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var a=n[2],o=i.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var dH=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?rr(e.sup,n.havingStyle(t.sup()),n):rr(e.sub,n.havingStyle(t.sub()),n),s=bn(e.base,"horizBrace")):s=bn(e,"horizBrace");var i=rr(s.base,n.havingBaseStyle(on.DISPLAY)),a=Yy(s,n),o;if(s.isOver?o=tr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=tr({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),r){var c=Xe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=tr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=tr({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Xe(["minner",s.isOver?"mover":"munder"],[o],n)},aLn=(e,n)=>{var t=Xy(e.label);return new tt(e.isOver?"mover":"munder",[kr(e.base,n),t])};pt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:dH,mathmlBuilder:aLn});pt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=bn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ws(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Bs(e.body,n,!1);return bDn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=l_(e.body,n);return t instanceof tt||(t=new tt("mrow",[t])),t.setAttribute("href",e.href),t}});pt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=bn(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:t,funcName:r,token:s}=e,i=bn(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,c={};switch(r){case"\\htmlClass":c.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),d=0;d{var t=Bs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Xe(r,t,n);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&s.setAttribute(i,e.attributes[i]);return s},mathmlBuilder:(e,n)=>l_(e.body,n)});pt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:ws(n[0]),mathml:ws(n[1])}},htmlBuilder:(e,n)=>{var t=Bs(e.html,n,!1);return Ql(t)},mathmlBuilder:(e,n)=>l_(e.mathml,n)});var b4=function(n){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(n))return{number:+n,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n);if(!t)throw new et("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!AF(r))throw new et("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};pt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var c=bn(t[0],"raw").string,u=c.split(","),d=0;d{var t=Hr(e.height,n),r=0;e.totalheight.number>0&&(r=Hr(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Hr(e.width,n));var i={height:st(t+r)};s>0&&(i.width=st(s)),r>0&&(i.verticalAlign=st(-r));var a=new oDn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new tt("mglyph",[]);t.setAttribute("alt",e.alt);var r=Hr(e.height,n),s=0;if(e.totalheight.number>0&&(s=Hr(e.totalheight,n)-r,t.setAttribute("valign",st(-s))),t.setAttribute("height",st(r+s)),e.width.number>0){var i=Hr(e.width,n);t.setAttribute("width",st(i))}return t.setAttribute("src",e.src),t}});pt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=bn(n[0],"size");if(t.settings.strict){var i=r[1]==="m",a=s.value.unit==="mu";i?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,n){return LF(e.dimension,n)},mathmlBuilder(e,n){var t=Hr(e.dimension,n);return new HF(t)}});pt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=Xe([],[rr(e.body,n)]),t=Xe(["inner"],[t],n)):t=Xe(["inner"],[rr(e.body,n)]);var r=Xe(["fix"],[]),s=Xe([e.alignment],[t,r],n),i=Xe(["strut"]);return i.style.height=st(s.height+s.depth),s.depth&&(i.style.verticalAlign=st(-s.depth)),s.children.unshift(i),s=Xe(["thinbox"],[s],n),Xe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new tt("mpadded",[kr(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});pt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var i=t==="\\("?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});pt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new et("Mismatched "+e.funcName)}});var mR=(e,n)=>{switch(n.style.size){case on.DISPLAY.size:return e.display;case on.TEXT.size:return e.text;case on.SCRIPT.size:return e.script;case on.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};pt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ws(n[0]),text:ws(n[1]),script:ws(n[2]),scriptscript:ws(n[3])}},htmlBuilder:(e,n)=>{var t=mR(e,n),r=Bs(t,n,!1);return Ql(r)},mathmlBuilder:(e,n)=>{var t=mR(e,n);return l_(t,n)}});var hH=(e,n,t,r,s,i,a)=>{e=Xe([],[e]);var o=t&&Kl(t),c,u;if(n){var d=rr(n,r.havingStyle(s.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(t){var f=rr(t,r.havingStyle(s.sub()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&c){var m=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+a;p=tr({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:st(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:st(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var w=e.height-a;p=tr({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:st(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=tr({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:st(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var y=Xe(["mspace"],[],r);y.style.marginRight=st(i),v.unshift(y)}return Xe(["mop","op-limits"],v,r)},pH=new Set(["\\smallint"]),hp=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=bn(e.base,"op"),s=!0):i=bn(e,"op");var a=n.style,o=!1;a.size===on.DISPLAY.size&&i.symbol&&!pH.has(i.name)&&(o=!0);var c,u;if(i.symbol){var d=o?"Size2-Regular":"Size1-Regular",f="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint"),c=Ti(i.name,d,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,f.length>0){var p=$F(f+"Size"+(o?"2":"1"),n);c=tr({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+f,c.classes.unshift("mop"),c.italic=u}}else if(i.body){var m=Bs(i.body,n,!0);m.length===1&&m[0]instanceof Ia?(c=m[0],c.classes[0]="mop"):c=Xe(["mop"],m,n)}else{for(var w=[],k=1;k{var t;if(e.symbol)t=new tt("mo",[bo(e.name,e.mode)]),pH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new tt("mo",Ha(e.body,n));else{t=new tt("mi",[new ks(e.name.slice(1))]);var r=new tt("mo",[bo("⁡","text")]);e.parentIsSupSub?t=new tt("mrow",[t,r]):t=FF([t,r])}return t},oLn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};pt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=oLn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:hp,mathmlBuilder:dg});pt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ws(r)}},htmlBuilder:hp,mathmlBuilder:dg});var cLn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};pt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:hp,mathmlBuilder:dg});pt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:hp,mathmlBuilder:dg});pt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=cLn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:hp,mathmlBuilder:dg});var mH=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=bn(e.base,"operatorname"),s=!0):i=bn(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(f=>{var p="text"in f?f.text:void 0;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),c=Bs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=Ha(e.body,n.withFont("mathrm")),r=!0,s=0;sd.toText()).join("");t=[new ks(o)]}var c=new tt("mi",t);c.setAttribute("mathvariant","normal");var u=new tt("mo",[bo("⁡","text")]);return e.parentIsSupSub?new tt("mrow",[c,u]):FF([c,u])};pt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:ws(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:mH,mathmlBuilder:lLn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");rd({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?Ql(Bs(e.body,n,!1)):Xe(["mord"],Bs(e.body,n,!0),n)},mathmlBuilder(e,n){return l_(e.body,n,!0)}});pt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=rr(e.body,n.havingCrampedStyle()),r=Gh("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=tr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Xe(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new tt("mo",[new ks("‾")]);t.setAttribute("stretchy","true");var r=new tt("mover",[kr(e.body,n),t]);return r.setAttribute("accent","true"),r}});pt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:ws(r)}},htmlBuilder:(e,n)=>{var t=Bs(e.body,n.withPhantom(),!1);return Ql(t)},mathmlBuilder:(e,n)=>{var t=Ha(e.body,n);return new tt("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");pt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=Xe(["inner"],[rr(e.body,n.withPhantom())]),r=Xe(["fix"],[]);return Xe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Ha(ws(e.body),n),r=new tt("mphantom",t),s=new tt("mpadded",[r]);return s.setAttribute("width","0px"),s}});pt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=bn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=rr(e.body,n),r=Hr(e.dy,n);return tr({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new tt("mpadded",[kr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});pt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});pt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],i=bn(n[0],"size"),a=bn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&bn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Xe(["mord","rule"],[],n),r=Hr(e.width,n),s=Hr(e.height,n),i=e.shift?Hr(e.shift,n):0;return t.style.borderRightWidth=st(r),t.style.borderTopWidth=st(s),t.style.bottom=st(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Hr(e.width,n),r=Hr(e.height,n),s=e.shift?Hr(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new tt("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",st(t)),a.setAttribute("height",st(r));var o=new tt("mpadded",[a]);return s>=0?o.setAttribute("height",st(s)):(o.setAttribute("height",st(s)),o.setAttribute("depth",st(-s))),o.setAttribute("voffset",st(s)),o}});function gH(e,n,t){for(var r=Bs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return gH(e.body,t,n)};pt({type:"sizing",names:gR,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:gR.indexOf(r)+1,body:i}},htmlBuilder:uLn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Ha(e.body,t),s=new tt("mstyle",r);return s.setAttribute("mathsize",st(t.sizeMultiplier)),s}});pt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,i=!1,a=t[0]&&bn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Xe([],[rr(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Xe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new tt("mpadded",[kr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});pt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],i=n[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,n){var t=rr(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Vh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+f-t.height-t.depth)/2);var p=c.height-t.height-a-u;t.style.paddingLeft=st(d);var m=tr({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:c},{type:"kern",size:u}]});if(e.index){var w=n.havingStyle(on.SCRIPTSCRIPT),k=rr(e.index,w,n),v=.6*(m.height-m.depth),y=tr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),x=Xe(["root"],[y]);return Xe(["mord","sqrt"],[x,m],n)}else return Xe(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new tt("mroot",[kr(t,n),kr(r,n)]):new tt("msqrt",[kr(t,n)])}});var vk={display:on.DISPLAY,text:on.TEXT,script:on.SCRIPT,scriptscript:on.SCRIPTSCRIPT};function _Ln(e){return e in vk}pt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!0,t),a=r.slice(1,r.length-5);if(!_Ln(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=vk[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),gH(e.body,r,n)},mathmlBuilder(e,n){var t=vk[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Ha(e.body,r),i=new tt("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var fLn=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===on.DISPLAY.size||r.alwaysHandleSupSub);return s?hp:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===on.DISPLAY.size||r.limits);return i?mH:null}else{if(r.type==="accent")return Kl(r.base)?NC:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?dH:null}else return null}else return null};rd({type:"supsub",htmlBuilder(e,n){var t=fLn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=rr(r,n),o,c,u=n.fontMetrics(),d=0,f=0,p=r&&Kl(r);if(s){var m=n.havingStyle(n.style.sup());o=rr(s,m,n),p||(d=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var w=n.havingStyle(n.style.sub());c=rr(i,w,n),p||(f=a.depth+w.fontMetrics().subDrop*w.sizeMultiplier/n.sizeMultiplier)}var k;n.style===on.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,y=st(.5/u.ptPerEm/v),x=null;if(c){var b=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Ia||b){var C;x=st(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){d=Math.max(d,k,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var z=u.defaultRuleThickness,A=4*z;if(d-o.depth-(c.height-f)0&&(d+=j,f-=j)}var M=[{type:"elem",elem:c,shift:f,marginRight:y,marginLeft:x},{type:"elem",elem:o,shift:-d,marginRight:y}];N=tr({positionType:"individualShift",children:M})}else if(c){f=Math.max(f,u.sub1,c.height-.8*u.xHeight);var D=[{type:"elem",elem:c,marginLeft:x,marginRight:y}];N=tr({positionType:"shift",positionData:f,children:D})}else if(o)d=Math.max(d,k,o.depth+.25*u.xHeight),N=tr({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:y}]});else throw new Error("supsub must have either sup or sub.");var L=dk(a,"right")||"mord";return Xe([L],[a,Xe(["msupsub"],[N])],n)},mathmlBuilder(e,n){var t=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[kr(e.base,n)];e.sub&&i.push(kr(e.sub,n)),e.sup&&i.push(kr(e.sup,n));var a;if(t)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&n.style===on.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===on.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===on.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===on.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===on.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===on.DISPLAY)?a="mover":a="msup"}return new tt(a,i)}});rd({type:"atom",htmlBuilder(e,n){return kC(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new tt("mo",[bo(e.text,e.mode)]);if(e.family==="bin"){var r=EC(e,n);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var vH={mi:"italic",mn:"normal",mtext:"normal"};rd({type:"mathord",htmlBuilder(e,n){return Qy(e,n,"mathord")},mathmlBuilder(e,n){var t=new tt("mi",[bo(e.text,e.mode,n)]),r=EC(e,n)||"italic";return r!==vH[t.type]&&t.setAttribute("mathvariant",r),t}});rd({type:"textord",htmlBuilder(e,n){return Qy(e,n,"textord")},mathmlBuilder(e,n){var t=bo(e.text,e.mode,n),r=EC(e,n)||"normal",s;return e.mode==="text"?s=new tt("mtext",[t]):/[0-9]/.test(e.text)?s=new tt("mn",[t]):e.text==="\\prime"?s=new tt("mo",[t]):s=new tt("mi",[t]),r!==vH[s.type]&&s.setAttribute("mathvariant",r),s}});var y4={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},x4={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};rd({type:"spacing",htmlBuilder(e,n){if(x4.hasOwnProperty(e.text)){var t=x4[e.text].className||"";if(e.mode==="text"){var r=Qy(e,n,"textord");return r.classes.push(t),r}else return Xe(["mspace",t],[kC(e.text,e.mode,n)],n)}else{if(y4.hasOwnProperty(e.text))return Xe(["mspace",y4[e.text]],[],n);throw new et('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(x4.hasOwnProperty(e.text))t=new tt("mtext",[new ks(" ")]);else{if(y4.hasOwnProperty(e.text))return new tt("mspace");throw new et('Unknown type of space "'+e.text+'"')}return t}});var vR=()=>{var e=new tt("mtd",[]);return e.setAttribute("width","50%"),e};rd({type:"tag",mathmlBuilder(e,n){var t=new tt("mtable",[new tt("mtr",[vR(),new tt("mtd",[l_(e.body,n)]),vR(),new tt("mtd",[l_(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var bR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},yR={"\\textbf":"textbf","\\textmd":"textmd"},dLn={"\\textit":"textit","\\textup":"textup"},xR=(e,n)=>{var t=e.font;if(t){if(bR[t])return n.withTextFontFamily(bR[t]);if(yR[t])return n.withTextFontWeight(yR[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(dLn[t])};pt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:ws(s),font:r}},htmlBuilder(e,n){var t=xR(e,n),r=Bs(e.body,t,!0);return Xe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=xR(e,n);return l_(e.body,t)}});pt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=rr(e.body,n),r=Gh("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=tr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Xe(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new tt("mo",[new ks("‾")]);t.setAttribute("stretchy","true");var r=new tt("munder",[kr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});pt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=rr(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return tr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new tt("mpadded",[kr(e.body,n)],["vcenter"]);return new tt("mrow",[t])}});pt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new et("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=wR(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Yu=BF,bH=`[ \r + ]`,hLn="\\\\[a-zA-Z@]+",pLn="\\\\[^\uD800-\uDFFF]",mLn="("+hLn+")"+bH+"*",gLn=`\\\\( |[ \r ]+ -?)[ \r ]*`,bk="[̀-ͯ]",QDn=new RegExp(bk+"+$"),XDn="("+bH+"+)|"+(WDn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(bk+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(bk+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+KDn)+("|"+VDn+")");class kR{constructor(n,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=n,this.settings=t,this.tokenRegex=new RegExp(XDn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(n,t){this.catcodes[n]=t}lex(){var n=this.input,t=this.tokenRegex.lastIndex;if(t===n.length)return new Oa("EOF",new ea(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new et("Unexpected character: '"+n[t]+"'",new Oa(n[t],new ea(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=n.indexOf(` -`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=n.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Oa(s,new ea(this,t,this.tokenRegex.lastIndex))}}class YDn{constructor(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=n,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new et("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var n=this.undefStack.pop();for(var t in n)n.hasOwnProperty(t)&&(n[t]==null?delete this.current[t]:this.current[t]=n[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(n){return this.current.hasOwnProperty(n)||this.builtins.hasOwnProperty(n)}get(n){return this.current.hasOwnProperty(n)?this.current[n]:this.builtins[n]}set(n,t,r){if(r===void 0&&(r=!1),r){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][n]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(n)&&(i[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var ZDn=cH;se("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});se("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});se("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});se("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});se("\\@ifnextchar",function(e){var n=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return n[0].length===1&&n[0][0].text===t.text?{tokens:n[1],numArgs:0}:{tokens:n[2],numArgs:0}});se("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");se("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var SR={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};se("\\char",function(e){var n=e.popToken(),t,r=0;if(n.text==="'")t=8,n=e.popToken();else if(n.text==='"')t=16,n=e.popToken();else if(n.text==="`")if(n=e.popToken(),n.text[0]==="\\")r=n.text.charCodeAt(1);else{if(n.text==="EOF")throw new et("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=SR[n.text],r==null||r>=t)throw new et("Invalid base-"+t+" digit "+n.text);for(var s;(s=SR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new et("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new et("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new et("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new et("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};se("\\newcommand",e=>TC(e,!1,!0,!1));se("\\renewcommand",e=>TC(e,!0,!1,!1));se("\\providecommand",e=>TC(e,!0,!0,!0));se("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});se("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});se("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Yu[t],Rr.math[t],Rr.text[t]),""});se("\\bgroup","{");se("\\egroup","}");se("~","\\nobreakspace");se("\\lq","`");se("\\rq","'");se("\\aa","\\r a");se("\\AA","\\r A");se("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");se("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");se("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");se("ℬ","\\mathscr{B}");se("ℰ","\\mathscr{E}");se("ℱ","\\mathscr{F}");se("ℋ","\\mathscr{H}");se("ℐ","\\mathscr{I}");se("ℒ","\\mathscr{L}");se("ℳ","\\mathscr{M}");se("ℛ","\\mathscr{R}");se("ℭ","\\mathfrak{C}");se("ℌ","\\mathfrak{H}");se("ℨ","\\mathfrak{Z}");se("\\Bbbk","\\Bbb{k}");se("\\llap","\\mathllap{\\textrm{#1}}");se("\\rlap","\\mathrlap{\\textrm{#1}}");se("\\clap","\\mathclap{\\textrm{#1}}");se("\\mathstrut","\\vphantom{(}");se("\\underbar","\\underline{\\text{#1}}");se("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');se("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");se("\\ne","\\neq");se("≠","\\neq");se("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");se("∉","\\notin");se("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");se("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");se("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");se("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");se("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");se("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");se("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");se("⟂","\\perp");se("‼","\\mathclose{!\\mkern-0.8mu!}");se("∌","\\notni");se("⌜","\\ulcorner");se("⌝","\\urcorner");se("⌞","\\llcorner");se("⌟","\\lrcorner");se("©","\\copyright");se("®","\\textregistered");se("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');se("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');se("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');se("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');se("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");se("⋮","\\vdots");se("\\varGamma","\\mathit{\\Gamma}");se("\\varDelta","\\mathit{\\Delta}");se("\\varTheta","\\mathit{\\Theta}");se("\\varLambda","\\mathit{\\Lambda}");se("\\varXi","\\mathit{\\Xi}");se("\\varPi","\\mathit{\\Pi}");se("\\varSigma","\\mathit{\\Sigma}");se("\\varUpsilon","\\mathit{\\Upsilon}");se("\\varPhi","\\mathit{\\Phi}");se("\\varPsi","\\mathit{\\Psi}");se("\\varOmega","\\mathit{\\Omega}");se("\\substack","\\begin{subarray}{c}#1\\end{subarray}");se("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");se("\\boxed","\\fbox{$\\displaystyle{#1}$}");se("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");se("\\implies","\\DOTSB\\;\\Longrightarrow\\;");se("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");se("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");se("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var CR={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},JDn=new Set(["bin","rel"]);se("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in CR?n=CR[t]:(t.slice(0,4)==="\\not"||t in Rr.math&&JDn.has(Rr.math[t].group))&&(n="\\dotsb"),n});var RC={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};se("\\dotso",function(e){var n=e.future().text;return n in RC?"\\ldots\\,":"\\ldots"});se("\\dotsc",function(e){var n=e.future().text;return n in RC&&n!==","?"\\ldots\\,":"\\ldots"});se("\\cdots",function(e){var n=e.future().text;return n in RC?"\\@cdots\\,":"\\@cdots"});se("\\dotsb","\\cdots");se("\\dotsm","\\cdots");se("\\dotsi","\\!\\cdots");se("\\dotsx","\\ldots\\,");se("\\DOTSI","\\relax");se("\\DOTSB","\\relax");se("\\DOTSX","\\relax");se("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");se("\\,","\\tmspace+{3mu}{.1667em}");se("\\thinspace","\\,");se("\\>","\\mskip{4mu}");se("\\:","\\tmspace+{4mu}{.2222em}");se("\\medspace","\\:");se("\\;","\\tmspace+{5mu}{.2777em}");se("\\thickspace","\\;");se("\\!","\\tmspace-{3mu}{.1667em}");se("\\negthinspace","\\!");se("\\negmedspace","\\tmspace-{4mu}{.2222em}");se("\\negthickspace","\\tmspace-{5mu}{.277em}");se("\\enspace","\\kern.5em ");se("\\enskip","\\hskip.5em\\relax");se("\\quad","\\hskip1em\\relax");se("\\qquad","\\hskip2em\\relax");se("\\tag","\\@ifstar\\tag@literal\\tag@paren");se("\\tag@paren","\\tag@literal{({#1})}");se("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new et("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});se("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");se("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");se("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");se("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");se("\\newline","\\\\\\relax");se("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var yH=st(Nc["Main-Regular"][84][1]-.7*Nc["Main-Regular"][65][1]);se("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+yH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");se("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+yH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");se("\\hspace","\\@ifstar\\@hspacer\\@hspace");se("\\@hspace","\\hskip #1\\relax");se("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");se("\\ordinarycolon",":");se("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");se("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');se("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');se("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');se("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');se("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');se("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');se("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');se("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');se("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');se("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');se("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');se("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');se("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');se("∷","\\dblcolon");se("∹","\\eqcolon");se("≔","\\coloneqq");se("≕","\\eqqcolon");se("⩴","\\Coloneqq");se("\\ratio","\\vcentcolon");se("\\coloncolon","\\dblcolon");se("\\colonequals","\\coloneqq");se("\\coloncolonequals","\\Coloneqq");se("\\equalscolon","\\eqqcolon");se("\\equalscoloncolon","\\Eqqcolon");se("\\colonminus","\\coloneq");se("\\coloncolonminus","\\Coloneq");se("\\minuscolon","\\eqcolon");se("\\minuscoloncolon","\\Eqcolon");se("\\coloncolonapprox","\\Colonapprox");se("\\coloncolonsim","\\Colonsim");se("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");se("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");se("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");se("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");se("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");se("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");se("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");se("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");se("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");se("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");se("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");se("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");se("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");se("\\nleqq","\\html@mathml{\\@nleqq}{≰}");se("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");se("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");se("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");se("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");se("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");se("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");se("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");se("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");se("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");se("\\imath","\\html@mathml{\\@imath}{ı}");se("\\jmath","\\html@mathml{\\@jmath}{ȷ}");se("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");se("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");se("⟦","\\llbracket");se("⟧","\\rrbracket");se("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");se("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");se("⦃","\\lBrace");se("⦄","\\rBrace");se("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");se("⦵","\\minuso");se("\\darr","\\downarrow");se("\\dArr","\\Downarrow");se("\\Darr","\\Downarrow");se("\\lang","\\langle");se("\\rang","\\rangle");se("\\uarr","\\uparrow");se("\\uArr","\\Uparrow");se("\\Uarr","\\Uparrow");se("\\N","\\mathbb{N}");se("\\R","\\mathbb{R}");se("\\Z","\\mathbb{Z}");se("\\alef","\\aleph");se("\\alefsym","\\aleph");se("\\Alpha","\\mathrm{A}");se("\\Beta","\\mathrm{B}");se("\\bull","\\bullet");se("\\Chi","\\mathrm{X}");se("\\clubs","\\clubsuit");se("\\cnums","\\mathbb{C}");se("\\Complex","\\mathbb{C}");se("\\Dagger","\\ddagger");se("\\diamonds","\\diamondsuit");se("\\empty","\\emptyset");se("\\Epsilon","\\mathrm{E}");se("\\Eta","\\mathrm{H}");se("\\exist","\\exists");se("\\harr","\\leftrightarrow");se("\\hArr","\\Leftrightarrow");se("\\Harr","\\Leftrightarrow");se("\\hearts","\\heartsuit");se("\\image","\\Im");se("\\infin","\\infty");se("\\Iota","\\mathrm{I}");se("\\isin","\\in");se("\\Kappa","\\mathrm{K}");se("\\larr","\\leftarrow");se("\\lArr","\\Leftarrow");se("\\Larr","\\Leftarrow");se("\\lrarr","\\leftrightarrow");se("\\lrArr","\\Leftrightarrow");se("\\Lrarr","\\Leftrightarrow");se("\\Mu","\\mathrm{M}");se("\\natnums","\\mathbb{N}");se("\\Nu","\\mathrm{N}");se("\\Omicron","\\mathrm{O}");se("\\plusmn","\\pm");se("\\rarr","\\rightarrow");se("\\rArr","\\Rightarrow");se("\\Rarr","\\Rightarrow");se("\\real","\\Re");se("\\reals","\\mathbb{R}");se("\\Reals","\\mathbb{R}");se("\\Rho","\\mathrm{P}");se("\\sdot","\\cdot");se("\\sect","\\S");se("\\spades","\\spadesuit");se("\\sub","\\subset");se("\\sube","\\subseteq");se("\\supe","\\supseteq");se("\\Tau","\\mathrm{T}");se("\\thetasym","\\vartheta");se("\\weierp","\\wp");se("\\Zeta","\\mathrm{Z}");se("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");se("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");se("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");se("\\bra","\\mathinner{\\langle{#1}|}");se("\\ket","\\mathinner{|{#1}\\rangle}");se("\\braket","\\mathinner{\\langle{#1}\\rangle}");se("\\Bra","\\left\\langle#1\\right|");se("\\Ket","\\left|#1\\right\\rangle");var xH=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,i=n.consumeArg().tokens,a=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var c=_=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=_;if(!_&&s.length){var w=p.future();w.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var u=n.consumeArg().tokens,d=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};se("\\bra@ket",xH(!1));se("\\bra@set",xH(!0));se("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");se("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");se("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");se("\\angln","{\\angl n}");se("\\blue","\\textcolor{##6495ed}{#1}");se("\\orange","\\textcolor{##ffa500}{#1}");se("\\pink","\\textcolor{##ff00af}{#1}");se("\\red","\\textcolor{##df0030}{#1}");se("\\green","\\textcolor{##28ae7b}{#1}");se("\\gray","\\textcolor{gray}{#1}");se("\\purple","\\textcolor{##9d38bd}{#1}");se("\\blueA","\\textcolor{##ccfaff}{#1}");se("\\blueB","\\textcolor{##80f6ff}{#1}");se("\\blueC","\\textcolor{##63d9ea}{#1}");se("\\blueD","\\textcolor{##11accd}{#1}");se("\\blueE","\\textcolor{##0c7f99}{#1}");se("\\tealA","\\textcolor{##94fff5}{#1}");se("\\tealB","\\textcolor{##26edd5}{#1}");se("\\tealC","\\textcolor{##01d1c1}{#1}");se("\\tealD","\\textcolor{##01a995}{#1}");se("\\tealE","\\textcolor{##208170}{#1}");se("\\greenA","\\textcolor{##b6ffb0}{#1}");se("\\greenB","\\textcolor{##8af281}{#1}");se("\\greenC","\\textcolor{##74cf70}{#1}");se("\\greenD","\\textcolor{##1fab54}{#1}");se("\\greenE","\\textcolor{##0d923f}{#1}");se("\\goldA","\\textcolor{##ffd0a9}{#1}");se("\\goldB","\\textcolor{##ffbb71}{#1}");se("\\goldC","\\textcolor{##ff9c39}{#1}");se("\\goldD","\\textcolor{##e07d10}{#1}");se("\\goldE","\\textcolor{##a75a05}{#1}");se("\\redA","\\textcolor{##fca9a9}{#1}");se("\\redB","\\textcolor{##ff8482}{#1}");se("\\redC","\\textcolor{##f9685d}{#1}");se("\\redD","\\textcolor{##e84d39}{#1}");se("\\redE","\\textcolor{##bc2612}{#1}");se("\\maroonA","\\textcolor{##ffbde0}{#1}");se("\\maroonB","\\textcolor{##ff92c6}{#1}");se("\\maroonC","\\textcolor{##ed5fa6}{#1}");se("\\maroonD","\\textcolor{##ca337c}{#1}");se("\\maroonE","\\textcolor{##9e034e}{#1}");se("\\purpleA","\\textcolor{##ddd7ff}{#1}");se("\\purpleB","\\textcolor{##c6b9fc}{#1}");se("\\purpleC","\\textcolor{##aa87ff}{#1}");se("\\purpleD","\\textcolor{##7854ab}{#1}");se("\\purpleE","\\textcolor{##543b78}{#1}");se("\\mintA","\\textcolor{##f5f9e8}{#1}");se("\\mintB","\\textcolor{##edf2df}{#1}");se("\\mintC","\\textcolor{##e0e5cc}{#1}");se("\\grayA","\\textcolor{##f6f7f7}{#1}");se("\\grayB","\\textcolor{##f0f1f2}{#1}");se("\\grayC","\\textcolor{##e3e5e6}{#1}");se("\\grayD","\\textcolor{##d6d8da}{#1}");se("\\grayE","\\textcolor{##babec2}{#1}");se("\\grayF","\\textcolor{##888d93}{#1}");se("\\grayG","\\textcolor{##626569}{#1}");se("\\grayH","\\textcolor{##3b3e40}{#1}");se("\\grayI","\\textcolor{##21242c}{#1}");se("\\kaBlue","\\textcolor{##314453}{#1}");se("\\kaGreen","\\textcolor{##71B307}{#1}");var wH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class eLn{constructor(n,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(n),this.macros=new YDn(ZDn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new kR(n,this.settings)}switchMode(n){this.mode=n}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(n){this.stack.push(n)}pushTokens(n){this.stack.push(...n)}scanArgument(n){var t,r,s;if(n){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:t,end:r}=this.consumeArg());return this.pushToken(new Oa("EOF",r.loc)),this.pushTokens(s),new Oa("",ea.range(t,r))}consumeSpaces(){for(;;){var n=this.future();if(n.text===" ")this.stack.pop();else break}}consumeArg(n){var t=[],r=n&&n.length>0;r||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new et("Extra }",i)}else if(i.text==="EOF")throw new et("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",i);if(n&&r)if((a===0||a===1&&n[o]==="{")&&i.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(a!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:i}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new et("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new et("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(n){var t=this.popToken(),r=t.text,s=t.noexpand?null:this._getExpansion(r);if(s==null||n&&s.unexpandable){if(n&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new et("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var c=i[o];if(c.text==="#"){if(o===0)throw new et("Incomplete placeholder at end of macro body",c);if(c=i[--o],c.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(c.text))i.splice(o,2,...a[+c.text-1]);else throw new et("Not a valid argument number",c)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var n=this.stack.pop();return n.treatAsRelax&&(n.text="\\relax"),n}}expandMacro(n){return this.macros.has(n)?this.expandTokens([new Oa(n)]):void 0}expandTokens(n){var t=[],r=this.stack.length;for(this.pushTokens(n);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(n){var t=this.expandMacro(n);return t&&t.map(r=>r.text).join("")}_getExpansion(n){var t=this.macros.get(n);if(t==null)return t;if(n.length===1){var r=this.lexer.catcodes[n];if(r!=null&&r!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var i=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var o=new kR(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var d={tokens:c,numArgs:i};return d}return s}isDefined(n){return this.macros.has(n)||Yu.hasOwnProperty(n)||Rr.math.hasOwnProperty(n)||Rr.text.hasOwnProperty(n)||wH.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Yu.hasOwnProperty(n)&&!Yu[n].primitive}}var ER=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Y1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),w4={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},NR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class sx{constructor(n,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new eLn(n,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(n,t){if(t===void 0&&(t=!0),this.fetch().text!==n)throw new et("Expected '"+n+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(n){this.mode=n,this.gullet.switchMode(n)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var n=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),n}finally{this.gullet.endGroups()}}subparse(n){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Oa("}")),this.gullet.pushTokens(n);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(n,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(sx.endOfExpression.has(s.text)||t&&s.text===t||n&&Yu[s.text]&&Yu[s.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;r.push(i)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(jF(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',n):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),n)),a={type:"textord",mode:"text",loc:ea.range(n),text:t};else return null;if(this.consume(),i)for(var d=0;d0?{type:"text",value:z}:void 0),z===!1?p.lastIndex=C+1:(w!==C&&x.push({type:"text",value:u.value.slice(w,C)}),Array.isArray(z)?x.push(...z):z&&x.push(z),w=C+b[0].length,y=!0),!p.global)break;b=p.exec(u.value)}return y?(w?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=jR(e,"(");let i=jR(e,")");for(;r!==-1&&s>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function EH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Df(t)||Py(t))&&(!n||t!==47)}NH.peek=MLn;function CLn(){this.buffer()}function ELn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function NLn(){this.buffer()}function zLn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function jLn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Go(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ALn(e){this.exit(e)}function TLn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Go(this.sliceSerialize(e)).toLowerCase(),t.label=n}function RLn(e){this.exit(e)}function MLn(){return"["}function NH(e,n,t,r){const s=t.createTracker(r);let i=s.move("[^");const a=t.enter("footnoteReference"),o=t.enter("reference");return i+=s.move(t.safe(t.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function OLn(){return{enter:{gfmFootnoteCallString:CLn,gfmFootnoteCall:ELn,gfmFootnoteDefinitionLabelString:NLn,gfmFootnoteDefinition:zLn},exit:{gfmFootnoteCallString:jLn,gfmFootnoteCall:ALn,gfmFootnoteDefinitionLabelString:TLn,gfmFootnoteDefinition:RLn}}}function DLn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:NH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),d(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?zH:LLn))),u(),c}}function LLn(e,n,t){return n===0?e:zH(e,n,t)}function zH(e,n,t){return(t?"":" ")+e}const ILn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jH.peek=HLn;function $Ln(){return{canContainEols:["delete"],enter:{strikethrough:PLn},exit:{strikethrough:FLn}}}function BLn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ILn}],handlers:{delete:jH}}}function PLn(e){this.enter({type:"delete",children:[]},e)}function FLn(e){this.exit(e)}function jH(e,n,t,r){const s=t.createTracker(r),i=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function HLn(){return"~"}function qLn(e){return e.length}function ULn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||qLn,i=[],a=[],o=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++yc[y])&&(c[y]=b)}k.push(x)}a[d]=k,o[d]=v}let _=-1;if(typeof r=="object"&&"length"in r)for(;++_c[_]&&(c[_]=x),m[_]=x),p[_]=b}a.splice(1,0,p),o.splice(1,0,m),d=-1;const w=[];for(;++d "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),KLn);return s(),a}function KLn(e,n,t){return">"+(t?"":" ")+e}function WLn(e,n){return TR(e,n.inConstruct,!0)&&!TR(e,n.notInConstruct,!1)}function TR(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ra&&(a=i):i=1,s=r+n.length,r=t.indexOf(n,s);return a}function QLn(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function XLn(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function YLn(e,n,t,r){const s=XLn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(QLn(e,t)){const _=t.enter("codeIndented"),p=t.indentLines(i,ZLn);return _(),p}const o=t.createTracker(r),c=s.repeat(Math.max(AH(i,s)+1,3)),u=t.enter("codeFenced");let d=o.move(c);if(e.lang){const _=t.enter(`codeFencedLang${a}`);d+=o.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),_()}if(e.lang&&e.meta){const _=t.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(t.safe(e.meta,{before:d,after:` -`,encode:["`"],...o.current()})),_()}return d+=o.move(` +?)[ \r ]*`,bk="[̀-ͯ]",vLn=new RegExp(bk+"+$"),bLn="("+bH+"+)|"+(gLn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(bk+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(bk+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+mLn)+("|"+pLn+")");class kR{constructor(n,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=n,this.settings=t,this.tokenRegex=new RegExp(bLn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(n,t){this.catcodes[n]=t}lex(){var n=this.input,t=this.tokenRegex.lastIndex;if(t===n.length)return new Oa("EOF",new ea(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new et("Unexpected character: '"+n[t]+"'",new Oa(n[t],new ea(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=n.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=n.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Oa(s,new ea(this,t,this.tokenRegex.lastIndex))}}class yLn{constructor(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=n,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new et("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var n=this.undefStack.pop();for(var t in n)n.hasOwnProperty(t)&&(n[t]==null?delete this.current[t]:this.current[t]=n[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(n){return this.current.hasOwnProperty(n)||this.builtins.hasOwnProperty(n)}get(n){return this.current.hasOwnProperty(n)?this.current[n]:this.builtins[n]}set(n,t,r){if(r===void 0&&(r=!1),r){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][n]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(n)&&(i[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var xLn=cH;se("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});se("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});se("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});se("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});se("\\@ifnextchar",function(e){var n=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return n[0].length===1&&n[0][0].text===t.text?{tokens:n[1],numArgs:0}:{tokens:n[2],numArgs:0}});se("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");se("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var SR={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};se("\\char",function(e){var n=e.popToken(),t,r=0;if(n.text==="'")t=8,n=e.popToken();else if(n.text==='"')t=16,n=e.popToken();else if(n.text==="`")if(n=e.popToken(),n.text[0]==="\\")r=n.text.charCodeAt(1);else{if(n.text==="EOF")throw new et("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=SR[n.text],r==null||r>=t)throw new et("Invalid base-"+t+" digit "+n.text);for(var s;(s=SR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new et("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new et("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new et("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)c+=u.text,u=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new et("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};se("\\newcommand",e=>TC(e,!1,!0,!1));se("\\renewcommand",e=>TC(e,!0,!1,!1));se("\\providecommand",e=>TC(e,!0,!0,!0));se("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});se("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});se("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Yu[t],Mr.math[t],Mr.text[t]),""});se("\\bgroup","{");se("\\egroup","}");se("~","\\nobreakspace");se("\\lq","`");se("\\rq","'");se("\\aa","\\r a");se("\\AA","\\r A");se("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");se("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");se("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");se("ℬ","\\mathscr{B}");se("ℰ","\\mathscr{E}");se("ℱ","\\mathscr{F}");se("ℋ","\\mathscr{H}");se("ℐ","\\mathscr{I}");se("ℒ","\\mathscr{L}");se("ℳ","\\mathscr{M}");se("ℛ","\\mathscr{R}");se("ℭ","\\mathfrak{C}");se("ℌ","\\mathfrak{H}");se("ℨ","\\mathfrak{Z}");se("\\Bbbk","\\Bbb{k}");se("\\llap","\\mathllap{\\textrm{#1}}");se("\\rlap","\\mathrlap{\\textrm{#1}}");se("\\clap","\\mathclap{\\textrm{#1}}");se("\\mathstrut","\\vphantom{(}");se("\\underbar","\\underline{\\text{#1}}");se("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');se("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");se("\\ne","\\neq");se("≠","\\neq");se("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");se("∉","\\notin");se("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");se("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");se("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");se("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");se("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");se("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");se("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");se("⟂","\\perp");se("‼","\\mathclose{!\\mkern-0.8mu!}");se("∌","\\notni");se("⌜","\\ulcorner");se("⌝","\\urcorner");se("⌞","\\llcorner");se("⌟","\\lrcorner");se("©","\\copyright");se("®","\\textregistered");se("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');se("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');se("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');se("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');se("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");se("⋮","\\vdots");se("\\varGamma","\\mathit{\\Gamma}");se("\\varDelta","\\mathit{\\Delta}");se("\\varTheta","\\mathit{\\Theta}");se("\\varLambda","\\mathit{\\Lambda}");se("\\varXi","\\mathit{\\Xi}");se("\\varPi","\\mathit{\\Pi}");se("\\varSigma","\\mathit{\\Sigma}");se("\\varUpsilon","\\mathit{\\Upsilon}");se("\\varPhi","\\mathit{\\Phi}");se("\\varPsi","\\mathit{\\Psi}");se("\\varOmega","\\mathit{\\Omega}");se("\\substack","\\begin{subarray}{c}#1\\end{subarray}");se("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");se("\\boxed","\\fbox{$\\displaystyle{#1}$}");se("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");se("\\implies","\\DOTSB\\;\\Longrightarrow\\;");se("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");se("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");se("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var CR={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},wLn=new Set(["bin","rel"]);se("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in CR?n=CR[t]:(t.slice(0,4)==="\\not"||t in Mr.math&&wLn.has(Mr.math[t].group))&&(n="\\dotsb"),n});var RC={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};se("\\dotso",function(e){var n=e.future().text;return n in RC?"\\ldots\\,":"\\ldots"});se("\\dotsc",function(e){var n=e.future().text;return n in RC&&n!==","?"\\ldots\\,":"\\ldots"});se("\\cdots",function(e){var n=e.future().text;return n in RC?"\\@cdots\\,":"\\@cdots"});se("\\dotsb","\\cdots");se("\\dotsm","\\cdots");se("\\dotsi","\\!\\cdots");se("\\dotsx","\\ldots\\,");se("\\DOTSI","\\relax");se("\\DOTSB","\\relax");se("\\DOTSX","\\relax");se("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");se("\\,","\\tmspace+{3mu}{.1667em}");se("\\thinspace","\\,");se("\\>","\\mskip{4mu}");se("\\:","\\tmspace+{4mu}{.2222em}");se("\\medspace","\\:");se("\\;","\\tmspace+{5mu}{.2777em}");se("\\thickspace","\\;");se("\\!","\\tmspace-{3mu}{.1667em}");se("\\negthinspace","\\!");se("\\negmedspace","\\tmspace-{4mu}{.2222em}");se("\\negthickspace","\\tmspace-{5mu}{.277em}");se("\\enspace","\\kern.5em ");se("\\enskip","\\hskip.5em\\relax");se("\\quad","\\hskip1em\\relax");se("\\qquad","\\hskip2em\\relax");se("\\tag","\\@ifstar\\tag@literal\\tag@paren");se("\\tag@paren","\\tag@literal{({#1})}");se("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new et("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});se("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");se("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");se("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");se("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");se("\\newline","\\\\\\relax");se("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var yH=st(Nc["Main-Regular"][84][1]-.7*Nc["Main-Regular"][65][1]);se("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+yH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");se("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+yH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");se("\\hspace","\\@ifstar\\@hspacer\\@hspace");se("\\@hspace","\\hskip #1\\relax");se("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");se("\\ordinarycolon",":");se("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");se("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');se("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');se("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');se("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');se("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');se("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');se("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');se("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');se("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');se("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');se("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');se("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');se("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');se("∷","\\dblcolon");se("∹","\\eqcolon");se("≔","\\coloneqq");se("≕","\\eqqcolon");se("⩴","\\Coloneqq");se("\\ratio","\\vcentcolon");se("\\coloncolon","\\dblcolon");se("\\colonequals","\\coloneqq");se("\\coloncolonequals","\\Coloneqq");se("\\equalscolon","\\eqqcolon");se("\\equalscoloncolon","\\Eqqcolon");se("\\colonminus","\\coloneq");se("\\coloncolonminus","\\Coloneq");se("\\minuscolon","\\eqcolon");se("\\minuscoloncolon","\\Eqcolon");se("\\coloncolonapprox","\\Colonapprox");se("\\coloncolonsim","\\Colonsim");se("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");se("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");se("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");se("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");se("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");se("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");se("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");se("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");se("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");se("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");se("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");se("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");se("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");se("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");se("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");se("\\nleqq","\\html@mathml{\\@nleqq}{≰}");se("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");se("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");se("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");se("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");se("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");se("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");se("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");se("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");se("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");se("\\imath","\\html@mathml{\\@imath}{ı}");se("\\jmath","\\html@mathml{\\@jmath}{ȷ}");se("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");se("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");se("⟦","\\llbracket");se("⟧","\\rrbracket");se("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");se("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");se("⦃","\\lBrace");se("⦄","\\rBrace");se("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");se("⦵","\\minuso");se("\\darr","\\downarrow");se("\\dArr","\\Downarrow");se("\\Darr","\\Downarrow");se("\\lang","\\langle");se("\\rang","\\rangle");se("\\uarr","\\uparrow");se("\\uArr","\\Uparrow");se("\\Uarr","\\Uparrow");se("\\N","\\mathbb{N}");se("\\R","\\mathbb{R}");se("\\Z","\\mathbb{Z}");se("\\alef","\\aleph");se("\\alefsym","\\aleph");se("\\Alpha","\\mathrm{A}");se("\\Beta","\\mathrm{B}");se("\\bull","\\bullet");se("\\Chi","\\mathrm{X}");se("\\clubs","\\clubsuit");se("\\cnums","\\mathbb{C}");se("\\Complex","\\mathbb{C}");se("\\Dagger","\\ddagger");se("\\diamonds","\\diamondsuit");se("\\empty","\\emptyset");se("\\Epsilon","\\mathrm{E}");se("\\Eta","\\mathrm{H}");se("\\exist","\\exists");se("\\harr","\\leftrightarrow");se("\\hArr","\\Leftrightarrow");se("\\Harr","\\Leftrightarrow");se("\\hearts","\\heartsuit");se("\\image","\\Im");se("\\infin","\\infty");se("\\Iota","\\mathrm{I}");se("\\isin","\\in");se("\\Kappa","\\mathrm{K}");se("\\larr","\\leftarrow");se("\\lArr","\\Leftarrow");se("\\Larr","\\Leftarrow");se("\\lrarr","\\leftrightarrow");se("\\lrArr","\\Leftrightarrow");se("\\Lrarr","\\Leftrightarrow");se("\\Mu","\\mathrm{M}");se("\\natnums","\\mathbb{N}");se("\\Nu","\\mathrm{N}");se("\\Omicron","\\mathrm{O}");se("\\plusmn","\\pm");se("\\rarr","\\rightarrow");se("\\rArr","\\Rightarrow");se("\\Rarr","\\Rightarrow");se("\\real","\\Re");se("\\reals","\\mathbb{R}");se("\\Reals","\\mathbb{R}");se("\\Rho","\\mathrm{P}");se("\\sdot","\\cdot");se("\\sect","\\S");se("\\spades","\\spadesuit");se("\\sub","\\subset");se("\\sube","\\subseteq");se("\\supe","\\supseteq");se("\\Tau","\\mathrm{T}");se("\\thetasym","\\vartheta");se("\\weierp","\\wp");se("\\Zeta","\\mathrm{Z}");se("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");se("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");se("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");se("\\bra","\\mathinner{\\langle{#1}|}");se("\\ket","\\mathinner{|{#1}\\rangle}");se("\\braket","\\mathinner{\\langle{#1}\\rangle}");se("\\Bra","\\left\\langle#1\\right|");se("\\Ket","\\left|#1\\right\\rangle");var xH=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,i=n.consumeArg().tokens,a=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var c=f=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=f;if(!f&&s.length){var w=p.future();w.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var u=n.consumeArg().tokens,d=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};se("\\bra@ket",xH(!1));se("\\bra@set",xH(!0));se("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");se("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");se("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");se("\\angln","{\\angl n}");se("\\blue","\\textcolor{##6495ed}{#1}");se("\\orange","\\textcolor{##ffa500}{#1}");se("\\pink","\\textcolor{##ff00af}{#1}");se("\\red","\\textcolor{##df0030}{#1}");se("\\green","\\textcolor{##28ae7b}{#1}");se("\\gray","\\textcolor{gray}{#1}");se("\\purple","\\textcolor{##9d38bd}{#1}");se("\\blueA","\\textcolor{##ccfaff}{#1}");se("\\blueB","\\textcolor{##80f6ff}{#1}");se("\\blueC","\\textcolor{##63d9ea}{#1}");se("\\blueD","\\textcolor{##11accd}{#1}");se("\\blueE","\\textcolor{##0c7f99}{#1}");se("\\tealA","\\textcolor{##94fff5}{#1}");se("\\tealB","\\textcolor{##26edd5}{#1}");se("\\tealC","\\textcolor{##01d1c1}{#1}");se("\\tealD","\\textcolor{##01a995}{#1}");se("\\tealE","\\textcolor{##208170}{#1}");se("\\greenA","\\textcolor{##b6ffb0}{#1}");se("\\greenB","\\textcolor{##8af281}{#1}");se("\\greenC","\\textcolor{##74cf70}{#1}");se("\\greenD","\\textcolor{##1fab54}{#1}");se("\\greenE","\\textcolor{##0d923f}{#1}");se("\\goldA","\\textcolor{##ffd0a9}{#1}");se("\\goldB","\\textcolor{##ffbb71}{#1}");se("\\goldC","\\textcolor{##ff9c39}{#1}");se("\\goldD","\\textcolor{##e07d10}{#1}");se("\\goldE","\\textcolor{##a75a05}{#1}");se("\\redA","\\textcolor{##fca9a9}{#1}");se("\\redB","\\textcolor{##ff8482}{#1}");se("\\redC","\\textcolor{##f9685d}{#1}");se("\\redD","\\textcolor{##e84d39}{#1}");se("\\redE","\\textcolor{##bc2612}{#1}");se("\\maroonA","\\textcolor{##ffbde0}{#1}");se("\\maroonB","\\textcolor{##ff92c6}{#1}");se("\\maroonC","\\textcolor{##ed5fa6}{#1}");se("\\maroonD","\\textcolor{##ca337c}{#1}");se("\\maroonE","\\textcolor{##9e034e}{#1}");se("\\purpleA","\\textcolor{##ddd7ff}{#1}");se("\\purpleB","\\textcolor{##c6b9fc}{#1}");se("\\purpleC","\\textcolor{##aa87ff}{#1}");se("\\purpleD","\\textcolor{##7854ab}{#1}");se("\\purpleE","\\textcolor{##543b78}{#1}");se("\\mintA","\\textcolor{##f5f9e8}{#1}");se("\\mintB","\\textcolor{##edf2df}{#1}");se("\\mintC","\\textcolor{##e0e5cc}{#1}");se("\\grayA","\\textcolor{##f6f7f7}{#1}");se("\\grayB","\\textcolor{##f0f1f2}{#1}");se("\\grayC","\\textcolor{##e3e5e6}{#1}");se("\\grayD","\\textcolor{##d6d8da}{#1}");se("\\grayE","\\textcolor{##babec2}{#1}");se("\\grayF","\\textcolor{##888d93}{#1}");se("\\grayG","\\textcolor{##626569}{#1}");se("\\grayH","\\textcolor{##3b3e40}{#1}");se("\\grayI","\\textcolor{##21242c}{#1}");se("\\kaBlue","\\textcolor{##314453}{#1}");se("\\kaGreen","\\textcolor{##71B307}{#1}");var wH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class kLn{constructor(n,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(n),this.macros=new yLn(xLn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new kR(n,this.settings)}switchMode(n){this.mode=n}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(n){this.stack.push(n)}pushTokens(n){this.stack.push(...n)}scanArgument(n){var t,r,s;if(n){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:t,end:r}=this.consumeArg());return this.pushToken(new Oa("EOF",r.loc)),this.pushTokens(s),new Oa("",ea.range(t,r))}consumeSpaces(){for(;;){var n=this.future();if(n.text===" ")this.stack.pop();else break}}consumeArg(n){var t=[],r=n&&n.length>0;r||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new et("Extra }",i)}else if(i.text==="EOF")throw new et("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",i);if(n&&r)if((a===0||a===1&&n[o]==="{")&&i.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(a!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:i}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new et("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new et("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(n){var t=this.popToken(),r=t.text,s=t.noexpand?null:this._getExpansion(r);if(s==null||n&&s.unexpandable){if(n&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new et("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var c=i[o];if(c.text==="#"){if(o===0)throw new et("Incomplete placeholder at end of macro body",c);if(c=i[--o],c.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(c.text))i.splice(o,2,...a[+c.text-1]);else throw new et("Not a valid argument number",c)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var n=this.stack.pop();return n.treatAsRelax&&(n.text="\\relax"),n}}expandMacro(n){return this.macros.has(n)?this.expandTokens([new Oa(n)]):void 0}expandTokens(n){var t=[],r=this.stack.length;for(this.pushTokens(n);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(n){var t=this.expandMacro(n);return t&&t.map(r=>r.text).join("")}_getExpansion(n){var t=this.macros.get(n);if(t==null)return t;if(n.length===1){var r=this.lexer.catcodes[n];if(r!=null&&r!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var i=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var o=new kR(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var d={tokens:c,numArgs:i};return d}return s}isDefined(n){return this.macros.has(n)||Yu.hasOwnProperty(n)||Mr.math.hasOwnProperty(n)||Mr.text.hasOwnProperty(n)||wH.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Yu.hasOwnProperty(n)&&!Yu[n].primitive}}var ER=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Z1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),w4={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},NR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ix{constructor(n,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new kLn(n,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(n,t){if(t===void 0&&(t=!0),this.fetch().text!==n)throw new et("Expected '"+n+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(n){this.mode=n,this.gullet.switchMode(n)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var n=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),n}finally{this.gullet.endGroups()}}subparse(n){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Oa("}")),this.gullet.pushTokens(n);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(n,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(ix.endOfExpression.has(s.text)||t&&s.text===t||n&&Yu[s.text]&&Yu[s.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;r.push(i)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(jF(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',n):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),n)),a={type:"textord",mode:"text",loc:ea.range(n),text:t};else return null;if(this.consume(),i)for(var d=0;d0?{type:"text",value:z}:void 0),z===!1?p.lastIndex=C+1:(w!==C&&x.push({type:"text",value:u.value.slice(w,C)}),Array.isArray(z)?x.push(...z):z&&x.push(z),w=C+b[0].length,y=!0),!p.global)break;b=p.exec(u.value)}return y?(w?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=jR(e,"(");let i=jR(e,")");for(;r!==-1&&s>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function EH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Df(t)||Fy(t))&&(!n||t!==47)}NH.peek=nIn;function WLn(){this.buffer()}function QLn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function XLn(){this.buffer()}function YLn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ZLn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Go(this.sliceSerialize(e)).toLowerCase(),t.label=n}function JLn(e){this.exit(e)}function eIn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Go(this.sliceSerialize(e)).toLowerCase(),t.label=n}function tIn(e){this.exit(e)}function nIn(){return"["}function NH(e,n,t,r){const s=t.createTracker(r);let i=s.move("[^");const a=t.enter("footnoteReference"),o=t.enter("reference");return i+=s.move(t.safe(t.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function rIn(){return{enter:{gfmFootnoteCallString:WLn,gfmFootnoteCall:QLn,gfmFootnoteDefinitionLabelString:XLn,gfmFootnoteDefinition:YLn},exit:{gfmFootnoteCallString:ZLn,gfmFootnoteCall:JLn,gfmFootnoteDefinitionLabelString:eIn,gfmFootnoteDefinition:tIn}}}function sIn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:NH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),d(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` +`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?zH:iIn))),u(),c}}function iIn(e,n,t){return n===0?e:zH(e,n,t)}function zH(e,n,t){return(t?"":" ")+e}const aIn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jH.peek=_In;function oIn(){return{canContainEols:["delete"],enter:{strikethrough:lIn},exit:{strikethrough:uIn}}}function cIn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aIn}],handlers:{delete:jH}}}function lIn(e){this.enter({type:"delete",children:[]},e)}function uIn(e){this.exit(e)}function jH(e,n,t,r){const s=t.createTracker(r),i=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function _In(){return"~"}function fIn(e){return e.length}function dIn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||fIn,i=[],a=[],o=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++yc[y])&&(c[y]=b)}k.push(x)}a[d]=k,o[d]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=x),m[f]=x),p[f]=b}a.splice(1,0,p),o.splice(1,0,m),d=-1;const w=[];for(;++d "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),mIn);return s(),a}function mIn(e,n,t){return">"+(t?"":" ")+e}function gIn(e,n){return TR(e,n.inConstruct,!0)&&!TR(e,n.notInConstruct,!1)}function TR(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ra&&(a=i):i=1,s=r+n.length,r=t.indexOf(n,s);return a}function vIn(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function bIn(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function yIn(e,n,t,r){const s=bIn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(vIn(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,xIn);return f(),p}const o=t.createTracker(r),c=s.repeat(Math.max(AH(i,s)+1,3)),u=t.enter("codeFenced");let d=o.move(c);if(e.lang){const f=t.enter(`codeFencedLang${a}`);d+=o.move(t.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${a}`);d+=o.move(" "),d+=o.move(t.safe(e.meta,{before:d,after:` +`,encode:["`"],...o.current()})),f()}return d+=o.move(` `),i&&(d+=o.move(i+` -`)),d+=o.move(c),u(),d}function ZLn(e,n,t){return(t?"":" ")+e}function DC(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function JLn(e,n,t,r){const s=DC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":` -`,...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function eIn(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function pm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Mb(e,n,t){const r=Hh(e),s=Hh(n);return r===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}TH.peek=tIn;function TH(e,n,t,r){const s=eIn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),d=Mb(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=pm(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=Mb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+pm(_));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+c+m}function tIn(e,n,t){return t.options.emphasis||"*"}function nIn(e,n){let t=!1;return fC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,G5}),!!((!e.depth||e.depth<3)&&iC(e)&&(n.options.setext||t))}function rIn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(nIn(e,t)){const d=t.enter("headingSetext"),_=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` +`)),d+=o.move(c),u(),d}function xIn(e,n,t){return(t?"":" ")+e}function DC(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function wIn(e,n,t,r){const s=DC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("[");return u+=c.move(t.safe(t.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":` +`,...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function kIn(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function mm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ob(e,n,t){const r=Hh(e),s=Hh(n);return r===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}TH.peek=SIn;function TH(e,n,t,r){const s=kIn(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),d=Ob(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=mm(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=Ob(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+mm(f));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+c+m}function SIn(e,n,t){return t.options.emphasis||"*"}function CIn(e,n){let t=!1;return fC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,G5}),!!((!e.depth||e.depth<3)&&iC(e)&&(n.options.setext||t))}function EIn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(CIn(e,t)){const d=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` `,after:` -`});return _(),d(),p+` +`});return f(),d(),p+` `+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` `))+1))}const a="#".repeat(s),o=t.enter("headingAtx"),c=t.enter("phrasing");i.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` -`,...i.current()});return/^[\t ]/.test(u)&&(u=pm(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}RH.peek=sIn;function RH(e){return e.value||""}function sIn(){return"<"}MH.peek=iIn;function MH(e,n,t,r){const s=DC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function iIn(){return"!"}OH.peek=aIn;function OH(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const u=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=d,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function aIn(){return"!"}DH.peek=oIn;function DH(e,n,t){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}IH.peek=cIn;function IH(e,n,t,r){const s=DC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(LH(e,t)){const d=t.stack;t.stack=[],o=t.enter("autolink");let _=a.move("<");return _+=a.move(t.containerPhrasing(e,{before:_,after:">",...a.current()})),_+=a.move(">"),o(),t.stack=d,_}o=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=t.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),o(),u}function cIn(e,n,t){return LH(e,t)?"<":"["}$H.peek=lIn;function $H(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const _=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=d,i(),s==="full"||!u||u!==_?c+=o.move(_+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function lIn(){return"["}function LC(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function uIn(e){const n=LC(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function _In(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function BH(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function fIn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?_In(t):LC(t);const o=e.ordered?a==="."?")":".":uIn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),BH(t)===a&&d){let _=-1;for(;++_-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=t.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),d);return c(),u;function d(_,p,m){return p?(m?"":" ".repeat(a))+_:(m?i:i+" ".repeat(a-i.length))+_}}function pIn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const mIn=og(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function gIn(e,n,t,r){return(e.children.some(function(a){return mIn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function vIn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}PH.peek=bIn;function PH(e,n,t,r){const s=vIn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),d=Mb(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=pm(u)+c.slice(1));const _=c.charCodeAt(c.length-1),p=Mb(r.after.charCodeAt(0),_,s);p.inside&&(c=c.slice(0,-1)+pm(_));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+c+m}function bIn(e,n,t){return t.options.strong||"*"}function yIn(e,n,t,r){return t.safe(e.value,r)}function xIn(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function wIn(e,n,t){const r=(BH(t)+(t.options.ruleSpaces?" ":"")).repeat(xIn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const FH={blockquote:VLn,break:RR,code:YLn,definition:JLn,emphasis:TH,hardBreak:RR,heading:rIn,html:RH,image:MH,imageReference:OH,inlineCode:DH,link:IH,linkReference:$H,list:fIn,listItem:hIn,paragraph:pIn,root:gIn,strong:PH,text:yIn,thematicBreak:wIn};function kIn(){return{enter:{table:SIn,tableData:MR,tableHeader:MR,tableRow:EIn},exit:{codeText:NIn,table:CIn,tableData:E4,tableHeader:E4,tableRow:E4}}}function SIn(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function CIn(e){this.exit(e),this.data.inTable=void 0}function EIn(e){this.enter({type:"tableRow",children:[]},e)}function E4(e){this.exit(e)}function MR(e){this.enter({type:"tableCell",children:[]},e)}function NIn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,zIn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function zIn(e,n){return n==="|"?n:e}function jIn(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:o}};function a(m,w,k,v){return u(d(m,k,v),m.align)}function o(m,w,k,v){const y=_(m,k,v),x=u([y]);return x.slice(0,x.indexOf(` -`))}function c(m,w,k,v){const y=k.enter("tableCell"),x=k.enter("phrasing"),b=k.containerPhrasing(m,{...v,before:i,after:i});return x(),y(),b}function u(m,w){return ULn(m,{align:w,alignDelimiters:r,padding:t,stringLength:s})}function d(m,w,k){const v=m.children;let y=-1;const x=[],b=w.enter("table");for(;++y0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const KIn={tokenize:t$n,partial:!0};function WIn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ZIn,continuation:{tokenize:JIn},exit:e$n}},text:{91:{name:"gfmFootnoteCall",tokenize:YIn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:QIn,resolveTo:XIn}}}}function QIn(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return t(c);const u=Go(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function XIn(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function YIn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(_){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),c}function c(_){return _!==94?t(_):(e.enter("gfmFootnoteCallMarker"),e.consume(_),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(_){if(i>999||_===93&&!a||_===null||_===91||xr(_))return t(_);if(_===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Go(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(_),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(_)}return xr(_)||(a=!0),i++,e.consume(_),_===92?d:u}function d(_){return _===91||_===92||_===93?(e.consume(_),i++,u):u(_)}}function ZIn(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(w)}function d(w){if(a>999||w===93&&!o||w===null||w===91||xr(w))return t(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=Go(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return xr(w)||(o=!0),a++,e.consume(w),w===92?_:d}function _(w){return w===91||w===92||w===93?(e.consume(w),a++,d):d(w)}function p(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(i)||s.push(i),Cn(e,m,"gfmFootnoteDefinitionWhitespace")):t(w)}function m(w){return n(w)}}function JIn(e,n,t){return e.check(ag,n,e.attempt(KIn,n,t))}function e$n(e){e.exit("gfmFootnoteDefinition")}function t$n(e,n,t){const r=this;return Cn(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(i):t(i)}}function n$n(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let c=-1;for(;++c1?c(w):(a.consume(w),_++,m);if(_<2&&!t)return c(w);const v=a.exit("strikethroughSequenceTemporary"),y=Hh(w);return v._open=!y||y===2&&!!k,v._close=!k||k===2&&!!y,o(w)}}}class r$n{constructor(){this.map=[]}add(n,t,r){s$n(this,n,t,r)}consume(n){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let s=r.pop();for(;s;){for(const i of s)n.push(i);s=r.pop()}this.map.length=0}}function s$n(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const H=r.events[L][1].type;if(H==="lineEnding"||H==="linePrefix")L--;else break}const B=L>-1?r.events[L][1].type:null,U=B==="tableHead"||B==="tableRow"?z:c;return U===z&&r.parser.lazy[r.now().line]?t(D):U(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),d(D)}function d(D){return D===null?t(D):It(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):zn(D)?Cn(e,d,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),_(D)))}function _(D){return D===null||D===124||xr(D)?(e.exit("data"),d(D)):(e.consume(D),D===92?p:_)}function p(D){return D===92||D===124?(e.consume(D),_):_(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(D):(e.enter("tableDelimiterRow"),a=!1,zn(D)?Cn(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):w(D))}function w(D){return D===45||D===58?v(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):N(D)}function k(D){return zn(D)?Cn(e,v,"whitespace")(D):v(D)}function v(D){return D===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):D===45?(i+=1,y(D)):D===null||It(D)?C(D):N(D)}function y(D){return D===45?(e.enter("tableDelimiterFiller"),x(D)):N(D)}function x(D){return D===45?(e.consume(D),x):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(D))}function b(D){return zn(D)?Cn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?w(D):D===null||It(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function z(D){return e.enter("tableRow"),A(D)}function A(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),A):D===null||It(D)?(e.exit("tableRow"),n(D)):zn(D)?Cn(e,A,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||xr(D)?(e.exit("data"),A(D)):(e.consume(D),D===92?M:j)}function M(D){return D===92||D===124?(e.consume(D),j):j(D)}}function c$n(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,d,_;const p=new r$n;for(;++tt[2]+1){const w=t[2]+1,k=t[3]-t[2]-1;e.add(w,k,[])}}e.add(t[3]+1,0,[["exit",_,n]])}return s!==void 0&&(i.end=Object.assign({},Yd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function DR(e,n,t,r,s){const i=[],a=Yd(n.events,t);s&&(s.end=Object.assign({},a),i.push(["exit",s,n])),r.end=Object.assign({},a),i.push(["exit",r,n]),e.add(t+1,0,i)}function Yd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const l$n={name:"tasklistCheck",tokenize:_$n};function u$n(){return{text:{91:l$n}}}function _$n(e,n,t){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return xr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return It(c)?n(c):zn(c)?e.check({tokenize:f$n},n,t)(c):t(c)}}function f$n(e,n,t){return Cn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function d$n(e){return DP([$In(),WIn(),n$n(e),a$n(),u$n()])}const h$n={};function XH(e){const n=this,t=e||h$n,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(d$n(t)),i.push(OIn()),a.push(DIn(t))}function p$n(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const _=d.data.hChildren[0];_.type,_.tagName,_.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function m$n(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` -`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(i,a,o,c){const u=i.value||"",d=o.createTracker(c),_="$".repeat(Math.max(AH(u,"$")+1,2)),p=o.enter("mathFlow");let m=d.move(_);if(i.meta){const w=o.enter("mathFlowMeta");m+=d.move(o.safe(i.meta,{after:` +`,...i.current()});return/^[\t ]/.test(u)&&(u=mm(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}RH.peek=NIn;function RH(e){return e.value||""}function NIn(){return"<"}MH.peek=zIn;function MH(e,n,t,r){const s=DC(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const c=t.createTracker(r);let u=c.move("![");return u+=c.move(t.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(t.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=t.enter("destinationRaw"),u+=c.move(t.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(t.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function zIn(){return"!"}OH.peek=jIn;function OH(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("![");const u=t.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=d,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function jIn(){return"!"}DH.peek=AIn;function DH(e,n,t){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}IH.peek=TIn;function IH(e,n,t,r){const s=DC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(LH(e,t)){const d=t.stack;t.stack=[],o=t.enter("autolink");let f=a.move("<");return f+=a.move(t.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),o(),t.stack=d,f}o=t.enter("link"),c=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=t.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),o(),u}function TIn(e,n,t){return LH(e,t)?"<":"["}$H.peek=RIn;function $H(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let c=o.move("[");const u=t.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const d=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=d,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function RIn(){return"["}function LC(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function MIn(e){const n=LC(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function OIn(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function BH(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function DIn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?OIn(t):LC(t);const o=e.ordered?a==="."?")":".":MIn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),BH(t)===a&&d){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=t.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const c=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),d);return c(),u;function d(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?i:i+" ".repeat(a-i.length))+f}}function $In(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const BIn=cg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function PIn(e,n,t,r){return(e.children.some(function(a){return BIn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function FIn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}PH.peek=HIn;function PH(e,n,t,r){const s=FIn(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let c=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),d=Ob(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=mm(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=Ob(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+mm(f));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+c+m}function HIn(e,n,t){return t.options.strong||"*"}function qIn(e,n,t,r){return t.safe(e.value,r)}function UIn(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function GIn(e,n,t){const r=(BH(t)+(t.options.ruleSpaces?" ":"")).repeat(UIn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const FH={blockquote:pIn,break:RR,code:yIn,definition:wIn,emphasis:TH,hardBreak:RR,heading:EIn,html:RH,image:MH,imageReference:OH,inlineCode:DH,link:IH,linkReference:$H,list:DIn,listItem:IIn,paragraph:$In,root:PIn,strong:PH,text:qIn,thematicBreak:GIn};function VIn(){return{enter:{table:KIn,tableData:MR,tableHeader:MR,tableRow:QIn},exit:{codeText:XIn,table:WIn,tableData:E4,tableHeader:E4,tableRow:E4}}}function KIn(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function WIn(e){this.exit(e),this.data.inTable=void 0}function QIn(e){this.enter({type:"tableRow",children:[]},e)}function E4(e){this.exit(e)}function MR(e){this.enter({type:"tableCell",children:[]},e)}function XIn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,YIn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function YIn(e,n){return n==="|"?n:e}function ZIn(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:o}};function a(m,w,k,v){return u(d(m,k,v),m.align)}function o(m,w,k,v){const y=f(m,k,v),x=u([y]);return x.slice(0,x.indexOf(` +`))}function c(m,w,k,v){const y=k.enter("tableCell"),x=k.enter("phrasing"),b=k.containerPhrasing(m,{...v,before:i,after:i});return x(),y(),b}function u(m,w){return dIn(m,{align:w,alignDelimiters:r,padding:t,stringLength:s})}function d(m,w,k){const v=m.children;let y=-1;const x=[],b=w.enter("table");for(;++y0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const m$n={tokenize:S$n,partial:!0};function g$n(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:x$n,continuation:{tokenize:w$n},exit:k$n}},text:{91:{name:"gfmFootnoteCall",tokenize:y$n},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:v$n,resolveTo:b$n}}}}function v$n(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return t(c);const u=Go(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function b$n(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function y$n(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?t(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(i>999||f===93&&!a||f===null||f===91||wr(f))return t(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Go(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return wr(f)||(a=!0),i++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function x$n(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):t(w)}function d(w){if(a>999||w===93&&!o||w===null||w===91||wr(w))return t(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=Go(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return wr(w)||(o=!0),a++,e.consume(w),w===92?f:d}function f(w){return w===91||w===92||w===93?(e.consume(w),a++,d):d(w)}function p(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(i)||s.push(i),Cn(e,m,"gfmFootnoteDefinitionWhitespace")):t(w)}function m(w){return n(w)}}function w$n(e,n,t){return e.check(og,n,e.attempt(m$n,n,t))}function k$n(e){e.exit("gfmFootnoteDefinition")}function S$n(e,n,t){const r=this;return Cn(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(i):t(i)}}function C$n(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let c=-1;for(;++c1?c(w):(a.consume(w),f++,m);if(f<2&&!t)return c(w);const v=a.exit("strikethroughSequenceTemporary"),y=Hh(w);return v._open=!y||y===2&&!!k,v._close=!k||k===2&&!!y,o(w)}}}class E$n{constructor(){this.map=[]}add(n,t,r){N$n(this,n,t,r)}consume(n){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let s=r.pop();for(;s;){for(const i of s)n.push(i);s=r.pop()}this.map.length=0}}function N$n(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const H=r.events[L][1].type;if(H==="lineEnding"||H==="linePrefix")L--;else break}const B=L>-1?r.events[L][1].type:null,U=B==="tableHead"||B==="tableRow"?z:c;return U===z&&r.parser.lazy[r.now().line]?t(D):U(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),d(D)}function d(D){return D===null?t(D):Bt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):zn(D)?Cn(e,d,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),f(D)))}function f(D){return D===null||D===124||wr(D)?(e.exit("data"),d(D)):(e.consume(D),D===92?p:f)}function p(D){return D===92||D===124?(e.consume(D),f):f(D)}function m(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(D):(e.enter("tableDelimiterRow"),a=!1,zn(D)?Cn(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):w(D))}function w(D){return D===45||D===58?v(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):N(D)}function k(D){return zn(D)?Cn(e,v,"whitespace")(D):v(D)}function v(D){return D===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),y):D===45?(i+=1,y(D)):D===null||Bt(D)?C(D):N(D)}function y(D){return D===45?(e.enter("tableDelimiterFiller"),x(D)):N(D)}function x(D){return D===45?(e.consume(D),x):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(D))}function b(D){return zn(D)?Cn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?w(D):D===null||Bt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function z(D){return e.enter("tableRow"),A(D)}function A(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),A):D===null||Bt(D)?(e.exit("tableRow"),n(D)):zn(D)?Cn(e,A,"whitespace")(D):(e.enter("data"),j(D))}function j(D){return D===null||D===124||wr(D)?(e.exit("data"),A(D)):(e.consume(D),D===92?M:j)}function M(D){return D===92||D===124?(e.consume(D),j):j(D)}}function T$n(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,d,f;const p=new E$n;for(;++tt[2]+1){const w=t[2]+1,k=t[3]-t[2]-1;e.add(w,k,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(i.end=Object.assign({},Yd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function DR(e,n,t,r,s){const i=[],a=Yd(n.events,t);s&&(s.end=Object.assign({},a),i.push(["exit",s,n])),r.end=Object.assign({},a),i.push(["exit",r,n]),e.add(t+1,0,i)}function Yd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const R$n={name:"tasklistCheck",tokenize:O$n};function M$n(){return{text:{91:R$n}}}function O$n(e,n,t){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return wr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):t(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(c)}function o(c){return Bt(c)?n(c):zn(c)?e.check({tokenize:D$n},n,t)(c):t(c)}}function D$n(e,n,t){return Cn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function L$n(e){return DP([o$n(),g$n(),C$n(e),j$n(),M$n()])}const I$n={};function XH(e){const n=this,t=e||I$n,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(L$n(t)),i.push(r$n()),a.push(s$n(t))}function $$n(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(c){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u;const f=d.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function a(c){const u=this.resume(),d=this.stack[this.stack.length-1];d.type,this.exit(c),d.value=u,d.data.hChildren.push({type:"text",value:u})}function o(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function B$n(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(i,a,o,c){const u=i.value||"",d=o.createTracker(c),f="$".repeat(Math.max(AH(u,"$")+1,2)),p=o.enter("mathFlow");let m=d.move(f);if(i.meta){const w=o.enter("mathFlowMeta");m+=d.move(o.safe(i.meta,{after:` `,before:m,encode:["$"],...d.current()})),w()}return m+=d.move(` `),u&&(m+=d.move(u+` -`)),m+=d.move(_),p(),m}function r(i,a,o){let c=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let _=-1;for(;++_=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function xk(e){var a;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(o){r+=o[0].length,s+=1;continue}const c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!c)break;r+=c[0].length,t+=c[0].length,n=!0}const i=((a=/^[ \t]*/.exec(e.slice(r)))==null?void 0:a[0].length)??0;return{hasListMarker:n,indentation:i,listIndent:t,offset:r+i,quoteDepth:s}}function N$n(e,n){const t=e[n];if(t!=="`"&&t!=="~"||mm(e,n)||Kh(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`)),m+=d.move(f),p(),m}function r(i,a,o){let c=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(c);)u++;const d="$".repeat(u);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let f=-1;for(;++f=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function xk(e){var a;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(o){r+=o[0].length,s+=1;continue}const c=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!c)break;r+=c[0].length,t+=c[0].length,n=!0}const i=((a=/^[ \t]*/.exec(e.slice(r)))==null?void 0:a[0].length)??0;return{hasListMarker:n,indentation:i,listIndent:t,offset:r+i,quoteDepth:s}}function X$n(e,n){const t=e[n];if(t!=="`"&&t!=="~"||gm(e,n)||Kh(e,n,t)<3)return!1;const r=e.lastIndexOf(` `,n-1)+1,s=e.indexOf(` -`,n),i=e.slice(r,s===-1?e.length:s),a=xk(i);return a.indentation<=3&&r+a.offset===n}function z$n(e,n){const t=e[n],r=Kh(e,n,t),s=e.lastIndexOf(` +`,n),i=e.slice(r,s===-1?e.length:s),a=xk(i);return a.indentation<=3&&r+a.offset===n}function Y$n(e,n){const t=e[n],r=Kh(e,n,t),s=e.lastIndexOf(` `,n-1)+1,i=e.indexOf(` `,n),a=xk(e.slice(s,i===-1?e.length:i));let o=e.indexOf(` `,n+r);if(o===-1)return e.length;for(o+=1;o=a.listIndent&&_.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function j$n(e,n,t){const r=Kh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function T$n(e){const n=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function M$n(e,{predictMath:n=!1}={}){const t=T$n(e),r=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(r,s)=>`$$${s}$$`);return n.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(r,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(r,s)=>`$$${s}`)),M$n(t,n)}function JH(e,n={}){let t="",r=0,s=0;for(;ss!==n);return{order:e.order.filter(s=>s!==n),previewKey:e.previewKey===n?null:e.previewKey,fallbackKey:r[r.length-1]??null}}function L$n(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function ns(e,n={}){const t=r=>{n.stopPropagation&&r.stopPropagation()};return{onClick:r=>{t(r),e("preview")},onDoubleClick:r=>{t(r),e("keepOpen")},onAuxClick:r=>{r.button===1&&(r.preventDefault(),t(r),e("keepOpen"))},onKeyDown:r=>{const s=L$n(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const eq=T.createContext(void 0);function tq({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=rF(s);return a?(a.source==="absolute"?jI(a.path):a.source==="artifact"&&!i?zf(e,a.path):J3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return f.jsx(eq,{value:r,children:t})}function I$n({src:e,alt:n,name:t,onClose:r}){const s=T.useRef(null),i=T.useRef(null),[a,o]=T.useState(1),[c,u]=T.useState({width:0,height:0}),[d,_]=T.useState({width:0,height:0});T.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const w=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return w&&k.observe(w),()=>{k.disconnect(),m==null||m.close()}},[]);const p=d.width&&c.width?Math.min(1,c.width*.9/d.width,c.height*.9/d.height):1;return ni.createPortal(f.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||uL(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[f.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:f.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:f.jsx("img",{src:e,alt:n,onLoad:m=>_({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:d.width?{width:d.width*p*a,height:d.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${d.width&&c.width?"visible":"invisible"}`})})}),f.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[f.jsx(rp,{shape:"circle",href:e,download:t||!0,"aria-label":B3(),title:B3(),className:"bg-background shadow-popover",children:f.jsx(eg,{size:16})}),f.jsx(At,{shape:"circle",onClick:r,"aria-label":sb(),title:sb(),className:"bg-background shadow-popover",children:f.jsx(ur,{size:16})})]}),f.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&f.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),f.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[f.jsx(At,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":bz(),title:bz(),children:f.jsx(q6n,{size:16})}),f.jsxs(Oe,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:yz(),"aria-label":yz(),children:[Math.round(a*100),"%"]}),f.jsx(At,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":vz(),title:vz(),children:f.jsx(Qf,{size:16})})]})]})]}),document.body)}function $$n({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=T.useState(!1),[o,c]=T.useState(!1),u=i&&n?n:e;return f.jsxs(f.Fragment,{children:[f.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:d=>{d.preventDefault(),d.stopPropagation(),c(!0)},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&f.jsx(I$n,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const B$n=1e5;function P$n({code:e,lang:n}){const[t,r]=T.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return f.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[f.jsx(At,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:AS(),"aria-label":Wtt(),onClick:s,children:t?f.jsx(ti,{size:13}):f.jsx(Wf,{size:13})}),f.jsx("pre",{children:f.jsx("code",{children:m8n(e,n,B$n)})})]})}function F$n(e){const n={};for(const t of e.matchAll(/([\w-]+)=(["'])(.*?)\2/g)){const r=t[1];r&&(n[r.toLowerCase()]=t[3]??"")}return n}function BR(e,n,t){let r=n.line,s=n.column;for(let i=0;i]*?)\/?>/gi,r=[];let s=0,i=!1;for(const a of n.matchAll(t)){const o=(a[1]??"").toLowerCase(),c=F$n(a[2]??"");if(!c[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:z4(e,s,a.index)});const d=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:z4(e,a.index,d),type:o==="run"?"runMention":"fileMention"}),s=d}return i?(snq(e)}function FR({path:e,line:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n!=null?`${s}:${n}`:s;return f.jsxs("button",{className:"file-chip",title:r?UZ({path:Ae(e)}):e,...ns(a=>r==null?void 0:r(e,n,t,void 0,a)),disabled:!r,children:[f.jsx(j$,{size:12}),f.jsx("span",{className:"file-chip-label",children:i}),f.jsx(O$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function q$n({id:e,label:n,onOpenRun:t}){return f.jsxs("button",{className:"file-chip run-chip",title:t?uJ({id:Ae(e)}):_ee({id:Ae(e)}),...ns(r=>t==null?void 0:t(e,r)),disabled:!t,children:[f.jsx(YS,{size:12}),f.jsx("span",{className:"file-chip-label",children:n||yI()}),f.jsx(O$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const rq={singleDollarTextMath:!0},U$n=Gy().use(Hy).use(XH).use(YH,rq).use(E$n).use(H$n).use(Cb).use(mRn).use(CH);function G$n(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const sq={code:({node:e,className:n,children:t,...r})=>{const s=n??"",i=/language-(\w+)/.exec(s),a=String(t??"").replace(/\n$/,"");if(!(i!=null||a.includes(` -`)))return f.jsx("code",{className:s,...r,children:t});const c=i?C5(i[1]):null;return f.jsx(P$n,{code:a,lang:c})},pre:({children:e})=>f.jsx(f.Fragment,{children:e})};function V$n({children:e}){return f.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const $c=T.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){d_();const o=T.useContext(eq),c=i??o,u=T.useMemo(()=>({"file-mention":d=>{const _=X5(d.path),p=d.lines&&pRn(d.lines)||_.line;return f.jsx(FR,{path:_.path,line:p,exp:d.exp,onOpenFile:t})},"run-mention":d=>f.jsx(q$n,{id:d.id,label:d.label,onOpenRun:r}),a:({node:d,href:_,children:p,"data-figure-src":m,"data-cited-href":w,...k})=>{const v=typeof m=="string"?rF(m):null;if(v&&t){const b=v.source==="artifact"?`artifacts/${v.path}`:v.path,C=s?s(b):b;if(C)return f.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...ns(N=>t(C,void 0,void 0,void 0,N)),children:p})}const y=typeof w=="string"?w:_,x=y?X5(y):null;if(x&&G$n(x.path)&&t){let b;try{b=decodeURI(x.path)}catch{return f.jsx("span",{children:p})}const C=s?s(b):b;return C?f.jsx(FR,{path:C,line:x.line,onOpenFile:t}):f.jsx("span",{children:p})}return f.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",...k,children:p})},figure:({children:d})=>f.jsx(V$n,{children:d}),figcaption:({children:d})=>f.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:d}),th:({node:d,..._})=>f.jsx("th",{dir:"auto",..._}),td:({node:d,..._})=>f.jsx("td",{dir:"auto",..._}),img:({node:d,src:_,alt:p,className:m,...w})=>{var v;if(!_||typeof _!="string")return null;const k=c?c(_):_;return k?T.createElement($$n,{...w,key:k,downloadName:(v=_.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(_,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...sq}),[t,r,s,i,o,c]);return f.jsx("div",{dir:"auto","data-streaming":a||void 0,className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:text-prose-emphasis [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h2]:text-text [&_h2]:text-prose-emphasis [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mx-0 [&_h2]:mb-1.5 [&_h3]:text-text [&_h3]:text-prose-emphasis [&_h3]:font-semibold [&_h3]:mt-3 [&_h3]:mx-0 [&_h3]:mb-1.5 [&_h4]:text-text [&_h4]:text-prose-emphasis [&_h4]:font-semibold [&_h4]:mt-3 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_table]:overflow-x-auto [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text",children:f.jsx($Mn,{content:JH(n,{predictMath:a}),processor:U$n,components:u,predict:a})})}),HR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function K$n({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=T.useState(!1),u=T.useRef(null),[d,_]=T.useState(!1),[p,m]=T.useState(""),w=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=y=>{u.current&&!u.current.contains(y.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;d&&((v=w.current)==null||v.focus())},[d]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),_(!1)};return f.jsxs("div",{className:"plan-strip relative w-full mt-0 mx-0 mb-2.5 py-[11px] px-[13px] flex flex-col items-stretch gap-2.5 border border-border border-s-[3px] border-s-accent-blue rounded-md bg-surface shadow-plan",children:[f.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[f.jsx(YS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),f.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?uwt({agent:Ae(n)}):rwt({agent:Ae(n)})}),f.jsx("button",{className:"plan-strip-open ms-auto p-0 border-0 bg-none bg-transparent text-accent-blue text-sm cursor-pointer whitespace-nowrap shrink-0 [&:hover]:underline",...ns(t),children:Awt()})]}),d?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{dir:"auto",ref:w,className:"plan-strip-revise-input w-full resize-none border border-border rounded-md py-[9px] px-[11px] text-sm font-[inherit] bg-background text-text [&:focus]:border-accent-blue",placeholder:s4t(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),_(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),f.jsxs("div",{className:HR,children:[f.jsx(Oe,{size:"small",onClick:()=>{m(""),_(!1)},children:IL()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),f.jsxs(Oe,{size:"small",variant:"primary",onClick:k,children:[Uwt(),f.jsx(z$,{size:13})]})]})]}):f.jsxs("div",{className:HR,children:[f.jsx(Oe,{size:"small",onClick:i,children:Iwt()}),f.jsx(Oe,{size:"small",onClick:()=>_(!0),children:Ywt()}),f.jsx("span",{className:"plan-strip-spacer flex-1"}),s?f.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[f.jsx(Oe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:L2t()}),f.jsx(Oe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":kwt(),onClick:()=>c(v=>!v),children:f.jsx(qc,{size:13})}),o&&f.jsx("div",{className:"plan-strip-menu absolute end-0 bottom-[calc(100%_+_4px)] flex min-w-47.5 flex-col rounded-md border border-border bg-surface p-1 shadow-plan-menu z-6",children:f.jsx(on,{onClick:()=>{c(!1),r("bypassPermissions")},children:q2t()})})]}):f.jsx(Oe,{size:"small",variant:"primary",onClick:()=>r(),children:X2t()})]})]})}function qR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,d]=T.useState(null);async function _(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),d(null);try{n(await e(i.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{c(!1)}}}return f.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[f.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),f.jsx(Oe,{type:"submit",disabled:o||!i.trim(),children:o?Ba():Qo()}),f.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??RWe()}),u&&f.jsx("div",{className:"error",children:u})]})}function iq({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return f.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[f.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:f.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${i}%`,background:s}})}),(t!==void 0||r!==void 0)&&f.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[f.jsx("span",{children:t??`${i}%`}),r]})]})}function W$n({settings:e}){const[n,t]=T.useState(!1);return f.jsxs("label",{className:"inline-flex max-w-full flex-wrap items-center gap-2 text-sm text-subtext",children:[M_n(),f.jsx("span",{className:"inline-block w-max max-w-full",children:f.jsx(Lc,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:eI()},...e.defaultHost&&!e.hosts.some(r=>r.host===e.defaultHost)?[{id:e.defaultHost,label:e.defaultHost}]:[],...e.hosts.map(r=>({id:r.host,label:r.host}))],onSelect:r=>{t(!0),h4n(r||null).catch(s=>{tn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function Q$n({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=vn({mutationFn:d4n,scope:{id:`ssh-settings-${e.host}`}});function a(o){r(o),i.reset(),!(o!==null&&!o.trim())&&i.mutate({host:e.host,container:(o==null?void 0:o.trim())??null})}return f.jsxs("details",{className:"pb-3",children:[f.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-subtext focus-visible:outline-2 focus-visible:outline-text",children:zL()}),f.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[f.jsxs("label",{className:"text-sm text-subtext",children:[efn(),f.jsx(Lc,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:P_n()},{id:"container",label:K_n()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&f.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[E_n(),f.jsx(qr,{id:`${s}-container`,value:t,disabled:n,required:!0,onChange:o=>a(o.target.value)})]}),i.error&&f.jsx("p",{className:"m-0 text-sm text-accent-red",role:"status",children:i.error.message})]})]})}const Bc=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text","[&_.settings-sub]:mb-3 [&_.kv]:gap-y-1.5 [&_.kv]:gap-x-4.5","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0"].join(" "),Lf=["kv grid grid-cols-[auto_1fr] items-baseline gap-y-[3px] gap-x-3.5 text-base","[&_.k]:text-sm [&_.k]:text-subtext [&_.v]:text-base [&_.v]:text-text","[&_.v]:break-all"].join(" "),X$n=["grid grid-cols-[9rem_minmax(0,1fr)] items-center gap-x-5 gap-y-2.5 font-sans text-base text-text","[&_.k]:font-medium [&_.k]:text-sm [&_.k]:text-text","[&_.v]:min-w-0 [&_.v]:flex [&_.v]:items-center [&_.v]:flex-wrap [&_.v]:gap-2","[&_.v]:font-sans [&_.v]:text-base [&_.v]:text-text [&_.v]:break-words"].join(" "),ix="mt-3 mx-0 mb-0 ps-3 border-s-2 border-s-accent-red font-sans text-base leading-relaxed text-text whitespace-pre-wrap",mo=["settings-note mt-2.5 mx-0 mb-0 text-base py-2 px-2.5","border border-accent-amber rounded-md bg-accent-amber-subtle","text-accent-amber font-medium"].join(" "),$C=["form font-sans text-sm text-text [&_.form-seg]:self-start [&_.form-seg]:mb-0.5","[&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3","[&_.repo-hint]:font-normal [&_.repo-hint]:text-sm","[&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal","[&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center","[&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full","[&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5","[&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background","[&_.folder-picker-control]:border [&_.folder-picker-control]:border-border","[&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer","[&_.folder-picker-control]:text-start","[&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard","[&_.folder-picker-control:hover:not(:disabled)]:border-muted","[&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle","[&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text","[&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1","[&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden","[&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap","[&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none","[&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none","[&_.folder-picker-chevron]:text-muted","[&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext","[&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm","[&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4]","[&_.project-location-field]:flex [&_.project-location-field]:flex-col","[&_.project-location-field]:gap-2 [&_.project-location-label]:text-text","[&_.project-location-label]:text-base","[&_.project-location-label]:font-medium [&_.project-field-label]:text-text","[&_.project-field-label]:text-base [&_.project-field-label]:font-medium","[&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65","[&_.paper-destination]:flex [&_.paper-destination]:items-center","[&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3","[&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md","[&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1","[&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden","[&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm","[&_.paper-destination_code]:font-normal","[&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap","[&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px]","[&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant","[&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface","[&_.project-path-notice]:text-base [&_.project-path-notice]:leading-relaxed [&_.project-path-notice]:text-text","[&_.project-path-notice]:leading-[1.4]","[&_.project-path-notice.error]:border-danger-notice-border","[&_.paper-results]:flex [&_.paper-results]:flex-col","[&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md","[&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto","[&_.paper-results_button]:flex [&_.paper-results_button]:flex-col","[&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5","[&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent","[&_.paper-results_button]:border-0","[&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant","[&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit]","[&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer","[&_.paper-results_button:last-child]:border-b-0","[&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm","[&_.paper-results_.title]:font-medium","[&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted","[&_.paper-pick_.id]:text-xs","[&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center","[&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3","[&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md","[&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0","[&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium","flex flex-col gap-2.5 [&_label]:flex [&_label]:flex-col","[&_label]:gap-1 [&_label]:text-sm [&_label]:text-text","[&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2","[&_input]:font-sans [&_input]:text-sm [&_input]:font-normal [&_input]:text-text [&_input::placeholder]:text-subtext","[&_select]:font-sans [&_select]:text-sm [&_select]:font-normal [&_select]:text-text","[&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end","[&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start","[&_.new-project-actions]:mt-2.5","[&_.error]:text-accent-red [&_.error]:text-base [&_.error]:whitespace-pre-wrap","settings-form mt-3.5 pt-3.5 border-t border-t-border"].join(" "),Il=["project-default-row flex items-center justify-between gap-6","pt-3.5 border-t border-t-border-variant [&_p]:mt-[3px] [&_p]:mx-0 [&_p]:mb-0","[&_.project-default-title]:text-base [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-text"].join(" "),wk=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base","[&_h3]:font-semibold [&_h3]:text-text [&_.settings-sub]:mb-3","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0","git-settings-card py-3.5 px-4 [&_h3]:mb-3","[&_.kv]:grid-cols-[132px_minmax(0,_1fr)] [&_.kv]:items-center [&_.kv]:gap-y-[9px] [&_.kv]:gap-x-4.5","[&_.kv_.k]:text-sm [&_.kv_.v]:flex [&_.kv_.v]:items-center","[&_.kv_.v]:flex-wrap [&_.kv_.v]:gap-[7px] [&_.kv_.v]:min-w-0 [&_.kv_.v]:font-sans","[&_.kv_.v]:text-base [&_.kv_.v]:break-normal","[@media((max-width:_640px))]:[&_.kv]:grid-cols-1","[@media((max-width:_640px))]:[&_.kv]:gap-[3px] [@media((max-width:_640px))]:[&_.kv_.v_+_.k]:mt-[7px]"].join(" "),H0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),Hd=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" "),Y$n=new Set(["gh auth login","hf auth login","claude auth status"]);function aq(e){return Y$n.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function ax(){const[e,n]=T.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function BC({note:e,className:n,disabled:t,resolve:r=aq,onRun:s}){return e?f.jsx("p",{className:n,children:s_(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function ox({run:e,onComplete:n,onClose:t}){return e?f.jsx(VCn,{path:e.path,label:e.command,onComplete:n,onError:r=>tn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function j4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:Ef()}:e.authCheckFailed?{cls:"warn",variant:"warning",label:nb()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:AL()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="thirdParty"||by(e)?Xm():e.authMethod==="local"?RS():uXt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:dFt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:TL()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:nb()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:SZt()}:{cls:"warn",variant:"warning",label:tI()}:{cls:"warn",variant:"warning",label:$Gt()}}function Z$n({h:e}){if(e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod)return f.jsx(f.Fragment,{children:Wjt()});const n=by(e);return n?f.jsx(f.Fragment,{children:n}):e.authMethod?e.authMethod==="local"?f.jsx(f.Fragment,{children:G3()}):e.authMethod==="thirdParty"?f.jsx(f.Fragment,{children:cI()}):f.jsx(f.Fragment,{children:e.authMethod==="oauth"?tDt():TS()}):f.jsx(f.Fragment,{children:"—"})}function J$n(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function eBn({remote:e}){const n=r_(),{data:t=null}=ft(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=ax(),[c,u]=T.useState(null),d=ft(GI()),_=(w,k=!1)=>{a(!0),jf(w,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((w,k)=>Number(k.agentReady)-Number(w.agentReady)),m=p.find(w=>w.id===r)??p[0];return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:Q3()}),!e&&c&&d.data&&f.jsx(J$,{harness:c,commands:d.data[c.id],onClose:()=>u(null)}),f.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:f.jsx(Lc,{variant:"field",dropDown:!0,title:Q3(),choices:p.map(w=>({id:w.id,label:w.name})),value:(m==null?void 0:m.id)??null,onSelect:w=>{const k=p.find(v=>v.id===w);k&&s(k.id)},renderIcon:w=>{const k=p.find(v=>v.id===w.id);return k&&f.jsx(Ph,{harness:k.id})},renderLabel:w=>{const k=p.find(y=>y.id===w.id),v=k&&j4(k);return f.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[w.label,v&&f.jsxs(f.Fragment,{children:[f.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),f.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?f.jsxs("div",{className:Bc,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx(Zt,{variant:j4(m).variant,children:j4(m).label}),f.jsx("div",{className:"spacer flex-1"}),!e&&!m.catalogPending&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&(m.id==="claude-code"?m.loginEligible:m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported")&&f.jsxs(Oe,{size:"small",onClick:()=>u(m),disabled:!d.data,"aria-haspopup":"dialog",children:[f.jsx(Xf,{size:14})," ",kL()]}),f.jsxs(Oe,{size:"small",onClick:()=>_(!0,!0),disabled:i,children:[f.jsx(xo,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Ym()]})]}),f.jsxs("div",{className:$s(Lf,"[&_.v]:text-sm"),children:[f.jsx("span",{className:"k",children:OLt()}),f.jsx("span",{className:"v",children:m.binPath??zOt()}),f.jsx("span",{className:"k",children:oI()}),f.jsx("span",{className:"v",children:m.version??"—"}),f.jsx("span",{className:"k",children:tLt()}),f.jsx("span",{className:"v",children:f.jsx(Z$n,{h:m})}),m.account&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:m.id==="opencode"?cI():LS()}),f.jsx("span",{className:"v",children:m.account})]}),m.org&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:XVt()}),f.jsx("span",{className:"v",children:m.org})]}),m.plan&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:YKt()}),f.jsx("span",{className:"v",children:m.plan})]}),f.jsx("span",{className:"k",children:HDt()}),f.jsx("span",{className:"v",children:m.catalogPending?Ef():m.models.length>0?xMt({count:ln(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(w=>Ae(xv(w))))}):m.agentReady?P3():GL()})]}),f.jsx(BC,{note:m.agentNote,className:$s(mo,"text-sm"),disabled:e,resolve:w=>{var k;return J$n(m,(k=d.data)==null?void 0:k[m.id],w)??aq(w)},onRun:(w,k)=>o.start(w,k,m.id)}),o.run&&f.jsx("div",{hidden:o.run.owner!==m.id,children:f.jsx(ox,{run:o.run,onComplete:()=>_(!0,!0),onClose:o.clear})}),m.id==="opencode"&&f.jsx(rB,{installed:m.installed})]}):null:f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",zBt()]})]})}function tBn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?f.jsx(Zt,{variant:"success",children:a$t()}):f.jsx(Zt,{variant:"error",children:$Ut()}):f.jsx(Zt,{variant:"error",children:PIt()}):f.jsx(Zt,{variant:"error",children:eHt()})}function nBn({onEditState:e}){var A;const n=vn({mutationFn:s4n}),t=dj(),r=ft(t),s=r.data??null,i=j=>{ts(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,c]=T.useState(""),[u,d]=T.useState(""),[_,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(null),y=j=>{i(j),c(j.context??""),d(j.namespace)},x=T.useRef(null);T.useEffect(()=>{const j=x.current;x.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(c(s.context??""),d(s.namespace??""))},[s,o,u]);const b=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!b;T.useEffect(()=>{e==null||e({dirty:C,saving:_})},[C,_,e]);async function N(){if(!(m||_||!b)){w(!0);try{await Ze.fetchQuery({...dj(),staleTime:0})}catch(j){tn(j instanceof Error?j.message:String(j),"error")}finally{w(!1)}}}async function z(j){if(j.preventDefault(),!(_||m)){p(!0),v(null);try{y(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return f.jsx(f.Fragment,{children:a?f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"text-subtext",children:np()}),f.jsx("dd",{className:"m-0",children:m||_?f.jsx(Zt,{children:Da()}):C?f.jsx(Zt,{children:bL()}):f.jsx(tBn,{s})})]}),b&&!m&&!_&&s.preflight.error&&f.jsx("p",{className:`${ix} break-words`,children:s.preflight.error}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:z,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[d$t(),f.jsx(Lc,{choices:[{id:"",label:s.currentContext?iRt({context:Ae(s.currentContext)}):ZTt()},...o&&!s.contexts.includes(o)?[{id:o,label:DOt({context:Ae(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:_||m,onSelect:c})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[qqt(),f.jsx(qr,{type:"text",value:u,disabled:_||m,onChange:j=>d(j.target.value),placeholder:tBt(),autoComplete:"off",spellCheck:!1})]}),k&&f.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Oe,{type:"button",onClick:()=>void N(),disabled:_||m||!b,children:[f.jsx(xo,{size:13})," ",m?Da():Wm()]}),f.jsx(Oe,{variant:"primary",type:"submit",disabled:_||m||b,children:_?Ba():Qo()})]})]})]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",oIt()]})})}function rBn(){var b;const e=vn({mutationFn:C=>a4n(...C)}),n=hj(),t=ft(n),r=t.data??null,s=C=>{ts(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=T.useState(null),o=i??((b=t.error)==null?void 0:b.message)??null,[c,u]=T.useState(""),[d,_]=T.useState(""),[p,m]=T.useState(!1),w=t.isPending||p,[k,v]=T.useState(!1);async function y(){if(!(w||k)){m(!0),a(null);try{await Ze.fetchQuery({...hj(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function x(C){if(C.preventDefault(),!(!c.trim()||!d.trim()||w||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),d.trim()])),u(""),_("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return f.jsxs(f.Fragment,{children:[!r&&w?f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",hIt()]}):r&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:np()}),f.jsx("dd",{className:"m-0",children:f.jsx(Zt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Xm():iy()})})]}),(r==null?void 0:r.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:MRt()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:x,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?PRt():oMt(),f.jsx(qr,{type:"password",value:c,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?KRt():hMt(),f.jsx(qr,{type:"password",value:d,onChange:C=>_(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),f.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:eMt()}),o&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Oe,{type:"button",disabled:w||k,onClick:()=>void y(),children:[f.jsx(xo,{size:13})," ",Ym()]}),f.jsx(Oe,{variant:"primary",type:"submit",disabled:!c.trim()||!d.trim()||w||k||(r==null?void 0:r.processEnv),children:k?Ba():Qo()})]})]})]})}const oq="rounded-sm border-border-strong bg-surface text-subtext",cq="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",sBn=5e3;function lq(e){const n=go(),t=e.map(a=>pj(a)),r=lD({queries:t.map(a=>({...a,refetchInterval:sBn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{Un(n)&&ts(pj(a).queryKey,{running:!0})}]}function iBn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return f.jsx("span",{role:"status",children:f.jsx(Zt,{className:cq,children:qL()})});if(e===void 0)return f.jsx(Zt,{className:oq,children:JL()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?f.jsx(Zt,{className:"rounded-sm",variant:"error",children:IS()}):e.toolsFound?i?f.jsx(Zt,{className:"rounded-sm",variant:"warning",children:UL()}):f.jsx(Zt,{className:"rounded-sm",variant:"success",children:Qm()}):f.jsx(Zt,{className:"rounded-sm",variant:"error",children:s.length===1?zMt({tool:Ae(s[0])}):DMt()});return f.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!i&&f.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Dc(e.testedAt)})]})}function aBn(){var D;const e=UI(),n=ft(e),t=((D=n.data)==null?void 0:D.hosts)??(n.isError?[]:null),[r,s]=T.useState(!1),[i,a]=T.useState({}),[o,c]=T.useState({}),u=T.useRef(0),[d,_]=T.useState(!1),[p,m]=T.useState({}),[w,k]=T.useState(null),[v,y]=T.useState(!1),[x,b]=T.useState(0),C=(t==null?void 0:t.filter(L=>{const B=i[L.host]??L.lastTest;return(B==null?void 0:B.reachable)&&B.toolsFound}).map(L=>L.host))??[],[N,z]=lq(C);function A(L){u.current+=1,_(!1),y(!1),b(B=>B+1),k(L),m(B=>({...B,[L]:!0}))}function j(){u.current+=1,_(!1),y(!1),k(null)}function M(L,B){m(U=>({...U,[L]:!B}))}return f.jsxs(f.Fragment,{children:[n.error&&f.jsx("p",{className:"text-sm text-accent-red",children:n.error.message}),f.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[n.data&&f.jsx(W$n,{settings:n.data}),f.jsxs(Oe,{variant:"ghost",className:"ms-auto",onClick:()=>s(!0),children:[f.jsx(dy,{size:14})," ",pI()]})]}),t===null?f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",rI()]}):t.length===0?f.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:TUt()}):f.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:t.map(L=>{var V,ie,oe;const B=o[L.host]===void 0?L.container??null:o[L.host],U=i[L.host],H=B!==null&&((V=U==null?void 0:U.container)==null?void 0:V.reference)===B.trim()?U:void 0,Q=B!==null?H:U!=null&&U.container?L.lastTest:U??L.lastTest,K=(ie=H==null?void 0:H.container)==null?void 0:ie.error,Z=((oe=H==null?void 0:H.container)==null?void 0:oe.ready)===!1,ee=(Q==null?void 0:Q.error)||K,$=w===L.host,I=p[L.host]??!1,F=$||!!ee,q=`${L.user?`${L.user}@`:""}${L.hostname??L.host}${L.port?`:${L.port}`:""}`;return f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center gap-3 py-3",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"truncate text-base font-medium text-text",title:L.host,children:L.host}),f.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:q,children:q})]})}),f.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[f.jsxs("div",{className:"flex items-center gap-2 text-start",children:[f.jsx(iBn,{test:Q,connecting:$&&!v,masterRunning:N[L.host],containerFailed:Z}),F&&f.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":I,"aria-label":I?uY({name:Ae(L.host)}):XY({name:Ae(L.host)}),onClick:ce=>{ce.stopPropagation(),M(L.host,I)},children:f.jsx(qc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${I?" rotate-180":""}`})})]}),f.jsx(Oe,{size:"small",type:"button",className:"justify-self-end",onClick:ce=>{ce.stopPropagation(),$&&!v?j():A(L.host)},disabled:!$&&(w!==null&&!v||B!==null&&!B.trim()),children:$?v?Ks():Nf():(Q==null?void 0:Q.reachable)===!1||Z?Ks():Q?lI():OS()})]})]}),f.jsx(Q$n,{host:L,connecting:$&&!v,reference:B,onChange:ce=>{$&&j(),c(ne=>({...ne,[L.host]:ce})),a(ne=>{const G={...ne};return delete G[L.host],G})}}),F&&(I||$)&&f.jsxs("div",{className:`border-t border-t-border-variant py-3${I?"":" hidden"}`,children:[!$&&ee&&f.jsx(KCn,{host:L.host,transcript:ee}),$&&!d&&f.jsx(t6,{host:L.host,backend:"ssh",active:I,onComplete:ce=>{if(ce.backend!=="ssh")return;z(L.host);const ne=u.current;if(B===null){a(G=>({...G,[L.host]:{...ce.result,container:null}})),y(!1),k(null);return}_(!0),p4n(L.host,B.trim()).then(G=>{u.current===ne&&a(ae=>({...ae,[L.host]:{...G,container:G.container??{reference:B.trim(),ready:!1,error:G.error??null}}}))}).catch(G=>{u.current===ne&&a(ae=>({...ae,[L.host]:{...ce.result,container:{reference:B.trim(),ready:!1,error:G instanceof Error?G.message:String(G)}}}))}).finally(()=>{u.current===ne&&(_(!1),y(!1),k(null))})},onError:ce=>{y(!0),a(ne=>({...ne,[L.host]:{container:B===null?null:{reference:B.trim(),ready:!1,error:ce},reachable:!1,toolsFound:!1,missingTools:[],error:ce,testedAt:Date.now()}}))}},x)]})]},L.host)})}),r&&f.jsx(zB,{onClose:()=>s(!1)})]})}function oBn({test:e,connecting:n,masterRunning:t}){return n?f.jsx(Zt,{className:cq,children:qL()}):e===null?f.jsx(Zt,{className:oq,children:JL()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?f.jsx(Zt,{className:"rounded-sm",variant:"warning",children:UL()}):f.jsx(Zt,{className:"rounded-sm",variant:"success",children:Qm()}):f.jsx(Zt,{className:"rounded-sm",variant:"error",children:pqt()}):f.jsx(Zt,{className:"rounded-sm",variant:"error",children:fGt()}):f.jsx(Zt,{className:"rounded-sm",variant:"error",children:IS()})}function cBn(){var ee;const e=vn({mutationFn:E4n}),n=L3n(),t=ft(n),r=t.data??null,s=$=>{ts(n.queryKey,I=>(typeof $=="function"?$(I??null):$)??void 0)},i=r?null:((ee=t.error)==null?void 0:ee.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(""),[d,_]=T.useState(""),[p,m]=T.useState(""),[w,k]=T.useState(!1),[v,y]=T.useState(null),[x,b]=T.useState(null),[C,N]=T.useState(!1),[z,A]=T.useState(!1),[j,M]=T.useState(0),D=a&&(x!=null&&x.reachable)&&x.slurmFound&&x.toolsFound?[a]:[],[L,B]=lq(D);function U(){A(!1),M($=>$+1),N(!0)}const H=$=>{s($),o($.host??""),u($.partition??""),_($.account??""),m($.timeLimit??"")},Q=T.useRef(null);T.useEffect(()=>{const $=Q.current;Q.current=r,r&&(!$||a===($.host??"")&&c.trim()===($.partition??"")&&d.trim()===($.account??"")&&p.trim()===($.timeLimit??""))&&(o(r.host??""),u(r.partition??""),_(r.account??""),m(r.timeLimit??""))},[r,a,c,d,p]);const K=r!==null&&a===(r.host??"")&&c.trim()===(r.partition??"")&&d.trim()===(r.account??"")&&p.trim()===(r.timeLimit??"");async function Z($){if($.preventDefault(),!w){k(!0),y(null);try{H(await e.mutateAsync({host:a,partition:c.trim(),account:d.trim(),timeLimit:p.trim()}))}catch(I){y(I instanceof Error?I.message:String(I))}finally{k(!1)}}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[!C&&(x==null?void 0:x.error)&&f.jsx("p",{className:ix,children:x.error}),f.jsxs("form",{className:$C,onSubmit:Z,children:[f.jsx("div",{className:"max-w-xl",children:f.jsxs("label",{children:[tqt(),f.jsx(Lc,{choices:[{id:"",label:eI()},...a&&!r.hosts.some($=>$.host===a)?[{id:a,label:`${a} (not in ~/.ssh/config)`}]:[],...r.hosts.map($=>({id:$.host,label:$.host}))],value:a,variant:"field",dropDown:!0,disabled:w||C,onSelect:$=>{o($),b(null),N(!1),A(!1)}})]})}),f.jsxs("div",{className:"actions",children:[f.jsx(Oe,{type:"button",onClick:()=>{C&&!z?(A(!1),N(!1)):U()},disabled:!a,title:a?void 0:kJt(),children:C?z?Ks():Nf():x?lI():OS()}),f.jsx("span",{role:"status",children:f.jsx(oBn,{test:x,connecting:C&&!z,masterRunning:L[a]})})]}),f.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[f.jsxs("div",{className:"row2",children:[f.jsxs("label",{children:[IKt(),f.jsx(qr,{type:"text",list:"slurm-partitions",value:c,onChange:$=>u($.target.value),placeholder:Yz(),autoComplete:"off",spellCheck:!1}),f.jsx("datalist",{id:"slurm-partitions",children:x==null?void 0:x.partitions.map($=>f.jsx("option",{value:$},$))})]}),f.jsxs("label",{children:[LS(),f.jsx(qr,{type:"text",value:d,onChange:$=>_($.target.value),placeholder:Yz(),autoComplete:"off",spellCheck:!1})]})]}),f.jsxs("label",{className:"mt-3 block max-w-xl",children:[iZt(),f.jsx(qr,{type:"text",value:p,onChange:$=>m($.target.value),placeholder:MIt(),autoComplete:"off",spellCheck:!1})]})]}),v&&f.jsx("div",{className:"error",children:v}),f.jsx("div",{className:"actions",children:f.jsx(Oe,{variant:"primary",type:"submit",disabled:w||K||C,children:w?Ba():Qo()})})]}),C&&f.jsx(t6,{host:a,backend:"slurm",onComplete:$=>{$.backend==="slurm"&&(b($.result),B(a),A(!1),N(!1))},onError:$=>{A(!0),b({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:$})}},j)]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",NHt()]})})}function lBn(){var C;const e=vn({mutationFn:z4n}),n=I3n(),t=ft(n),r=t.data??null,s=N=>{ts(n.queryKey,z=>(typeof N=="function"?N(z??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(!1),[d,_]=T.useState(null),[p,m]=T.useState(null),w=p!==null&&p!=="testing"?p:null,k=N=>{s(N),o(N.address??"")},v=T.useRef(null);T.useEffect(()=>{const N=v.current;v.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const y=r!==null&&a===(r.address??"");async function x(N){if(N.preventDefault(),!c){u(!0),_(null);try{k(await e.mutateAsync({address:a}))}catch(z){_(z instanceof Error?z.message:String(z))}finally{u(!1)}}}async function b(){m("testing");try{m(await j4n(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return f.jsx(f.Fragment,{children:i?f.jsx("div",{className:"error",children:i}):r?f.jsxs(f.Fragment,{children:[(w==null?void 0:w.error)&&f.jsx("p",{className:ix,children:w.error}),f.jsxs("form",{className:$C,onSubmit:x,children:[f.jsxs("label",{children:[KFt(),f.jsx(qr,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[HBt(),": ",Ae(r.resolvedAddress)," · ",sI(),": ",r.source]}),d&&f.jsx("div",{className:"error",children:d}),f.jsxs("div",{className:"actions",children:[f.jsx(Oe,{variant:"primary",type:"submit",disabled:c||y,children:c?Ba():Qo()}),f.jsx(Oe,{type:"button",onClick:()=>void b(),disabled:p==="testing",children:gYt()}),f.jsx(uBn,{test:p})]}),(w==null?void 0:w.reachable)&&w.rayVersion&&f.jsxs("p",{className:"m-0 text-sm text-subtext",children:[_Wt(),": ",w.rayVersion]})]})]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",yHt()]})})}function uBn({test:e}){return e===null?null:e==="testing"?f.jsx(Zt,{children:SYt()}):e.reachable?f.jsx(Zt,{variant:"success",children:vWt()}):f.jsx(Zt,{variant:"error",children:IS()})}function _Bn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:Dl(e.memBytes),r=e.gpus.length===0?null:jAt({count:e.gpus.length});return[n,e.cpuCount>0?tjt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function fBn({remote:e}){var p;const n=ft(B3n()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=T.useState(0),[o,c]=T.useState(!0),[u,d]=T.useState(!1),_=()=>n.refetch();return f.jsxs(f.Fragment,{children:[r&&!t?f.jsx("div",{className:"error",children:r}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:X$n,children:[f.jsx("span",{className:"k",children:np()}),f.jsx("span",{className:"v",children:!t&&s||u?f.jsxs(Zt,{className:"gap-1.5",role:"status",children:[f.jsx(Ct,{}),u?pDt():Da()]}):r?f.jsx(Zt,{variant:"warning",children:nb()}):t?t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Zt,{variant:"success",children:Qm()}):t.sshKeyStatus==="unknown"?f.jsx(Zt,{variant:"warning",children:nb()}):f.jsx(Zt,{variant:"warning",children:iy()}):f.jsx(Zt,{variant:"warning",children:tI()}):null}),f.jsx("span",{className:"k",children:rKt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),f.jsx("span",{className:"k",children:kXt()}),f.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?f.jsx(Zt,{variant:"success",children:gVt()}):t.sshKeyStatus==="no_local_match"?f.jsx(Zt,{variant:"warning",children:ZGt()}):t.sshKeyStatus==="none_registered"?f.jsx(Zt,{variant:"error",children:bGt()}):f.jsx(Zt,{children:iI()}):"—"})]}),e&&t&&!t.loggedIn&&f.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:bRt({command:Ae("orx login")})}),!e&&i>0&&f.jsx(GCn,{login:o,onComplete:()=>{d(!1),a(0),_()},onError:m=>{d(!1),tn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?f.jsxs("p",{dir:"auto",className:mo,children:[zDt()," ",f.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):f.jsxs("p",{dir:"auto",className:mo,children:[iGt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),TYt()," ",f.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?f.jsx("p",{dir:"auto",className:mo,children:HJt({register:Ae(`orx ssh-key add ${t.sshKeyPath}`),load:Ae("ssh-add")})}):f.jsxs("p",{dir:"auto",className:mo,children:[ZUt()," ",f.jsx("code",{children:"ssh-add"}),qVt()," ",f.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&f.jsx("p",{dir:"auto",className:"mt-4 mb-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:r||(t==null?void 0:t.error)})]}),f.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[f.jsxs(Oe,{onClick:()=>void _(),disabled:s||u,children:[f.jsx(xo,{size:13})," ",s?Da():Wm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&f.jsxs(Oe,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),d(!0),a(m=>m+1)},children:[u?f.jsx(Ct,{}):f.jsx(Xf,{size:13})," ",t.loggedIn?Ltn():_I()]})]})]})}const dBn={local:dTe,ssh:WTe,tinker:tRe,hf:JAe,modal:yTe,k8s:aTe,slurm:FTe,ray:OTe,openresearch:NTe},cx={local:"local_job",tinker:"tinker_job",hf:"hf_job",modal:"modal_job",k8s:"k8s_job",ssh:"ssh_job",slurm:"slurm_job",ray:"ray_job",openresearch:"openresearch_job"},UR=["hf","modal","slurm","ray","openresearch"],A4=["hf","modal","openresearch"],uq={hf:["cpu-basic","t4-small","a10g-small","a10g-large","a100-large","h100","h200"],modal:["cpu","t4","l4","a10g","a100","a100-80gb","l40s","h100","h100:2"],slurm:["gpu","h100:1","h100:2","a100:4"],ray:["cpu","cpu:2","gpu","gpu:1","gpu:1,cpu:4","gpu:1,mem:8GiB"],openresearch:["h100_sxm","h100_sxm:2","cpu5c","cpu5g","cpu5m"]},kk=["tinker","hf","modal","ray","k8s"],hBn={tinker:IMe,hf:mMe,modal:kMe,openresearch:AMe},GR="__custom__";function g0(e,n){return!!(n&&!(uq[e]??[]).includes(n))}function pBn({settings:e,projectId:n,onSaved:t}){const r=vn({mutationFn:T4n}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[c,u]=T.useState(i),[d,_]=T.useState(g0(s,i)),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=e.targets.find(B=>B.id===a),y=e.targets.filter(B=>B.configured||B.id===s),x=UR.includes(a),b=A4.includes(a),C=uq[a]??[],N=a===s&&(!x||c.trim()===i),z=Of[a](),A=hBn[a],j=p?qrn():b&&!c.trim()?jNt({destination:z}):a==="ssh"?QMt():HMt({destination:z});T.useEffect(()=>{o(s),u(i),_(g0(s,i))},[s,i]);async function M(B,U){const H=UR.includes(B);if(!(p||A4.includes(B)&&!U.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:H&&U.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),_(g0(s,i))}finally{m(!1)}}}function D(B){const U=e.targets.find(Q=>Q.id===B);if(!U)return;o(U.id);const H=U.id===s?i:"";u(H),_(g0(U.id,H)),A4.includes(U.id)||M(U.id,H)}function L(B){if(B===GR){_(!0);return}_(!1),u(B),(!b||B)&&M(a,B)}return f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:hBt()}),f.jsxs("div",{children:[f.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:B=>{B.preventDefault(),N||M(a,c)},children:[f.jsx(Lc,{choices:y.map(B=>({id:B.id,label:Of[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const U=e.targets.find(H=>H.id===B.id);return U?f.jsx(lp,{kind:cx[U.id],size:16}):null},onSelect:D}),x&&f.jsx("div",{children:d?f.jsxs("div",{className:"relative",children:[f.jsx("input",{className:"h-9 w-full rounded-md border border-border bg-background py-0 pe-10 ps-3 font-sans text-sm text-text outline-none focus:border-text",type:"text",value:c,onChange:B=>u(B.target.value),onBlur:()=>{if(b&&!c.trim()){a===s&&(u(i),_(g0(s,i)));return}N||M(a,c)},placeholder:O$t(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),f.jsx("button",{type:"button",className:"absolute inset-y-0 end-0 inline-flex w-9 items-center justify-center text-muted hover:text-text","aria-label":Xz(),title:Xz(),onMouseDown:B=>B.preventDefault(),onClick:()=>_(!1),children:f.jsx(qc,{size:12})})]}):f.jsx(Lc,{choices:[{id:"",label:b?wNt():lOt()},...c&&!C.includes(c)?[{id:c,label:wjt({value:Ae(c)})}]:[],...C.map(B=>({id:B,label:B})),{id:GR,label:F$t()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:L})})]}),w&&f.jsx("div",{className:"error mt-2.5",children:w}),v&&!v.configured&&f.jsx("p",{className:mo,children:GYt()})]}),f.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),A&&f.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function mBn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?cNt():e.id==="openresearch"?_I():e.id==="ray"?OS():jtn();return f.jsxs("div",{className:`group relative flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans ${r&&e.enabled?"transition-colors duration-120 ease-standard hover:border-text hover:bg-surface":""} ${e.enabled?"":"opacity-52"}`,children:[r&&f.jsx("button",{type:"button",className:"absolute inset-0 z-10 rounded-lg focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default",onClick:r,disabled:!e.enabled,"aria-label":Of[e.id](),"aria-describedby":i,"aria-haspopup":kk.includes(e.id)?"dialog":void 0}),f.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:f.jsx(lp,{kind:cx[e.id],size:48})}),f.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:Of[e.id]()}),f.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:dBn[e.id]()}),f.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?f.jsxs(f.Fragment,{children:[e.id==="tinker"?GTt():prn()," ",f.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:Fjt()})]}):t??e.summary}),f.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[f.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?XL():e.configured?!r||kk.includes(e.id)?Xm():lsn():a}),r&&f.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:f.jsx(kv,{size:16})})]})]})}function gBn({target:e,isDefault:n,onBack:t,remote:r}){return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back mb-6 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[f.jsx(fb,{size:16})," ",WL()]}),f.jsxs("div",{className:"flex items-center justify-between gap-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:f.jsx(lp,{kind:cx[e.id],size:36})}),f.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:Of[e.id]()})]}),n&&f.jsx(Zt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:XL()})]}),f.jsxs("div",{className:"mt-6 font-sans text-base text-text [&_.settings-card]:mb-0 [&_.settings-form]:mt-6 [&_.settings-form]:border-t-0 [&_.settings-form]:pt-0 [&>.settings-form:first-child]:mt-0 [&>div:first-child]:border-t-0",children:[e.id==="ssh"&&f.jsx(aBn,{}),e.id==="slurm"&&f.jsx(cBn,{}),e.id==="openresearch"&&f.jsx(fBn,{remote:r})]})]})}function vBn({target:e,remote:n,onClose:t}){const r=T.useRef(null),[s,i]=T.useState({dirty:!1,saving:!1});T.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm($Tt())||t()};return f.jsxs("dialog",{ref:r,className:"m-auto w-140 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"compute-quick-setup-title",onKeyDown:o=>{o.key==="Escape"&&(o.preventDefault(),a())},onCancel:o=>{o.preventDefault(),a()},children:[f.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(lp,{kind:cx[e.id],size:32}),f.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:Of[e.id]()})]}),f.jsx(At,{title:Z0(),"aria-label":Z0(),onClick:a,disabled:s.saving,children:f.jsx(ur,{size:14})})]}),e.id==="tinker"&&f.jsx(yBn,{target:e}),e.id==="hf"&&f.jsx(wBn,{remote:n}),e.id==="modal"&&f.jsx(rBn,{}),e.id==="ray"&&f.jsx(lBn,{}),e.id==="k8s"&&f.jsx(nBn,{onEditState:i})]})}function bBn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=qI(e==null?void 0:e.id),i=ft(s),a=i.data??null,o=L=>{ts(s.queryKey,B=>(typeof L=="function"?L(B??null):L)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,d]=T.useState(null),[_,p]=T.useState(null),m=$3n(),w=ft(m),k=w.data??null,v=((D=w.error)==null?void 0:D.message)??null;T.useEffect(()=>{d(null),p(null)},[e==null?void 0:e.id]);const y=L=>{o(L),p(null)},x=a?a.targets:null,b=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=x?[...x].sort((L,B)=>+(B.id===b)-+(L.id===b)):null,N=(C==null?void 0:C.filter(L=>L.configured))??[],z=(C==null?void 0:C.filter(L=>!L.configured))??[],A=L=>f.jsx(mBn,{target:L,isDefault:b===L.id,summary:L.id==="local"?k?_Bn(k):v??xBt():void 0,onOpen:L.id==="local"?void 0:()=>d(L.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${L.id}`),j=u?a==null?void 0:a.targets.find(L=>L.id===u):null;return j&&!kk.includes(j.id)?f.jsx(gBn,{target:j,isDefault:b===j.id,onBack:()=>d(null),remote:r}):f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:QL()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:JIt()}),f.jsx(BBn,{projectId:e==null?void 0:e.id,onViewHistory:n}),c?f.jsx("div",{className:"error",children:c}):a?f.jsxs(f.Fragment,{children:[_&&f.jsx("div",{className:"error",children:_}),f.jsx(pBn,{settings:a,projectId:e==null?void 0:e.id,onSaved:y}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Xm()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),z.length>0&&f.jsxs("section",{className:"mb-3.5",children:[f.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:wqt()}),f.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:z.map(A)})]}),j&&f.jsx(vBn,{target:j,remote:r,onClose:()=>d(null)})]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",eIt()]})]})}function yBn({target:e}){var x;const n=vn({mutationFn:Ywn}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),c=fj(),u=ft(c),d=u.data??null,_=a??((x=u.error)==null?void 0:x.message)??null,p=b=>{ts(c.queryKey,C=>(typeof b=="function"?b(C??null):b)??void 0)},[m,w]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){w(!0),o(null);try{await Ze.fetchQuery({...fj(),staleTime:0})}catch(b){o(b instanceof Error?b.message:String(b))}finally{w(!1)}}}async function y(b){if(b.preventDefault(),!(!t.trim()||s||k)){i(!0),o(null);try{p(await n.mutateAsync(t.trim())),r("")}catch(C){o(C instanceof Error?C.message:String(C))}finally{i(!1)}}}return f.jsxs(f.Fragment,{children:[!d&&k?f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",Da()]}):d&&f.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[f.jsx("dt",{className:"font-medium text-subtext",children:np()}),f.jsx("dd",{className:"m-0",children:f.jsx(Zt,{variant:d.validationStatus==="valid"?"success":d.validationStatus==="invalid"?"error":"warning",children:d.validationStatus==="valid"?Qm():d.validationStatus==="invalid"?crn():d.validationStatus==="billingRequired"?Wnn():iy()})})]}),(d==null?void 0:d.validationStatus)==="billingRequired"&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:f.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:Fnn()})}),(d==null?void 0:d.processEnv)&&f.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:trn()}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:y,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||d!==null&&d.validationStatus!=="missing"?Hen():TS(),f.jsx(qr,{type:"password",value:t,placeholder:(d==null?void 0:d.maskedKey)??"",onChange:b=>r(b.target.value),autoComplete:"new-password"})]}),_&&f.jsx("p",{className:"m-0 text-sm text-accent-red",children:_}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Oe,{type:"button",disabled:s||k,onClick:()=>void v(),children:[f.jsx(xo,{size:13})," ",k?Da():Wm()]}),f.jsx(Oe,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?dI():Qo()})]})]})]})}function xBn({settings:e}){return e.validationStatus==="missing"?f.jsx(Zt,{variant:"warning",children:iy()}):e.validationStatus==="invalid"?f.jsx(Zt,{variant:"error",children:PFt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?f.jsx(Zt,{variant:"success",children:Qm()}):e.jobsWrite===!1?f.jsxs("span",{className:"inline-flex items-center gap-2",children:[f.jsx(Zt,{variant:"warning",children:GUt()}),f.jsx(Jm,{content:XAt(),className:"text-subtext",children:f.jsx(WS,{size:15})})]}):null}function wBn({remote:e}){var x;const n=vn({mutationFn:Qwn}),t=_j(),r=ft(t),s=r.data??null,i=b=>{ts(t.queryKey,C=>(typeof b=="function"?b(C??null):b)??void 0)},a=s?null:((x=r.error)==null?void 0:x.message)??null,[o,c]=T.useState(""),[u,d]=T.useState(!1),[_,p]=T.useState(!1),[m,w]=T.useState(null),k=ax();async function v(){if(!(u||_||!s&&!a)){p(!0),w(null);try{await Ze.fetchQuery({..._j(),staleTime:0})}catch(b){w(b instanceof Error?b.message:String(b))}finally{p(!1)}}}async function y(b){if(b.preventDefault(),!(!o.trim()||u||_||!s&&!a)){d(!0),w(null);try{const C=await n.mutateAsync(o.trim());i(C),w(null),c("")}catch(C){w(C instanceof Error?C.message:String(C))}finally{d(!1)}}}return f.jsxs(f.Fragment,{children:[a?f.jsx("div",{className:"error",children:a}):s?f.jsxs(f.Fragment,{children:[f.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:LS()}),f.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"font-medium text-subtext",children:np()}),f.jsx("dd",{className:"m-0 text-text",children:f.jsx(xBn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&f.jsx("p",{className:ix,children:s.validationError}),s.source==="env"&&f.jsx("p",{className:mo,children:KPt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&f.jsx(BC,{note:qAt({login:"`hf auth login`",url:Ae("huggingface.co/settings/tokens")}),className:mo,disabled:e,onRun:k.start}),f.jsx(ox,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",OHt()]}),f.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:y,children:[f.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?Qen():nOt(),f.jsx(qr,{type:"password",value:o,onChange:b=>c(b.target.value),placeholder:(s==null?void 0:s.maskedToken)??PPt(),autoComplete:"off"})]}),m&&f.jsx("div",{className:"error",children:m}),f.jsxs("div",{className:"flex justify-end gap-2",children:[f.jsxs(Oe,{type:"button",disabled:u||_||!s&&!a,onClick:()=>void v(),children:[f.jsx(xo,{size:13})," ",_?Da():Wm()]}),f.jsx(Oe,{variant:"primary",type:"submit",disabled:!o.trim()||u||_||!s&&!a,children:u?dI():Qo()})]})]})]})}const _q=/^hf_[A-Za-z0-9]{10,}$/;function fq(){return f.jsx("tr",{children:f.jsx("td",{colSpan:3,children:f.jsxs("p",{dir:"auto",className:mo,children:[ZYt()," ",f.jsx("code",{children:"HF_TOKEN"}),IQt()]})})})}const VR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function Sk(e,n){const t=n instanceof Error?n.message:String(n);tn(t.includes(e)?t:`${e}: ${t}`,"error")}function kBn({name:e,entry:n,onVars:t}){const r=vn({mutationFn:_=>MI(..._)}),s=vn({mutationFn:c4n}),[i,a]=T.useState(""),[o,c]=T.useState(!1);async function u(){if(!(!i.trim()||o)){c(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(_){Sk(e,_)}finally{c(!1)}}}async function d(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(_){Sk(e,_)}finally{c(!1)}}}return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{className:"font-mono text-sm",children:e}),f.jsx("td",{className:"text-base text-subtext",children:n?f.jsxs(f.Fragment,{children:[n.maskedValue,n.inProcessEnv&&f.jsx(Zt,{children:AKt()})]}):f.jsx(qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&a("")},placeholder:aI(),"aria-label":Bee({name:Ae(e)}),autoComplete:"new-password",disabled:o})}),f.jsx("td",{children:n?f.jsx(At,{className:"[&:hover:not(:disabled)]:text-accent-red",title:fN({name:Ae(e)}),"aria-label":fN({name:Ae(e)}),onClick:()=>void d(),disabled:o,children:f.jsx(Yf,{size:13})}):i.trim()&&f.jsx(Oe,{size:"small",onClick:()=>void u(),disabled:o,children:o?Ba():Qo()})})]}),!n&&e!=="HF_TOKEN"&&_q.test(i.trim())&&f.jsx(fq,{})]})}function SBn({onVars:e,onDone:n}){const t=vn({mutationFn:_=>MI(..._)}),[r,s]=T.useState(""),[i,a]=T.useState(""),[o,c]=T.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){c(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(_){Sk(r.trim(),_)}finally{c(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),u()),_.key==="Escape"&&!o&&n()};return f.jsxs(f.Fragment,{children:[f.jsxs("tr",{children:[f.jsx("td",{children:f.jsx(qr,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:_=>s(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":uUt(),autoComplete:"off",spellCheck:!1,disabled:o})}),f.jsx("td",{children:f.jsx(qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:aI(),"aria-label":gUt(),autoComplete:"new-password",disabled:o})}),f.jsxs("td",{children:[f.jsx(Oe,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?Ba():Qo()}),f.jsx(At,{title:Nf(),"aria-label":KLt(),onClick:n,disabled:o,children:f.jsx(ur,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&_q.test(i.trim())&&f.jsx(fq,{})]})}function CBn(){var u;const e=P3n(),n=ft(e),t=n.data??null,r=d=>{ts(e.queryKey,_=>(typeof d=="function"?d(_??null):d)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(d=>d.key).filter(d=>!VR.includes(d)),c=[...VR,...o];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[f.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:XZt()}),f.jsxs(Oe,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[f.jsx(Qf,{size:12})," ",DDt()]})]}),f.jsx("div",{className:Bc,children:s?f.jsx("div",{className:"error",children:s}):t===null?f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]}):f.jsx("table",{className:"env-table w-full table-fixed border-collapse text-base [&_td:first-child]:w-[32%] [&_td:first-child]:wrap-anywhere [&_.badge]:ms-2 [&_td]:h-12 [&_td]:pt-0 [&_td]:pe-2.5 [&_td]:pb-0 [&_td]:ps-0 [&_td]:align-middle [&_td]:border-b [&_td]:border-b-border-variant [&_td:last-child]:w-29 [&_td:last-child]:whitespace-nowrap [&_td:last-child]:text-end [&_td[colspan]]:whitespace-normal [&_td[colspan]]:text-start [&_.icon-btn]:ms-2 [&_.icon-btn]:align-middle",children:f.jsxs("tbody",{children:[c.map(d=>f.jsx(kBn,{name:d,entry:t.find(_=>_.key===d),onVars:r},d)),i&&f.jsx(SBn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const v0=[{value:"system",label:Onn,icon:G6n},{value:"light",label:Nnn,icon:bCn},{value:"dark",label:hnn,icon:K6n}],EBn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function NBn(){const e=d_(),[n,t]=r$(),r=s=>{var d;const i=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!i)return;s.preventDefault();const a=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=a.findIndex(_=>_===document.activeElement),u=((o===-1?v0.findIndex(_=>_.value===n):o)+i+v0.length)%v0.length;t(v0[u].value),(d=a[u])==null||d.focus()};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:zEt()}),f.jsxs("div",{className:`${Bc} mt-3`,children:[f.jsxs("div",{className:`${Il} pb-3.5`,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:ij()}),f.jsx("div",{className:"theme-segmented inline-flex flex-none gap-0.5 p-0.5 border border-border rounded-md bg-surface",role:"radiogroup","aria-label":ij(),onKeyDown:r,children:v0.map(({value:s,label:i,icon:a})=>f.jsxs("button",{type:"button",role:"radio","aria-checked":n===s,tabIndex:n===s?0:-1,className:`theme-segment inline-flex items-center gap-1.5 py-[5px] px-2.5 rounded-sm text-subtext text-sm cursor-pointer transition-[background,color] duration-120 ease-standard [&:hover:not(.on)]:text-text [&:hover:not(.on)]:bg-highlight [&.on]:text-background [&.on]:bg-primary [&:focus-visible]:outline-2 [&:focus-visible]:outline-solid [&:focus-visible]:outline-text [&:focus-visible]:outline-offset-2 ${n===s?"on":""}`,onClick:()=>t(s),children:[f.jsx(a,{size:14}),i()]},s))})]}),f.jsxs("div",{className:Il,children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:fRt()}),f.jsx("div",{className:"w-52 flex-none",children:f.jsx(Lc,{choices:EBn,value:e,variant:"field",dropDown:!0,onSelect:s=>{QD(s)&&JI(s)}})})]})]})]})}const zBn={installer:zbn,"app-bundle":ebn,appimage:obn,portable:Hbn,cargo:hbn,homebrew:xbn,nix:Dbn,unknown:Qbn},T4={cargo:nyn,homebrew:lyn,nix:myn};function jBn(){var _;const e=vn({mutationFn:p=>t4n(...p)}),{status:n,error:t,apply:r}=$6(),[s,i]=T.useState(null),[a,o]=T.useState(null),c=TB(n),u=s!==null||c.restarting;if(!n)return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:nj()}),t?f.jsx("div",{className:Bc,children:f.jsx("div",{className:"error",children:t})}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]})]});const d=async(p,m)=>{i(p),o(null);try{await m()}catch(w){o(w instanceof Error?w.message:String(w))}finally{i(null)}};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:nj()}),f.jsxs("div",{className:`${Bc} mt-3`,children:[f.jsxs("div",{className:`${Lf} pb-3.5`,children:[f.jsx("div",{className:"k",children:oI()}),f.jsx("div",{className:"v",children:n.current}),f.jsx("div",{className:"k",children:oHt()}),f.jsx("div",{className:"v",children:n.latest??"—"}),f.jsx("div",{className:"k",children:ZL()}),f.jsx("div",{className:"v",children:zBn[n.channel]()})]}),n.restartRequired&&f.jsxs("div",{className:Il,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:mQt()}),f.jsx("p",{children:c.error?wI({error:c.error}):ltn({installed:Ae(n.installedVersion??"—"),current:Ae(n.current??n.installedVersion??"—")})})]}),n.canRestart&&f.jsx(Oe,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?kI():xI()})]}),n.selfUpdates?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Il,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Jz()}),f.jsxs("p",{children:[rUt(),n.envDisabled&&Lrn()]})]}),f.jsx(GS,{type:"button",checked:n.autoUpdate,"aria-label":Jz(),disabled:u,onClick:()=>void d("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),f.jsxs("div",{className:Il,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?jrn({version:Ae(n.latest??"—")}):WEt()}),f.jsxs("p",{children:[n.updateAvailable?TTt():pNt(),n.updateAvailable&&n.latestTag&&f.jsxs(f.Fragment,{children:[" ",f.jsx("a",{href:AB(n.latestTag),target:"_blank",rel:"noreferrer",className:"underline",children:uI()})]})]})]}),f.jsx(Oe,{size:"small",type:"button",disabled:u,onClick:()=>void d("apply",()=>Jwn().then(r)),children:s==="apply"?CS():n.updateAvailable?wrn():tNt()})]})]}):f.jsx("div",{className:Il,children:f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:uKt()}),f.jsx("p",{children:((_=T4[n.channel])==null?void 0:_.call(T4))??QJt()})]})}),n.channel==="app-bundle"&&f.jsx(TBn,{busy:s,disabled:u,run:d}),a&&f.jsx("div",{className:"error",children:a})]})]})}function ABn(){var _;const e=vn({mutationFn:X4n}),n=W3n(),t=ft(n),r=t.data??null,s=p=>{ts(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=T.useState(!1),[o,c]=T.useState(null),u=o??((_=t.error)==null?void 0:_.message)??null,d=()=>{!r||i||(a(!0),c(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>c(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:IZt()}),r?f.jsxs("div",{className:`${Bc} mt-3`,children:[f.jsxs("div",{className:Il,children:[f.jsxs("div",{children:[f.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[Qz(),r.locked&&r.reason&&f.jsx(Jm,{content:`${N$t()} ${r.reason}.`,className:"text-subtext",children:f.jsx(WS,{size:15})})]}),f.jsx("p",{children:SUt()})]}),f.jsx(GS,{type:"button",checked:r.enabled,"aria-label":Qz(),disabled:i||r.locked,onClick:d})]}),u&&f.jsx("div",{className:"error",children:u})]}):u?f.jsx("div",{className:"error",children:u}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]})]})}function TBn({busy:e,disabled:n,run:t}){const r=vn({mutationFn:n4n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(d=>{i(d),o(!1)}).catch(d=>{throw o(!u&&String((d==null?void 0:d.message)??d).includes("--force")),d}));return f.jsxs("div",{className:Il,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:gTt({command:Ae("orx")})}),s?f.jsxs("p",{children:[s.alreadyCurrent?qNt({link:Ae(s.link)}):XNt({link:Ae(s.link)}),!s.onPath&&xEt({directory:Ae(s.dir)})]}):f.jsx("p",{children:uTt({command:Ae("orx")})})]}),f.jsx(Oe,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?CS():a?Den():s?cen():rTt()})]})}function RBn({remote:e}){var w;const n=vn({mutationFn:k=>$I(...k)}),t=PS(),r=ft(t),s=r.data??null,i=k=>{ts(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[c,u]=T.useState(null),d=c??((w=r.error)==null?void 0:w.message)??null,_=async()=>{await r.refetch({cancelRefetch:!1})},p=ax(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:dPt()}),s?f.jsxs("div",{className:`${Bc} mt-3 project-defaults-card [&_.settings-card-head]:justify-between [&_.settings-card-head]:mb-0 [&_.settings-card-head]:pb-3 [&_.settings-card-head_h3]:m-0`,children:[f.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[f.jsx("h3",{children:yPt()}),f.jsx(Zt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?HL():VL()})]}),f.jsxs("div",{className:Il,children:[f.jsxs("div",{children:[f.jsx("div",{className:"project-default-title text-base font-medium",children:Zz()}),f.jsx("p",{children:lJt()})]}),f.jsx(GS,{type:"button",checked:s.githubForNewProjects,"aria-label":Zz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(dq,{ghInstalled:s.ghInstalled,remote:e,onCheck:_,onRun:p.start})}),f.jsx(ox,{run:p.run,onComplete:()=>void _(),onClose:p.clear}),d&&f.jsx("div",{className:"error",children:d})]}):d?f.jsx("div",{className:"error",children:d}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]})]})}function dq({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=T.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return f.jsxs(f.Fragment,{children:[f.jsx(BC,{note:e?mtn():STt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),f.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&f.jsxs($h,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[yFt()," ",f.jsx(Rf,{size:12})]}),f.jsx(Oe,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?Da():Wm()})]})]})}function MBn(){var m,w,k;const e=vn({mutationFn:Dwn}),n=vn({mutationFn:Lwn}),t=A8n(),r=ft(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((w=r.data)==null?void 0:w.hasSession)??null,a=v=>ts(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=T.useState(!1),[d,_]=T.useState(null),p=d??((k=r.error)==null?void 0:k.message);return f.jsxs("div",{className:wk,children:[f.jsx("h3",{children:nI()}),f.jsxs("div",{className:Lf,children:[f.jsx("span",{className:"k",children:NPt()}),f.jsx("span",{className:"v",children:f.jsx(Zt,{variant:s?"success":"default",children:s===null?p?ho():Da():s?sj():W3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:mJt()}),s?f.jsx("div",{className:H0,children:f.jsx(Oe,{disabled:c,onClick:()=>{u(!0),_(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?rj():wen()})}):f.jsx(qR,{save:TI,onSaved:v=>o(v.hasToken),placeholder:kKt(),createHref:"https://www.overleaf.com/user/settings"}),f.jsxs("div",{className:Lf,children:[f.jsx("span",{className:"k",children:UQt()}),f.jsx("span",{className:"v",children:f.jsx(Zt,{variant:i?"success":"default",children:i===null?p?ho():Da():i?sj():W3()})})]}),f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:YQt()}),i?f.jsx("div",{className:H0,children:f.jsx(Oe,{disabled:c,onClick:()=>{u(!0),_(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>_(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?rj():pen()})}):f.jsx(qR,{save:v=>RI(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:q3(),createHref:"https://www.overleaf.com/project",createLabel:lbt()}),p&&f.jsx("div",{className:"error",children:p})]})}function OBn({project:e,onProjectUpdate:n,remote:t}){var M;const r=vn({mutationFn:D=>$I(...D)}),s={...K3n((e==null?void 0:e.id)??""),enabled:!!e},i=ft(s),a=ax(),o=i.data??null,c=D=>{ts(s.queryKey,L=>(typeof D=="function"?D(L??null):D)??void 0)},[u,d]=T.useState(!1),[_,p]=T.useState(null),m=_??((M=i.error)==null?void 0:M.message)??null,[w,k]=T.useState(!1),[v,y]=T.useState(!1),[x,b]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},z=D=>{const L=D instanceof Error?D.message:String(D);return L.toLowerCase().includes("archived")?cAt():L.includes("(fetch first)")||L.includes("non-fast-forward")?pAt():L.includes("403")||L.toLowerCase().includes("permission denied")?wAt():L},A=()=>{e&&(d(!0),p(null),K4n(e.id).then(D=>{c(D.git),n(D.project),Ze.fetchQuery(PS()).then(L=>{!L.githubForNewProjects&&!L.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(z(D))).finally(()=>d(!1)))},j=D=>{y(!0),b(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(L=>b(L instanceof Error?L.message:String(L))).finally(()=>y(!1))};return f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:lQt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:ntn({project:(e==null?void 0:e.name)??pjt()})}),e?m&&!o?f.jsx("div",{className:"error",children:m}):o?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:wk,children:[f.jsx("h3",{children:WHt()}),f.jsxs("div",{className:Lf,children:[f.jsx("span",{className:"k",children:UKt()}),f.jsx("span",{className:"v",children:o.path}),f.jsx("span",{className:"k",children:"Git"}),f.jsx("span",{className:"v",children:o.gitVersion??jL()}),f.jsx("span",{className:"k",children:IXt()}),f.jsx("span",{className:"v",children:o.initialized?tAt({branch:Ae(o.currentBranch??DS()),state:o.clean?LNt():LAt()}):HOt()}),f.jsx("span",{className:"k",children:NLt()}),f.jsx("span",{className:"v",children:o.baselineBranch}),f.jsx("span",{className:"k",children:nQt()}),f.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):GL()})]}),!o.initialized&&f.jsx("div",{className:H0,children:f.jsx(Oe,{variant:"primary",onClick:()=>void V4n(e.id).then(c).catch(D=>p(String(D))),children:eFt()})})]}),f.jsxs("div",{className:wk,children:[f.jsx("h3",{children:"GitHub"}),f.jsxs("div",{className:Lf,children:[f.jsx("span",{className:"k",children:KL()}),f.jsx("span",{className:"v",children:f.jsx(Zt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?HL():VL()})}),f.jsx("span",{className:"k",children:sWt()}),f.jsx("span",{className:"v",children:C?f.jsxs(f.Fragment,{children:[f.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&f.jsx(Zt,{children:uYt()})]}):f.jsx(Zt,{children:FHt()})}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"k",children:rYt()}),f.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&f.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:f.jsx(dq,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),f.jsx(ox,{run:a.run,onComplete:()=>void N(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?Xrn():cjt()}),f.jsxs("div",{className:H0,children:[C&&o.github.url&&f.jsxs($h,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[tj()," ",f.jsx(Rf,{size:12})]}),f.jsx(Oe,{variant:"primary",disabled:u,onClick:A,children:u?o8t():e8t()})]})]}),o.github.enabled&&f.jsxs(f.Fragment,{children:[f.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:DBt()}),f.jsxs("div",{className:H0,children:[o.github.url&&f.jsxs($h,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[tj()," ",f.jsx(Rf,{size:12})]}),f.jsx(Oe,{disabled:u,onClick:()=>{d(!0),W4n(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>d(!1))},children:u?h8t():K7t()})]})]})]}),f.jsx(MBn,{}),m&&f.jsx("div",{className:"error",children:z(m)})]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]}):f.jsx("div",{className:Bc,children:f.jsx("p",{className:mo,children:SVt()})}),w&&f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop-light flex items-start justify-center pt-[var(--modal-top)] px-4 pb-6 overflow-y-auto z-100",onClick:()=>j(!1),children:f.jsxs("div",{className:"modal max-w-[94vw] max-h-[calc(100vh_-_var(--modal-top)_-_48px)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl github-default-modal w-110 [&_>_p]:m-0 [&_>_p]:text-sm [&_>_p]:leading-relaxed [&_>_p]:text-text [&_>_.error]:mt-3.5",role:"dialog","aria-modal":"true","aria-labelledby":"github-default-title",onClick:D=>D.stopPropagation(),children:[f.jsx("h2",{id:"github-default-title",children:cqt()}),f.jsx("p",{children:$Yt()}),x&&f.jsx("div",{className:"error",children:x}),f.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[f.jsx(Oe,{disabled:v,onClick:()=>j(!1),children:GGt()}),f.jsx(Oe,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?Ba():ERt()})]})]})})]})}const DBn={env:ghn,config:Shn,xdg:Thn,default:uhn},R4={preparing:Xdn,copying:cdn,verifying:$hn,finalizing:pdn},LBn=e=>{var n;return((n=R4[e])==null?void 0:n.call(R4))??e};function IBn(){var b;const e=F3n(),n=ft(e),t=n.data??null,r=t?null:((b=n.error)==null?void 0:b.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,u]=T.useState(null),[d,_]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>VI(C=>{C.type==="progress"?_(N=>{const z=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||z}}):C.type==="done"?(_({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&_({kind:"error",message:C.error})}),[]);const w=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function y(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await u4n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function x(C){if(C.preventDefault(),!(d.kind==="moving"||!k||v)&&(m(null),!!window.confirm(jdn({path:Ae(k)})))){_({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await _4n(k)}catch(N){_({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return f.jsxs(f.Fragment,{children:[f.jsx("h2",{children:XXt()}),f.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:tnn()}),r?f.jsx("div",{className:Bc,children:f.jsx("div",{className:"error",children:r})}):t?f.jsxs("div",{className:Bc,children:[f.jsx("div",{className:"settings-card-head mb-3",children:f.jsx("h3",{children:W$t()})}),f.jsxs("div",{className:Lf,children:[f.jsx("span",{className:"k",children:y$t()}),f.jsx("span",{className:"v",children:t.current}),f.jsx("span",{className:"k",children:sI()}),f.jsx("span",{className:"v",children:DBn[t.source]()})]}),!w&&f.jsxs("form",{className:$C,onSubmit:x,children:[f.jsxs("label",{children:[Xqt(),f.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{i(C.target.value),u(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:d.kind==="moving"})]}),c&&!c.error&&c.ok&&f.jsxs("p",{className:mo,children:[IWt()," ",Dl(c.treeBytes??0),c.freeBytes!=null&&` — ${wdn({size:Ae(Dl(c.freeBytes))})}`,c.sameFilesystem?rhn():"","."]}),c&&c.ok===!1&&c.error&&f.jsx("div",{className:"error",children:c.error}),p&&f.jsx("div",{className:"error",children:p}),d.kind==="moving"&&f.jsx(iq,{value:d.copied,max:d.total,label:LBn(d.phase),caption:d.total>0?f.jsxs("span",{className:"text-sm",children:[Dl(d.copied)," / ",Dl(d.total)]}):void 0}),d.kind==="done"&&f.jsxs("p",{className:mo,children:[Lqt(),d.oldPathLeft&&f.jsxs(f.Fragment,{children:[" ",cDt({path:Ae(d.oldPathLeft)})]})]}),d.kind==="error"&&f.jsxs("div",{className:"error",children:[jqt()," ",d.message]}),f.jsxs("div",{className:"actions",children:[f.jsx(Oe,{type:"button",onClick:y,disabled:a||!k||v||d.kind==="moving",children:a?Da():DEt()}),f.jsx(Oe,{variant:"primary",type:"submit",disabled:!k||v||d.kind==="moving",children:d.kind==="moving"?qdn():Ldn()})]})]})]}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]})]})}const Ck=e=>e==="running"||e==="starting";function $Bn(e){return Ck(e.status)?J0(Date.now()-e.createdAt):e.endedAt?J0(e.endedAt-e.createdAt):"—"}function hq({instances:e,emptyLabel:n}){return e.length===0?f.jsx("p",{className:"instances-empty m-0 rounded-lg border border-border bg-background py-3.5 px-4 text-base text-subtext",children:n}):f.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:f.jsxs("table",{className:"runs-table w-full border-collapse bg-background text-base [&_th]:text-start [&_th]:text-text [&_th]:text-sm [&_th]:font-medium [&_th]:py-2 [&_th]:px-3 [&_th]:border-b [&_th]:border-b-border [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-1 [&_td]:py-2 [&_td]:px-3 [&_td]:border-b [&_td]:border-b-divider-faint [&_td]:whitespace-nowrap [&_tr:last-child_td]:border-b-0 [&_tr.clickable]:cursor-pointer [&_tr.clickable:hover_td]:bg-canvas",children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:yLt()}),f.jsx("th",{children:np()}),f.jsx("th",{children:AXt()}),f.jsx("th",{children:AQt()})]})}),f.jsx("tbody",{children:e.map(t=>{var s;const r=typeof((s=t.backend)==null?void 0:s.url)=="string"?t.backend.url:void 0;return f.jsxs("tr",{children:[f.jsx("td",{children:f.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[f.jsx(eC,{backend:t.backend}),r&&f.jsx(rp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:ej(),"aria-label":ej(),onClick:i=>i.stopPropagation(),children:f.jsx(Rf,{size:12})})]})}),f.jsx("td",{children:f.jsx(Pl,{status:Aa(t)})}),f.jsx("td",{children:Dc(t.createdAt)}),f.jsx("td",{children:$Bn(t)})]},t.id)})})]})})}function BBn({projectId:e,onViewHistory:n}){var _;const t=ft({...Qu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(_=t.error)==null?void 0:_.message,i=t.isFetching,[,a]=T.useState(0);T.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},c=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>Ck(p.status)).sort(c),d=r==null?void 0:r.filter(p=>!Ck(p.status)).sort(c);return f.jsxs("section",{className:"compute-activity [&_.count-badge]:inline-flex [&_.count-badge]:items-center [&_.count-badge]:justify-center [&_.count-badge]:min-w-4.5 [&_.count-badge]:h-4.5 [&_.count-badge]:py-0 [&_.count-badge]:px-[5px] [&_.count-badge]:rounded-md [&_.count-badge]:bg-canvas [&_.count-badge]:border [&_.count-badge]:border-border [&_.count-badge]:text-xs [&_.count-badge]:font-medium [&_.count-badge]:text-text mt-5.5 mx-0 mb-8",children:[f.jsxs("div",{className:"compute-activity-head flex items-start justify-between gap-5 mb-3.5 [&_h2]:flex [&_h2]:items-center [&_h2]:gap-2 [&_h2]:m-0 [&_h2]:text-lg [@media((max-width:_640px))]:items-stretch [@media((max-width:_640px))]:flex-col",children:[f.jsx("div",{children:f.jsxs("h2",{children:[kQt(),u&&u.length>0&&f.jsx("span",{className:"count-badge",children:u.length})]})}),f.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[f.jsxs(Oe,{size:"small",onClick:o,disabled:i,children:[f.jsx(xo,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Ym()]}),f.jsx(Oe,{size:"small",onClick:n,children:d!=null&&d.length?dJe({count:ln(d.length)}):aJe()})]})]}),s&&f.jsx("div",{className:"error",children:s}),!u||!d?f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]}):f.jsx(hq,{instances:u,emptyLabel:e?BZe():JZe()})]})}function PBn({projectId:e,onBack:n}){var c;const t=ft({...Qu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(c=t.error)==null?void 0:c.message,i=t.isFetching,[,a]=T.useState(0);T.useEffect(()=>{const u=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"settings-back inline-flex items-center gap-1.5 mt-0 mx-0 mb-4.5 text-subtext text-sm font-medium [&:hover]:text-text",onClick:n,children:[f.jsx(fb,{size:14})," ",WL()]}),f.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[f.jsx("h1",{children:MFt()}),f.jsxs(Oe,{size:"small",onClick:o,disabled:i,children:[f.jsx(xo,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Ym()]})]}),s&&f.jsx("div",{className:"error",children:s}),r?f.jsx(hq,{instances:[...r].sort((u,d)=>d.createdAt-u.createdAt),emptyLabel:e?RZe():VZe()}):f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",__()]})]})}const pq=["projects","harnesses","storage"],FBn=[{id:"compute",label:QL,icon:f.jsx(KS,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:YL,icon:f.jsx(Xf,{size:15}),activeTabs:["environment"]},{id:"settings",label:$S,icon:f.jsx(dy,{size:15}),activeTabs:["settings",...pq]}];function HBn(e){return pq.includes(e)}function qBn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||HBn(e),a=T.useRef(null);return T.useLayoutEffect(()=>{const o=a.current,c=o==null?void 0:o.parentElement;if(!o||!c)return;const u=()=>o.scrollIntoView({block:"start"}),d=new ResizeObserver(u);d.observe(c),u();const _=()=>d.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,_,{passive:!0});return()=>{_();for(const m of p)window.removeEventListener(m,_)}},[e,n==null?void 0:n.id]),f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[i&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:$S()}),f.jsxs("div",{className:"settings-stack mt-4.5",children:[f.jsx("section",{className:Hd,children:f.jsx(NBn,{})}),f.jsx("section",{ref:e==="projects"?a:void 0,className:Hd,children:f.jsx(RBn,{remote:s})}),f.jsx("section",{ref:e==="harnesses"?a:void 0,className:Hd,children:f.jsx(eBn,{remote:s})}),!s&&f.jsx("section",{ref:e==="storage"?a:void 0,className:Hd,children:f.jsx(IBn,{})}),f.jsx("section",{className:Hd,children:f.jsx(ABn,{})}),!s&&f.jsx("section",{className:Hd,children:f.jsx(jBn,{})})]})]}),e==="compute"&&f.jsx(bBn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&f.jsx(PBn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&f.jsxs(f.Fragment,{children:[f.jsx("h1",{children:YL()}),f.jsx(CBn,{})]}),e==="git"&&f.jsx(OBn,{project:n,onProjectUpdate:t,remote:s})]})}function gm(e){const n=e.split("@")[0].replace(/[~^]$/,"");return n.charAt(0).toUpperCase()+n.slice(1).replaceAll("-"," ")}function PC(e){return e.replace(/@personal$|\^$/,"@u").replace(/@project$|~$/,"@p")}function Ek(e){return`${e.plugin?`${gm(e.plugin)}: `:""}${gm(e.name)}`}const mq=["plan","goal","new","resume","model","compact","copy","export","side"],UBn={plan:()=>j2t(),goal:()=>BWe(),new:()=>bit(),resume:()=>x8t(),model:()=>hnt(),compact:()=>VAe(),copy:()=>vOe(),export:()=>MBe(),side:()=>nin()};function GBn(e){return{name:e,get description(){return UBn[e]()},source:"command"}}function lx(e){return mq.some(n=>n===e)}const Ob={clear:"new",summarize:"compact"};function Nk(e){const n=e.toLowerCase();return lx(n)?n:Object.hasOwn(Ob,n)?Ob[n]:null}function gq(e){return Object.keys(Ob).filter(n=>Ob[n]===e)}function VBn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&lx(e.name)&&gq(e.name).some(t=>t.startsWith(n))}function M4(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r=r?d:s}${a.slice(d.length)}`:s+a}const o=((u=/^[ \t]+/.exec(a))==null?void 0:u[0].length)??0;return{text:`${i}/${t}${a}`,cursor:i.length+t.length+1+o}}function KR(e,n){let t=e.slice(0,n.start),r=e.slice(n.end);return t?r?/\s$/.test(t)&&/^\s/.test(r)&&(r=r.slice(1)):t=t.replace(/\s$/,""):r=r.replace(/^\s/,""),{text:t+r,cursor:t.length}}function vq(e){return mq.filter(n=>n!=="plan"||e)}function QBn(e,n){const t=e.filter(r=>!Nk(r.name));for(const r of vq(n))t.push(GBn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||Ek(r).localeCompare(Ek(s),void 0,{sensitivity:"base"}))}function O4(e){return e==="plan"||e==="goal"||e==="side"}function XBn(e,n){for(const t of vq(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...gq(t)].join("|");if(t==="plan"){const s=new RegExp(`(^|\\s)\\/(?:${r})(?=\\s|$)`,"gi");if(s.test(e))return{name:t,prompt:e.replace(s,"").trim()}}else if(t==="goal"||t==="side"){const s=new RegExp(`^\\/(?:${r})(?=\\s|$)`,"i");if(s.test(e.trim()))return{name:t,prompt:e.trim().replace(s,"").trim()}}else if(new RegExp(`^\\/(?:${r})$`,"i").test(e.trim()))return{name:t,prompt:""}}return null}function D4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const YBn=["font-family","font-size","font-weight","font-style","font-variant","line-height","letter-spacing","word-spacing","text-transform","direction","unicode-bidi","tab-size","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"];let ZBn=null;function WR(e,n){const t=ZBn??(ZBn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(gm(e)).width-t.measureText(`/${e}`).width;return Math.max(1,Math.ceil((s+6)/t.measureText(" ").width))}const JBn={plan:R6n,goal:A$,new:mCn,resume:S6n,model:KS,compact:a6n,copy:Wf,export:eg,side:tm};function bq({name:e,className:n}){const t=lx(e)?JBn[e]:jCn;return f.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function yq({name:e}){return f.jsxs(f.Fragment,{children:[f.jsx(bq,{name:e,className:"me-1 inline-block align-middle"}),gm(e)]})}function xq(e,n,t,r,s,i=!1){let a=0;return KBn(e,n).map((o,c,u)=>{var m,w;const d=a+o.text.length;a=d;const _=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,_,d,c);let p=o.text;return i||((m=u[c-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(w=u[c+1])!=null&&w.command&&(p=p.replace(/[ \t]+$/," "))),o.command?f.jsx("span",{className:t,onMouseDown:void 0,children:f.jsx(yq,{name:_})},c):i?f.jsx("span",{"aria-hidden":"true",children:o.text},c):f.jsx(T.Fragment,{children:p},c)})}function ePn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=T.useRef(null),o=T.useRef(null),c=T.useRef(null),u=T.useId(),[d,_]=T.useState(!1),p=ft({...X3n(n,s,r.harness),enabled:d,subscribed:d}),m=p.data??null,w=p.isFetching,[k,v]=T.useState({}),y=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},x=()=>{const N=a.current;if(!N)return;const z=N.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(z.left-4,window.innerWidth-A-16));v(z.top>300?{bottom:window.innerHeight-z.top+12,left:j,width:A}:{left:j,top:z.bottom+12,width:A})},b=()=>{y(),x(),_(!0)},C=()=>{y(),c.current=window.setTimeout(()=>_(!1),120)};return T.useEffect(()=>()=>y(),[]),T.useEffect(()=>{if(!d)return;const N=()=>x();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[d]),f.jsxs(T.Fragment,{children:[f.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":d,"aria-label":SJ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onKeyDown:N=>{var z,A;if(N.key==="Escape"){_(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),b();return}d&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),d&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(A=o.current)==null||A.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var z,A;N.preventDefault(),(z=i.current)==null||z.focus(),(A=i.current)==null||A.setSelectionRange(t,t),y()},children:[f.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),f.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:f.jsxs("span",{className:"relative inline-block",children:[f.jsx("span",{className:"pointer-events-none absolute -inset-[7px] rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),f.jsx("span",{className:"relative text-skill-blue",children:f.jsx(yq,{name:n})})]})})]}),d&&ni.createPortal(f.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":Ree({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[f.jsxs("div",{className:"sticky top-0 z-1 flex items-center gap-2 border-b border-border-variant bg-background px-4 py-3",children:[f.jsx("span",{className:"text-sm font-medium text-muted",children:gm(n)}),f.jsx(Zt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:Can()})]}),f.jsx("div",{className:"p-4 text-sm text-text",children:w&&m===null?f.jsx("span",{className:"text-muted",children:Ran()}):f.jsx($c,{text:m??r.description})})]}),document.body)]})}function tPn({text:e,isCommand:n}){return f.jsx(f.Fragment,{children:xq(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function nPn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=T.useRef(null);return T.useLayoutEffect(()=>{const o=i.current,c=a.current;if(!o||!c)return;const u=()=>{const _=getComputedStyle(o);for(const p of YBn)c.style.setProperty(p,_.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};u();const d=new ResizeObserver(u);return d.observe(o),()=>d.disconnect()},[e,i]),T.useLayoutEffect(()=>{const o=i.current;if(!o)return;const c=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return c(),o.addEventListener("scroll",c),()=>o.removeEventListener("scroll",c)},[i,e]),f.jsxs("div",{ref:a,className:"composer-chips pointer-events-none absolute inset-y-0 start-0 z-2 box-border overflow-hidden whitespace-pre-wrap break-words border-solid border-transparent text-transparent select-none",children:[xq(e,t,"",void 0,(o,c,u,d)=>{if(u===n)return f.jsx("span",{"aria-hidden":"true",children:o},`${d}:${u}`);const _=r.find(p=>p.name===PC(c));return _&&_.source!=="command"?f.jsx(ePn,{label:o,name:c,end:u,skill:_,projectId:s,textareaRef:i},`${d}:${u}`):f.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[f.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${d}:${u}`)},!0),"​"]})}function rPn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=T.useRef(null);return T.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),f.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>f.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[f.jsx(bq,{name:i.name,className:"shrink-0"}),f.jsx("span",{className:"skill-name shrink-0",children:Ek(i)}),f.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:Ban()}),i.source==="project"&&f.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:ZXe()})]},i.name))})}function sPn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const zk=6.5,QR=2*Math.PI*zk;function iPn({usage:e}){return!e||e.usedTokens<=0?null:f.jsx(aPn,{usage:e})}function aPn({usage:e}){const{open:n,setOpen:t,ref:r}=ra(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":sPn(a),c=a===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(a/100);return f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[f.jsx("button",{type:"button",className:`${a===null?"inline-flex h-8 items-center rounded-md px-1 transition-[background,color] duration-150 ease-standard hover:bg-surface":"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text transition-[background,color] duration-150 ease-standard hover:bg-surface"} composer-bare context-ring text-sm text-text`,title:YMe(),onClick:()=>t(u=>!u),children:a===null?E1(s):f.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[f.jsx("circle",{cx:"8",cy:"8",r:zk,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),f.jsx("circle",{cx:"8",cy:"8",r:zk,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${QR*Math.max(a,2)/100} ${QR}`,transform:"rotate(-90 8 8)"})]})}),n&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 align-right context-meter-menu w-70 pt-2.5 px-3 pb-3 [&_.progress]:mt-2 [&_.progress]:mx-0 [&_.progress]:mb-0 [&_.progress-track]:h-[5px] [&_.progress-track]:border-0 [&_.progress-track]:bg-border",children:[f.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[f.jsx("span",{children:UMe()}),f.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?sOe({value:Ae(E1(s))}):_Oe({used:Ae(E1(s)),total:Ae(E1(i)),percent:Ae(c)})})]}),a!==null&&f.jsx(iq,{value:s,max:i,fillColor:o})]})]})}function oPn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),f.jsxs("div",{role:"group","aria-label":Gz(),children:[f.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:Gz()}),r.slice(n)]},"from-terminal")]}function cPn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=T.useRef(null),i=T.useRef(null),{data:a,isPending:o,error:c}=ft(h5n()),{data:u=[]}=ft(Af()),{data:d=[]}=ft(KI()),[_,p]=T.useState(""),[m,w]=T.useState(0);sp(s,n);const k=T.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=T.useMemo(()=>{const N=_.trim().toLowerCase(),z=M=>!N||M.toLowerCase().includes(N),A=(a??[]).filter(M=>M.id!==e).filter(M=>z(`${M.title??""} ${k.get(M.projectId)??""} ${Iu[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),j=d.filter(M=>z(`${M.title??""} ${M.cwd??""} ${Iu[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...A,...j]},[a,d,_,e,k]),y=T.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),x=Math.min(m,Math.max(0,v.length-1));T.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[x,v]);const b=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return ni.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-start justify-center bg-modal-backdrop p-5 pt-[var(--modal-top)]",onClick:N=>{N.target===N.currentTarget&&n()},children:f.jsxs("div",{ref:s,className:"flex max-h-[calc(100vh_-_var(--modal-top)_-_1.25rem)] w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-label":Kz(),tabIndex:-1,children:[f.jsx("div",{className:"border-b border-border p-3",children:f.jsx(qr,{"data-initial-focus":!0,value:_,placeholder:Vz(),"aria-label":Vz(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[x]?`resume-option-${v[x].key}`:void 0,onChange:N=>{p(N.target.value),w(0)},onKeyDown:N=>{if(!N.nativeEvent.isComposing)if(N.key==="ArrowDown"||N.key==="ArrowUp"){if(N.preventDefault(),v.length===0)return;const z=N.key==="ArrowDown"?1:-1;w((x+z+v.length)%v.length)}else N.key==="Enter"&&v[x]&&(N.preventDefault(),C(v[x]))}})}),f.jsx("div",{id:"resume-options",className:"min-h-0 flex-1 overflow-y-auto p-1.5",role:v.length>0?"listbox":void 0,"aria-label":v.length>0?Kz():void 0,children:o?f.jsxs(Ur,{className:"px-2.5 py-2",role:"status",children:[f.jsx(Ct,{})," ",NS()]}):c&&!a?f.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:ES({error:Ae(c instanceof Error?c.message:String(c))})}):v.length===0?f.jsx("div",{className:"px-2.5 py-2 text-sm text-muted",role:"status",children:z8t()}):oPn(v,y,(N,z)=>{var D;const A=N.kind==="native"?N.chat:null,j=N.kind==="session"?N.session:null;return f.jsxs(on,{id:`resume-option-${N.key}`,ref:z===x?i:void 0,type:"button",role:"option","aria-selected":z===x,active:z===x,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>w(z),onClick:()=>C(N),children:[f.jsx(Ph,{harness:(A==null?void 0:A.harness)??(j==null?void 0:j.harness)??"claude-code"}),f.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(A==null?void 0:A.title)??(j==null?void 0:j.title))==null?void 0:D.trim())||yv()}),f.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(A==null?void 0:A.cwd)??void 0,children:A?b(A.cwd):k.get((j==null?void 0:j.projectId)??"")??""}),f.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:Dc((A==null?void 0:A.updatedAt)??(j==null?void 0:j.updatedAt)??0)})]},N.key)})})]})}),document.body)}const Db="!";function XR(e){return e.startsWith(Db)?e.slice(Db.length).trim():null}function lPn(e){return e.startsWith(Db)?e.slice(Db.length):e}function uPn(e){return e.replace(/([\\`*_[\]<>$~])/g,"\\$1").replace(/(^|\n)(\s*)(#{1,6}|>|[-+]|\d+\.)\s/g,"$1$2\\$3 ").replace(/(^|\n)(\s*)(=+|-{1,2})(?=\s*(?:\n|$))/g,"$1$2\\$3").replace(/(^|\n)(\s*)(-{3,})(?=\s*(?:\n|$))/g,"$1$2\\$3")}function _Pn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),t="`".repeat(n+1),r=/^[\s`]|[\s`]$/.test(e)?` ${e} `:e;return`${t}${r}${t}`}function fPn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`,o),u=c===-1?e.length:c,d=e.slice(o,u),f=xk(d),p=o+f.offset,m=Kh(e,p,t);if(f.quoteDepth===a.quoteDepth&&!f.hasListMarker&&f.indentation>=a.listIndent&&f.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return c===-1?e.length:c+1;if(c===-1)return e.length;o=c+1}return e.length}function Z$n(e,n,t){const r=Kh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function eBn(e){const n=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function nBn(e,{predictMath:n=!1}={}){const t=eBn(e),r=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(r,s)=>`$$${s}$$`);return n.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(r,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(r,s)=>`$$${s}`)),nBn(t,n)}function JH(e,n={}){let t="",r=0,s=0;for(;ss!==n);return{order:e.order.filter(s=>s!==n),previewKey:e.previewKey===n?null:e.previewKey,fallbackKey:r[r.length-1]??null}}function iBn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function ns(e,n={}){const t=r=>{n.stopPropagation&&r.stopPropagation()};return{onClick:r=>{t(r),e("preview")},onDoubleClick:r=>{t(r),e("keepOpen")},onAuxClick:r=>{r.button===1&&(r.preventDefault(),t(r),e("keepOpen"))},onKeyDown:r=>{const s=iBn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const eq=T.createContext(void 0);function tq({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=rF(s);return a?(a.source==="absolute"?jI(a.path):a.source==="artifact"&&!i?zf(e,a.path):J3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return _.jsx(eq,{value:r,children:t})}function aBn({src:e,alt:n,name:t,onClose:r}){const s=T.useRef(null),i=T.useRef(null),[a,o]=T.useState(1),[c,u]=T.useState({width:0,height:0}),[d,f]=T.useState({width:0,height:0});T.useEffect(()=>{const m=s.current;m==null||m.showModal(),m==null||m.focus();const w=i.current,k=new ResizeObserver(([v])=>{u({width:v.contentRect.width,height:v.contentRect.height})});return w&&k.observe(w),()=>{k.disconnect(),m==null||m.close()}},[]);const p=d.width&&c.width?Math.min(1,c.width*.9/d.width,c.height*.9/d.height):1;return ni.createPortal(_.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||uL(),onCancel:m=>{m.preventDefault(),r()},className:"fixed inset-0 m-0 max-w-none max-h-none w-full h-dvh border-0 outline-none bg-transparent p-0 text-text backdrop:bg-image-backdrop",onClick:m=>{m.stopPropagation(),m.target===m.currentTarget&&r()},children:[_.jsx("div",{ref:i,className:"absolute inset-x-4 sm:inset-x-12 top-16 bottom-32 overflow-auto overscroll-contain",onClick:m=>{m.target===m.currentTarget&&r()},children:_.jsx("div",{className:"flex min-h-full min-w-full w-max pointer-events-none",children:_.jsx("img",{src:e,alt:n,onLoad:m=>f({width:m.currentTarget.naturalWidth,height:m.currentTarget.naturalHeight}),style:d.width?{width:d.width*p*a,height:d.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${d.width&&c.width?"visible":"invisible"}`})})}),_.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[_.jsx(rp,{shape:"circle",href:e,download:t||!0,"aria-label":B3(),title:B3(),className:"bg-background shadow-popover",children:_.jsx(tg,{size:16})}),_.jsx(Rt,{shape:"circle",onClick:r,"aria-label":ib(),title:ib(),className:"bg-background shadow-popover",children:_.jsx(_r,{size:16})})]}),_.jsxs("div",{className:"absolute bottom-6 inset-x-6 flex flex-col items-center gap-3 pointer-events-none",children:[n&&_.jsx("div",{className:"max-w-xl line-clamp-2 rounded-xl bg-background px-4 py-2 text-center text-sm leading-snug shadow-popover",children:n}),_.jsxs("div",{className:"pointer-events-auto flex items-center gap-1 rounded-full bg-background p-1.5 shadow-popover",children:[_.jsx(Rt,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":bz(),title:bz(),children:_.jsx(_Cn,{size:16})}),_.jsxs(Me,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:yz(),"aria-label":yz(),children:[Math.round(a*100),"%"]}),_.jsx(Rt,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":vz(),title:vz(),children:_.jsx(Qf,{size:16})})]})]})]}),document.body)}function oBn({src:e,fallbackSrc:n,downloadName:t,alt:r="",...s}){const[i,a]=T.useState(!1),[o,c]=T.useState(!1),u=i&&n?n:e;return _.jsxs(_.Fragment,{children:[_.jsx("img",{...s,src:u,alt:r,role:"button",tabIndex:0,"aria-haspopup":"dialog",onClick:d=>{d.preventDefault(),d.stopPropagation(),c(!0)},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),d.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&_.jsx(aBn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const cBn=1e5;function lBn({code:e,lang:n}){const[t,r]=T.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return _.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[_.jsx(Rt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:AS(),"aria-label":Wtt(),onClick:s,children:t?_.jsx(ti,{size:13}):_.jsx(Wf,{size:13})}),_.jsx("pre",{children:_.jsx("code",{children:B8n(e,n,cBn)})})]})}function uBn(e){const n={};for(const t of e.matchAll(/([\w-]+)=(["'])(.*?)\2/g)){const r=t[1];r&&(n[r.toLowerCase()]=t[3]??"")}return n}function BR(e,n,t){let r=n.line,s=n.column;for(let i=0;i]*?)\/?>/gi,r=[];let s=0,i=!1;for(const a of n.matchAll(t)){const o=(a[1]??"").toLowerCase(),c=uBn(a[2]??"");if(!c[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:z4(e,s,a.index)});const d=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:z4(e,a.index,d),type:o==="run"?"runMention":"fileMention"}),s=d}return i?(snq(e)}function FR({path:e,line:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n!=null?`${s}:${n}`:s;return _.jsxs("button",{className:"file-chip",title:r?UZ({path:Ae(e)}):e,...ns(a=>r==null?void 0:r(e,n,t,void 0,a)),disabled:!r,children:[_.jsx(j$,{size:12}),_.jsx("span",{className:"file-chip-label",children:i}),_.jsx(O$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function fBn({id:e,label:n,onOpenRun:t}){return _.jsxs("button",{className:"file-chip run-chip",title:t?uJ({id:Ae(e)}):_ee({id:Ae(e)}),...ns(r=>t==null?void 0:t(e,r)),disabled:!t,children:[_.jsx(YS,{size:12}),_.jsx("span",{className:"file-chip-label",children:n||yI()}),_.jsx(O$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const rq={singleDollarTextMath:!0},dBn=Vy().use(qy).use(XH).use(YH,rq).use(Q$n).use(_Bn).use(Eb).use(BRn).use(CH);function hBn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const sq={code:({node:e,className:n,children:t,...r})=>{const s=n??"",i=/language-(\w+)/.exec(s),a=String(t??"").replace(/\n$/,"");if(!(i!=null||a.includes(` +`)))return _.jsx("code",{className:s,...r,children:t});const c=i?C5(i[1]):null;return _.jsx(lBn,{code:a,lang:c})},pre:({children:e})=>_.jsx(_.Fragment,{children:e})};function pBn({children:e}){return _.jsx("figure",{className:"my-6 mx-auto max-w-full text-left [&_img]:mx-auto [&_img]:my-0 [&_img]:w-auto [&_img]:h-auto [&_img]:max-h-[min(480px,60vh)] [&_img]:object-contain [&_img]:border-0 [&_img]:rounded-none",children:e})}const $c=T.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){d_();const o=T.useContext(eq),c=i??o,u=T.useMemo(()=>({"file-mention":d=>{const f=X5(d.path),p=d.lines&&$Rn(d.lines)||f.line;return _.jsx(FR,{path:f.path,line:p,exp:d.exp,onOpenFile:t})},"run-mention":d=>_.jsx(fBn,{id:d.id,label:d.label,onOpenRun:r}),a:({node:d,href:f,children:p,"data-figure-src":m,"data-cited-href":w,...k})=>{const v=typeof m=="string"?rF(m):null;if(v&&t){const b=v.source==="artifact"?`artifacts/${v.path}`:v.path,C=s?s(b):b;if(C)return _.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...ns(N=>t(C,void 0,void 0,void 0,N)),children:p})}const y=typeof w=="string"?w:f,x=y?X5(y):null;if(x&&hBn(x.path)&&t){let b;try{b=decodeURI(x.path)}catch{return _.jsx("span",{children:p})}const C=s?s(b):b;return C?_.jsx(FR,{path:C,line:x.line,onOpenFile:t}):_.jsx("span",{children:p})}return _.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",...k,children:p})},figure:({children:d})=>_.jsx(pBn,{children:d}),figcaption:({children:d})=>_.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:d}),th:({node:d,...f})=>_.jsx("th",{dir:"auto",...f}),td:({node:d,...f})=>_.jsx("td",{dir:"auto",...f}),img:({node:d,src:f,alt:p,className:m,...w})=>{var v;if(!f||typeof f!="string")return null;const k=c?c(f):f;return k?T.createElement(oBn,{...w,key:k,downloadName:(v=f.split(/[\\/]/).pop())==null?void 0:v.split(/[?#]/)[0],src:k,fallbackSrc:i?null:o==null?void 0:o(f,!0),alt:p??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border cursor-zoom-in focus-visible:outline-2 focus-visible:outline-primary ${m??""}`}):null},...sq}),[t,r,s,i,o,c]);return _.jsx("div",{dir:"auto","data-streaming":a||void 0,className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:text-prose-emphasis [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h2]:text-text [&_h2]:text-prose-emphasis [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mx-0 [&_h2]:mb-1.5 [&_h3]:text-text [&_h3]:text-prose-emphasis [&_h3]:font-semibold [&_h3]:mt-3 [&_h3]:mx-0 [&_h3]:mb-1.5 [&_h4]:text-text [&_h4]:text-prose-emphasis [&_h4]:font-semibold [&_h4]:mt-3 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_table]:overflow-x-auto [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text",children:_.jsx(oOn,{content:JH(n,{predictMath:a}),processor:dBn,components:u,predict:a})})}),HR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function mBn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=T.useState(!1),u=T.useRef(null),[d,f]=T.useState(!1),[p,m]=T.useState(""),w=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=y=>{u.current&&!u.current.contains(y.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;d&&((v=w.current)==null||v.focus())},[d]);const k=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),f(!1)};return _.jsxs("div",{className:"plan-strip relative w-full mt-0 mx-0 mb-2.5 py-[11px] px-[13px] flex flex-col items-stretch gap-2.5 border border-border border-s-[3px] border-s-accent-blue rounded-md bg-surface shadow-plan",children:[_.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[_.jsx(YS,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),_.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?Twt({agent:Ae(n)}):Swt({agent:Ae(n)})}),_.jsx("button",{className:"plan-strip-open ms-auto p-0 border-0 bg-none bg-transparent text-accent-blue text-sm cursor-pointer whitespace-nowrap shrink-0 [&:hover]:underline",...ns(t),children:Ywt()})]}),d?_.jsxs(_.Fragment,{children:[_.jsx("textarea",{dir:"auto",ref:w,className:"plan-strip-revise-input w-full resize-none border border-border rounded-md py-[9px] px-[11px] text-sm font-[inherit] bg-background text-text [&:focus]:border-accent-blue",placeholder:C4t(),rows:2,value:p,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Escape"?(v.preventDefault(),m(""),f(!1)):v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),k())}}),_.jsxs("div",{className:HR,children:[_.jsx(Me,{size:"small",onClick:()=>{m(""),f(!1)},children:IL()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),_.jsxs(Me,{size:"small",variant:"primary",onClick:k,children:[_4t(),_.jsx(z$,{size:13})]})]})]}):_.jsxs("div",{className:HR,children:[_.jsx(Me,{size:"small",onClick:i,children:s4t()}),_.jsx(Me,{size:"small",onClick:()=>f(!0),children:v4t()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),s?_.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[_.jsx(Me,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:rwt()}),_.jsx(Me,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":Uwt(),onClick:()=>c(v=>!v),children:_.jsx(qc,{size:13})}),o&&_.jsx("div",{className:"plan-strip-menu absolute end-0 bottom-[calc(100%_+_4px)] flex min-w-47.5 flex-col rounded-md border border-border bg-surface p-1 shadow-plan-menu z-6",children:_.jsx(un,{onClick:()=>{c(!1),r("bypassPermissions")},children:uwt()})})]}):_.jsx(Me,{size:"small",variant:"primary",onClick:()=>r(),children:gwt()})]})]})}function qR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,d]=T.useState(null);async function f(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),d(null);try{n(await e(i.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{c(!1)}}}return _.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:f,children:[_.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),_.jsx(Me,{type:"submit",disabled:o||!i.trim(),children:o?Ba():Qo()}),_.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??RWe()}),u&&_.jsx("div",{className:"error",children:u})]})}function iq({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return _.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[_.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:_.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${i}%`,background:s}})}),(t!==void 0||r!==void 0)&&_.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[_.jsx("span",{children:t??`${i}%`}),r]})]})}function gBn({settings:e}){const[n,t]=T.useState(!1);return _.jsxs("label",{className:"inline-flex max-w-full flex-wrap items-center gap-2 text-sm text-subtext",children:[efn(),_.jsx("span",{className:"inline-block w-max max-w-full",children:_.jsx(Lc,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:eI()},...e.defaultHost&&!e.hosts.some(r=>r.host===e.defaultHost)?[{id:e.defaultHost,label:e.defaultHost}]:[],...e.hosts.map(r=>({id:r.host,label:r.host}))],onSelect:r=>{t(!0),L4n(r||null).catch(s=>{sn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function vBn({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=pn({mutationFn:D4n,scope:{id:`ssh-settings-${e.host}`}});function a(o){r(o),i.reset(),!(o!==null&&!o.trim())&&i.mutate({host:e.host,container:(o==null?void 0:o.trim())??null})}return _.jsxs("details",{className:"pb-3",children:[_.jsx("summary",{className:"w-fit cursor-pointer rounded-sm text-sm text-subtext focus-visible:outline-2 focus-visible:outline-text",children:zL()}),_.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[_.jsxs("label",{className:"text-sm text-subtext",children:[xfn(),_.jsx(Lc,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:ofn()},{id:"container",label:hfn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&_.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[K_n(),_.jsx(qr,{id:`${s}-container`,value:t,disabled:n,required:!0,onChange:o=>a(o.target.value)})]}),i.error&&_.jsx("p",{className:"m-0 text-sm text-accent-red",role:"status",children:i.error.message})]})]})}const Bc=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text","[&_.settings-sub]:mb-3 [&_.kv]:gap-y-1.5 [&_.kv]:gap-x-4.5","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0"].join(" "),Lf=["kv grid grid-cols-[auto_1fr] items-baseline gap-y-[3px] gap-x-3.5 text-base","[&_.k]:text-sm [&_.k]:text-subtext [&_.v]:text-base [&_.v]:text-text","[&_.v]:break-all"].join(" "),bBn=["grid grid-cols-[9rem_minmax(0,1fr)] items-center gap-x-5 gap-y-2.5 font-sans text-base text-text","[&_.k]:font-medium [&_.k]:text-sm [&_.k]:text-text","[&_.v]:min-w-0 [&_.v]:flex [&_.v]:items-center [&_.v]:flex-wrap [&_.v]:gap-2","[&_.v]:font-sans [&_.v]:text-base [&_.v]:text-text [&_.v]:break-words"].join(" "),ax="mt-3 mx-0 mb-0 ps-3 border-s-2 border-s-accent-red font-sans text-base leading-relaxed text-text whitespace-pre-wrap",mo=["settings-note mt-2.5 mx-0 mb-0 text-base py-2 px-2.5","border border-accent-amber rounded-md bg-accent-amber-subtle","text-accent-amber font-medium"].join(" "),$C=["form font-sans text-sm text-text [&_.form-seg]:self-start [&_.form-seg]:mb-0.5","[&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3","[&_.repo-hint]:font-normal [&_.repo-hint]:text-sm","[&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal","[&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center","[&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full","[&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5","[&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background","[&_.folder-picker-control]:border [&_.folder-picker-control]:border-border","[&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer","[&_.folder-picker-control]:text-start","[&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard","[&_.folder-picker-control:hover:not(:disabled)]:border-muted","[&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle","[&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text","[&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1","[&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden","[&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap","[&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none","[&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none","[&_.folder-picker-chevron]:text-muted","[&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext","[&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm","[&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4]","[&_.project-location-field]:flex [&_.project-location-field]:flex-col","[&_.project-location-field]:gap-2 [&_.project-location-label]:text-text","[&_.project-location-label]:text-base","[&_.project-location-label]:font-medium [&_.project-field-label]:text-text","[&_.project-field-label]:text-base [&_.project-field-label]:font-medium","[&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65","[&_.paper-destination]:flex [&_.paper-destination]:items-center","[&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3","[&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md","[&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1","[&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden","[&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm","[&_.paper-destination_code]:font-normal","[&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap","[&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px]","[&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant","[&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface","[&_.project-path-notice]:text-base [&_.project-path-notice]:leading-relaxed [&_.project-path-notice]:text-text","[&_.project-path-notice]:leading-[1.4]","[&_.project-path-notice.error]:border-danger-notice-border","[&_.paper-results]:flex [&_.paper-results]:flex-col","[&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md","[&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto","[&_.paper-results_button]:flex [&_.paper-results_button]:flex-col","[&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5","[&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent","[&_.paper-results_button]:border-0","[&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant","[&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit]","[&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer","[&_.paper-results_button:last-child]:border-b-0","[&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm","[&_.paper-results_.title]:font-medium","[&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted","[&_.paper-pick_.id]:text-xs","[&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center","[&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3","[&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md","[&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0","[&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium","flex flex-col gap-2.5 [&_label]:flex [&_label]:flex-col","[&_label]:gap-1 [&_label]:text-sm [&_label]:text-text","[&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2","[&_input]:font-sans [&_input]:text-sm [&_input]:font-normal [&_input]:text-text [&_input::placeholder]:text-subtext","[&_select]:font-sans [&_select]:text-sm [&_select]:font-normal [&_select]:text-text","[&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end","[&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start","[&_.new-project-actions]:mt-2.5","[&_.error]:text-accent-red [&_.error]:text-base [&_.error]:whitespace-pre-wrap","settings-form mt-3.5 pt-3.5 border-t border-t-border"].join(" "),Il=["project-default-row flex items-center justify-between gap-6","pt-3.5 border-t border-t-border-variant [&_p]:mt-[3px] [&_p]:mx-0 [&_p]:mb-0","[&_.project-default-title]:text-base [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-text"].join(" "),wk=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base","[&_h3]:font-semibold [&_h3]:text-text [&_.settings-sub]:mb-3","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0","git-settings-card py-3.5 px-4 [&_h3]:mb-3","[&_.kv]:grid-cols-[132px_minmax(0,_1fr)] [&_.kv]:items-center [&_.kv]:gap-y-[9px] [&_.kv]:gap-x-4.5","[&_.kv_.k]:text-sm [&_.kv_.v]:flex [&_.kv_.v]:items-center","[&_.kv_.v]:flex-wrap [&_.kv_.v]:gap-[7px] [&_.kv_.v]:min-w-0 [&_.kv_.v]:font-sans","[&_.kv_.v]:text-base [&_.kv_.v]:break-normal","[@media((max-width:_640px))]:[&_.kv]:grid-cols-1","[@media((max-width:_640px))]:[&_.kv]:gap-[3px] [@media((max-width:_640px))]:[&_.kv_.v_+_.k]:mt-[7px]"].join(" "),q0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),Hd=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" "),yBn=new Set(["gh auth login","hf auth login","claude auth status"]);function aq(e){return yBn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function ox(){const[e,n]=T.useState(null);return{run:e,start:(r,s,i)=>n(a=>({command:r,path:s,owner:i,attempt:((a==null?void 0:a.attempt)??0)+1})),clear:()=>n(null)}}function BC({note:e,className:n,disabled:t,resolve:r=aq,onRun:s}){return e?_.jsx("p",{className:n,children:s_(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function cx({run:e,onComplete:n,onClose:t}){return e?_.jsx(h7n,{path:e.path,label:e.command,onComplete:n,onError:r=>sn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function j4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:Ef()}:e.authCheckFailed?{cls:"warn",variant:"warning",label:rb()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:AL()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="thirdParty"||yy(e)?Ym():e.authMethod==="local"?RS():TXt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:OFt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:TL()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:rb()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:GZt()}:{cls:"warn",variant:"warning",label:tI()}:{cls:"warn",variant:"warning",label:iVt()}}function xBn({h:e}){if(e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod)return _.jsx(_.Fragment,{children:pAt()});const n=yy(e);return n?_.jsx(_.Fragment,{children:n}):e.authMethod?e.authMethod==="local"?_.jsx(_.Fragment,{children:G3()}):e.authMethod==="thirdParty"?_.jsx(_.Fragment,{children:cI()}):_.jsx(_.Fragment,{children:e.authMethod==="oauth"?wDt():TS()}):_.jsx(_.Fragment,{children:"—"})}function wBn(e,n,t){if(!n)return;const r=n.installUrl!==void 0&&t.includes(n.installUrl),s=t===n.login?"login":t===n.install?"install":t===n.update?"update":r?"install":null;if(s&&!(s!=="install"&&(!e.installed||e.installBroken)))return`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:s,shell:"true"})}`}function kBn({remote:e}){const n=r_(),{data:t=null}=dt(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=ox(),[c,u]=T.useState(null),d=dt(GI()),f=(w,k=!1)=>{a(!0),jf(w,k).catch(()=>{}).finally(()=>a(!1))},p=[...t??[]].sort((w,k)=>Number(k.agentReady)-Number(w.agentReady)),m=p.find(w=>w.id===r)??p[0];return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:Q3()}),!e&&c&&d.data&&_.jsx(J$,{harness:c,commands:d.data[c.id],onClose:()=>u(null)}),_.jsx("div",{className:"mt-3 mb-3.5 w-fit max-w-full [&_.option-menu]:w-max",children:_.jsx(Lc,{variant:"field",dropDown:!0,title:Q3(),choices:p.map(w=>({id:w.id,label:w.name})),value:(m==null?void 0:m.id)??null,onSelect:w=>{const k=p.find(v=>v.id===w);k&&s(k.id)},renderIcon:w=>{const k=p.find(v=>v.id===w.id);return k&&_.jsx(Ph,{harness:k.id})},renderLabel:w=>{const k=p.find(y=>y.id===w.id),v=k&&j4(k);return _.jsxs("span",{className:"inline-flex items-center gap-2 whitespace-nowrap",children:[w.label,v&&_.jsxs(_.Fragment,{children:[_.jsx("span",{"aria-hidden":"true",className:`size-1.5 shrink-0 rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${v.cls}`}),_.jsx("span",{className:"sr-only",children:v.label})]})]})}})}),t?m?_.jsxs("div",{className:Bc,children:[_.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[_.jsx(Zt,{variant:j4(m).variant,children:j4(m).label}),_.jsx("div",{className:"spacer flex-1"}),!e&&!m.catalogPending&&m.installed&&!m.installBroken&&!m.authenticated&&!m.needsConfigRepair&&(m.id==="claude-code"?m.loginEligible:m.authMethod!=="local"&&m.authMethod!=="apiKey"&&m.authState!=="unsupported")&&_.jsxs(Me,{size:"small",onClick:()=>u(m),disabled:!d.data,"aria-haspopup":"dialog",children:[_.jsx(Xf,{size:14})," ",kL()]}),_.jsxs(Me,{size:"small",onClick:()=>f(!0,!0),disabled:i,children:[_.jsx(xo,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Zm()]})]}),_.jsxs("div",{className:$s(Lf,"[&_.v]:text-sm"),children:[_.jsx("span",{className:"k",children:tIt()}),_.jsx("span",{className:"v",children:m.binPath??QOt()}),_.jsx("span",{className:"k",children:oI()}),_.jsx("span",{className:"v",children:m.version??"—"}),_.jsx("span",{className:"k",children:wLt()}),_.jsx("span",{className:"v",children:_.jsx(xBn,{h:m})}),m.account&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:m.id==="opencode"?cI():LS()}),_.jsx("span",{className:"v",children:m.account})]}),m.org&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:gKt()}),_.jsx("span",{className:"v",children:m.org})]}),m.plan&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:vWt()}),_.jsx("span",{className:"v",children:m.plan})]}),_.jsx("span",{className:"k",children:lLt()}),_.jsx("span",{className:"v",children:m.catalogPending?Ef():m.models.length>0?HMt({count:_n(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(w=>Ae(wv(w))))}):m.agentReady?P3():GL()})]}),_.jsx(BC,{note:m.agentNote,className:$s(mo,"text-sm"),disabled:e,resolve:w=>{var k;return wBn(m,(k=d.data)==null?void 0:k[m.id],w)??aq(w)},onRun:(w,k)=>o.start(w,k,m.id)}),o.run&&_.jsx("div",{hidden:o.run.owner!==m.id,children:_.jsx(cx,{run:o.run,onComplete:()=>f(!0,!0),onClose:o.clear})}),m.id==="opencode"&&_.jsx(rB,{installed:m.installed})]}):null:_.jsxs(Ur,{children:[_.jsx(Et,{})," ",QBt()]})]})}function SBn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?_.jsx(Zt,{variant:"success",children:N$t()}):_.jsx(Zt,{variant:"error",children:iGt()}):_.jsx(Zt,{variant:"error",children:o$t()}):_.jsx(Zt,{variant:"error",children:xHt()})}function CBn({onEditState:e}){var A;const n=pn({mutationFn:E4n}),t=dj(),r=dt(t),s=r.data??null,i=j=>{ts(t.queryKey,M=>(typeof j=="function"?j(M??null):j)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,c]=T.useState(""),[u,d]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(null),y=j=>{i(j),c(j.context??""),d(j.namespace)},x=T.useRef(null);T.useEffect(()=>{const j=x.current;x.current=s,s&&(!j||o===(j.context??"")&&u.trim()===j.namespace)&&(c(s.context??""),d(s.namespace??""))},[s,o,u]);const b=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!b;T.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!b)){w(!0);try{await Ze.fetchQuery({...dj(),staleTime:0})}catch(j){sn(j instanceof Error?j.message:String(j),"error")}finally{w(!1)}}}async function z(j){if(j.preventDefault(),!(f||m)){p(!0),v(null);try{y(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){v(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return _.jsx(_.Fragment,{children:a?_.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?_.jsxs(_.Fragment,{children:[_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"text-subtext",children:np()}),_.jsx("dd",{className:"m-0",children:m||f?_.jsx(Zt,{children:Da()}):C?_.jsx(Zt,{children:bL()}):_.jsx(SBn,{s})})]}),b&&!m&&!f&&s.preflight.error&&_.jsx("p",{className:`${ax} break-words`,children:s.preflight.error}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:z,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[O$t(),_.jsx(Lc,{choices:[{id:"",label:s.currentContext?ERt({context:Ae(s.currentContext)}):bRt()},...o&&!s.contexts.includes(o)?[{id:o,label:nDt({context:Ae(o)})}]:[],...s.contexts.map(j=>({id:j,label:j}))],value:o,variant:"field",dropDown:!0,disabled:f||m,onSelect:c})]}),_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[uUt(),_.jsx(qr,{type:"text",value:u,disabled:f||m,onChange:j=>d(j.target.value),placeholder:wBt(),autoComplete:"off",spellCheck:!1})]}),k&&_.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:k}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Me,{type:"button",onClick:()=>void N(),disabled:f||m||!b,children:[_.jsx(xo,{size:13})," ",m?Da():Qm()]}),_.jsx(Me,{variant:"primary",type:"submit",disabled:f||m||b,children:f?Ba():Qo()})]})]})]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",zIt()]})})}function EBn(){var b;const e=pn({mutationFn:C=>z4n(...C)}),n=hj(),t=dt(n),r=t.data??null,s=C=>{ts(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=T.useState(null),o=i??((b=t.error)==null?void 0:b.message)??null,[c,u]=T.useState(""),[d,f]=T.useState(""),[p,m]=T.useState(!1),w=t.isPending||p,[k,v]=T.useState(!1);async function y(){if(!(w||k)){m(!0),a(null);try{await Ze.fetchQuery({...hj(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function x(C){if(C.preventDefault(),!(!c.trim()||!d.trim()||w||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),d.trim()])),u(""),f("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return _.jsxs(_.Fragment,{children:[!r&&w?_.jsxs(Ur,{children:[_.jsx(Et,{})," ",DIt()]}):r&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:np()}),_.jsx("dd",{className:"m-0",children:_.jsx(Zt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Ym():ay()})})]}),(r==null?void 0:r.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:eMt()}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:x,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?oMt():zMt(),_.jsx(qr,{type:"password",value:c,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?hMt():DMt(),_.jsx(qr,{type:"password",value:d,onChange:C=>f(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),_.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:xMt()}),o&&_.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Me,{type:"button",disabled:w||k,onClick:()=>void y(),children:[_.jsx(xo,{size:13})," ",Zm()]}),_.jsx(Me,{variant:"primary",type:"submit",disabled:!c.trim()||!d.trim()||w||k||(r==null?void 0:r.processEnv),children:k?Ba():Qo()})]})]})]})}const oq="rounded-sm border-border-strong bg-surface text-subtext",cq="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",NBn=5e3;function lq(e){const n=go(),t=e.map(a=>pj(a)),r=lD({queries:t.map(a=>({...a,refetchInterval:NBn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{Gn(n)&&ts(pj(a).queryKey,{running:!0})}]}function zBn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return _.jsx("span",{role:"status",children:_.jsx(Zt,{className:cq,children:qL()})});if(e===void 0)return _.jsx(Zt,{className:oq,children:JL()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?_.jsx(Zt,{className:"rounded-sm",variant:"error",children:IS()}):e.toolsFound?i?_.jsx(Zt,{className:"rounded-sm",variant:"warning",children:UL()}):_.jsx(Zt,{className:"rounded-sm",variant:"success",children:Xm()}):_.jsx(Zt,{className:"rounded-sm",variant:"error",children:s.length===1?QMt({tool:Ae(s[0])}):nOt()});return _.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!i&&_.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Dc(e.testedAt)})]})}function jBn(){var D;const e=UI(),n=dt(e),t=((D=n.data)==null?void 0:D.hosts)??(n.isError?[]:null),[r,s]=T.useState(!1),[i,a]=T.useState({}),[o,c]=T.useState({}),u=T.useRef(0),[d,f]=T.useState(!1),[p,m]=T.useState({}),[w,k]=T.useState(null),[v,y]=T.useState(!1),[x,b]=T.useState(0),C=(t==null?void 0:t.filter(L=>{const B=i[L.host]??L.lastTest;return(B==null?void 0:B.reachable)&&B.toolsFound}).map(L=>L.host))??[],[N,z]=lq(C);function A(L){u.current+=1,f(!1),y(!1),b(B=>B+1),k(L),m(B=>({...B,[L]:!0}))}function j(){u.current+=1,f(!1),y(!1),k(null)}function M(L,B){m(U=>({...U,[L]:!B}))}return _.jsxs(_.Fragment,{children:[n.error&&_.jsx("p",{className:"text-sm text-accent-red",children:n.error.message}),_.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-3",children:[n.data&&_.jsx(gBn,{settings:n.data}),_.jsxs(Me,{variant:"ghost",className:"ms-auto",onClick:()=>s(!0),children:[_.jsx(hy,{size:14})," ",pI()]})]}),t===null?_.jsxs(Ur,{children:[_.jsx(Et,{})," ",rI()]}):t.length===0?_.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:ZUt()}):_.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:t.map(L=>{var V,ie,oe;const B=o[L.host]===void 0?L.container??null:o[L.host],U=i[L.host],H=B!==null&&((V=U==null?void 0:U.container)==null?void 0:V.reference)===B.trim()?U:void 0,Q=B!==null?H:U!=null&&U.container?L.lastTest:U??L.lastTest,K=(ie=H==null?void 0:H.container)==null?void 0:ie.error,Z=((oe=H==null?void 0:H.container)==null?void 0:oe.ready)===!1,ee=(Q==null?void 0:Q.error)||K,$=w===L.host,I=p[L.host]??!1,F=$||!!ee,q=`${L.user?`${L.user}@`:""}${L.hostname??L.host}${L.port?`:${L.port}`:""}`;return _.jsxs("div",{children:[_.jsxs("div",{className:"flex items-center gap-3 py-3",children:[_.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:_.jsxs("div",{className:"min-w-0",children:[_.jsx("div",{className:"truncate text-base font-medium text-text",title:L.host,children:L.host}),_.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:q,children:q})]})}),_.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[_.jsxs("div",{className:"flex items-center gap-2 text-start",children:[_.jsx(zBn,{test:Q,connecting:$&&!v,masterRunning:N[L.host],containerFailed:Z}),F&&_.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":I,"aria-label":I?uY({name:Ae(L.host)}):XY({name:Ae(L.host)}),onClick:ce=>{ce.stopPropagation(),M(L.host,I)},children:_.jsx(qc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${I?" rotate-180":""}`})})]}),_.jsx(Me,{size:"small",type:"button",className:"justify-self-end",onClick:ce=>{ce.stopPropagation(),$&&!v?j():A(L.host)},disabled:!$&&(w!==null&&!v||B!==null&&!B.trim()),children:$?v?Ks():Nf():(Q==null?void 0:Q.reachable)===!1||Z?Ks():Q?lI():OS()})]})]}),_.jsx(vBn,{host:L,connecting:$&&!v,reference:B,onChange:ce=>{$&&j(),c(ne=>({...ne,[L.host]:ce})),a(ne=>{const G={...ne};return delete G[L.host],G})}}),F&&(I||$)&&_.jsxs("div",{className:`border-t border-t-border-variant py-3${I?"":" hidden"}`,children:[!$&&ee&&_.jsx(p7n,{host:L.host,transcript:ee}),$&&!d&&_.jsx(t6,{host:L.host,backend:"ssh",active:I,onComplete:ce=>{if(ce.backend!=="ssh")return;z(L.host);const ne=u.current;if(B===null){a(G=>({...G,[L.host]:{...ce.result,container:null}})),y(!1),k(null);return}f(!0),I4n(L.host,B.trim()).then(G=>{u.current===ne&&a(ae=>({...ae,[L.host]:{...G,container:G.container??{reference:B.trim(),ready:!1,error:G.error??null}}}))}).catch(G=>{u.current===ne&&a(ae=>({...ae,[L.host]:{...ce.result,container:{reference:B.trim(),ready:!1,error:G instanceof Error?G.message:String(G)}}}))}).finally(()=>{u.current===ne&&(f(!1),y(!1),k(null))})},onError:ce=>{y(!0),a(ne=>({...ne,[L.host]:{container:B===null?null:{reference:B.trim(),ready:!1,error:ce},reachable:!1,toolsFound:!1,missingTools:[],error:ce,testedAt:Date.now()}}))}},x)]})]},L.host)})}),r&&_.jsx(zB,{onClose:()=>s(!1)})]})}function ABn({test:e,connecting:n,masterRunning:t}){return n?_.jsx(Zt,{className:cq,children:qL()}):e===null?_.jsx(Zt,{className:oq,children:JL()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?_.jsx(Zt,{className:"rounded-sm",variant:"warning",children:UL()}):_.jsx(Zt,{className:"rounded-sm",variant:"success",children:Xm()}):_.jsx(Zt,{className:"rounded-sm",variant:"error",children:Lqt()}):_.jsx(Zt,{className:"rounded-sm",variant:"error",children:MGt()}):_.jsx(Zt,{className:"rounded-sm",variant:"error",children:IS()})}function TBn(){var ee;const e=pn({mutationFn:W4n}),n=s5n(),t=dt(n),r=t.data??null,s=$=>{ts(n.queryKey,I=>(typeof $=="function"?$(I??null):$)??void 0)},i=r?null:((ee=t.error)==null?void 0:ee.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(""),[d,f]=T.useState(""),[p,m]=T.useState(""),[w,k]=T.useState(!1),[v,y]=T.useState(null),[x,b]=T.useState(null),[C,N]=T.useState(!1),[z,A]=T.useState(!1),[j,M]=T.useState(0),D=a&&(x!=null&&x.reachable)&&x.slurmFound&&x.toolsFound?[a]:[],[L,B]=lq(D);function U(){A(!1),M($=>$+1),N(!0)}const H=$=>{s($),o($.host??""),u($.partition??""),f($.account??""),m($.timeLimit??"")},Q=T.useRef(null);T.useEffect(()=>{const $=Q.current;Q.current=r,r&&(!$||a===($.host??"")&&c.trim()===($.partition??"")&&d.trim()===($.account??"")&&p.trim()===($.timeLimit??""))&&(o(r.host??""),u(r.partition??""),f(r.account??""),m(r.timeLimit??""))},[r,a,c,d,p]);const K=r!==null&&a===(r.host??"")&&c.trim()===(r.partition??"")&&d.trim()===(r.account??"")&&p.trim()===(r.timeLimit??"");async function Z($){if($.preventDefault(),!w){k(!0),y(null);try{H(await e.mutateAsync({host:a,partition:c.trim(),account:d.trim(),timeLimit:p.trim()}))}catch(I){y(I instanceof Error?I.message:String(I))}finally{k(!1)}}}return _.jsx(_.Fragment,{children:i?_.jsx("div",{className:"error",children:i}):r?_.jsxs(_.Fragment,{children:[!C&&(x==null?void 0:x.error)&&_.jsx("p",{className:ax,children:x.error}),_.jsxs("form",{className:$C,onSubmit:Z,children:[_.jsx("div",{className:"max-w-xl",children:_.jsxs("label",{children:[wqt(),_.jsx(Lc,{choices:[{id:"",label:eI()},...a&&!r.hosts.some($=>$.host===a)?[{id:a,label:`${a} (not in ~/.ssh/config)`}]:[],...r.hosts.map($=>({id:$.host,label:$.host}))],value:a,variant:"field",dropDown:!0,disabled:w||C,onSelect:$=>{o($),b(null),N(!1),A(!1)}})]})}),_.jsxs("div",{className:"actions",children:[_.jsx(Me,{type:"button",onClick:()=>{C&&!z?(A(!1),N(!1)):U()},disabled:!a,title:a?void 0:UJt(),children:C?z?Ks():Nf():x?lI():OS()}),_.jsx("span",{role:"status",children:_.jsx(ABn,{test:x,connecting:C&&!z,masterRunning:L[a]})})]}),_.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[_.jsxs("div",{className:"row2",children:[_.jsxs("label",{children:[sWt(),_.jsx(qr,{type:"text",list:"slurm-partitions",value:c,onChange:$=>u($.target.value),placeholder:Yz(),autoComplete:"off",spellCheck:!1}),_.jsx("datalist",{id:"slurm-partitions",children:x==null?void 0:x.partitions.map($=>_.jsx("option",{value:$},$))})]}),_.jsxs("label",{children:[LS(),_.jsx(qr,{type:"text",value:d,onChange:$=>f($.target.value),placeholder:Yz(),autoComplete:"off",spellCheck:!1})]})]}),_.jsxs("label",{className:"mt-3 block max-w-xl",children:[EZt(),_.jsx(qr,{type:"text",value:p,onChange:$=>m($.target.value),placeholder:e$t(),autoComplete:"off",spellCheck:!1})]})]}),v&&_.jsx("div",{className:"error",children:v}),_.jsx("div",{className:"actions",children:_.jsx(Me,{variant:"primary",type:"submit",disabled:w||K||C,children:w?Ba():Qo()})})]}),C&&_.jsx(t6,{host:a,backend:"slurm",onComplete:$=>{$.backend==="slurm"&&(b($.result),B(a),A(!1),N(!1))},onError:$=>{A(!0),b({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:$})}},j)]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",WHt()]})})}function RBn(){var C;const e=pn({mutationFn:X4n}),n=i5n(),t=dt(n),r=t.data??null,s=N=>{ts(n.queryKey,z=>(typeof N=="function"?N(z??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(!1),[d,f]=T.useState(null),[p,m]=T.useState(null),w=p!==null&&p!=="testing"?p:null,k=N=>{s(N),o(N.address??"")},v=T.useRef(null);T.useEffect(()=>{const N=v.current;v.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const y=r!==null&&a===(r.address??"");async function x(N){if(N.preventDefault(),!c){u(!0),f(null);try{k(await e.mutateAsync({address:a}))}catch(z){f(z instanceof Error?z.message:String(z))}finally{u(!1)}}}async function b(){m("testing");try{m(await Y4n(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return _.jsx(_.Fragment,{children:i?_.jsx("div",{className:"error",children:i}):r?_.jsxs(_.Fragment,{children:[(w==null?void 0:w.error)&&_.jsx("p",{className:ax,children:w.error}),_.jsxs("form",{className:$C,onSubmit:x,children:[_.jsxs("label",{children:[hHt(),_.jsx(qr,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),_.jsxs("p",{className:"m-0 text-sm text-subtext",children:[lPt(),": ",Ae(r.resolvedAddress)," · ",sI(),": ",r.source]}),d&&_.jsx("div",{className:"error",children:d}),_.jsxs("div",{className:"actions",children:[_.jsx(Me,{variant:"primary",type:"submit",disabled:c||y,children:c?Ba():Qo()}),_.jsx(Me,{type:"button",onClick:()=>void b(),disabled:p==="testing",children:$Yt()}),_.jsx(MBn,{test:p})]}),(w==null?void 0:w.reachable)&&w.rayVersion&&_.jsxs("p",{className:"m-0 text-sm text-subtext",children:[RWt(),": ",w.rayVersion]})]})]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",FHt()]})})}function MBn({test:e}){return e===null?null:e==="testing"?_.jsx(Zt,{children:GYt()}):e.reachable?_.jsx(Zt,{variant:"success",children:BWt()}):_.jsx(Zt,{variant:"error",children:IS()})}function OBn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:Dl(e.memBytes),r=e.gpus.length===0?null:XAt({count:e.gpus.length});return[n,e.cpuCount>0?wjt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function DBn({remote:e}){var p;const n=dt(o5n()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=T.useState(0),[o,c]=T.useState(!0),[u,d]=T.useState(!1),f=()=>n.refetch();return _.jsxs(_.Fragment,{children:[r&&!t?_.jsx("div",{className:"error",children:r}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:bBn,children:[_.jsx("span",{className:"k",children:np()}),_.jsx("span",{className:"v",children:!t&&s||u?_.jsxs(Zt,{className:"gap-1.5",role:"status",children:[_.jsx(Et,{}),u?LDt():Da()]}):r?_.jsx(Zt,{variant:"warning",children:rb()}):t?t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Zt,{variant:"success",children:Xm()}):t.sshKeyStatus==="unknown"?_.jsx(Zt,{variant:"warning",children:rb()}):_.jsx(Zt,{variant:"warning",children:ay()}):_.jsx(Zt,{variant:"warning",children:tI()}):null}),_.jsx("span",{className:"k",children:SKt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),_.jsx("span",{className:"k",children:UXt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Zt,{variant:"success",children:$Vt()}):t.sshKeyStatus==="no_local_match"?_.jsx(Zt,{variant:"warning",children:bVt()}):t.sshKeyStatus==="none_registered"?_.jsx(Zt,{variant:"error",children:PGt()}):_.jsx(Zt,{children:iI()}):"—"})]}),e&&t&&!t.loggedIn&&_.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:PRt({command:Ae("orx login")})}),!e&&i>0&&_.jsx(d7n,{login:o,onComplete:()=>{d(!1),a(0),f()},onError:m=>{d(!1),sn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?_.jsxs("p",{dir:"auto",className:mo,children:[QDt()," ",_.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):_.jsxs("p",{dir:"auto",className:mo,children:[EGt()," ",_.jsx("code",{children:"ssh-keygen -t ed25519"}),ZYt()," ",_.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?_.jsx("p",{dir:"auto",className:mo,children:len({register:Ae(`orx ssh-key add ${t.sshKeyPath}`),load:Ae("ssh-add")})}):_.jsxs("p",{dir:"auto",className:mo,children:[bGt()," ",_.jsx("code",{children:"ssh-add"}),uKt()," ",_.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&_.jsx("p",{dir:"auto",className:"mt-4 mb-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:r||(t==null?void 0:t.error)})]}),_.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[_.jsxs(Me,{onClick:()=>void f(),disabled:s||u,children:[_.jsx(xo,{size:13})," ",s?Da():Qm()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&_.jsxs(Me,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),d(!0),a(m=>m+1)},children:[u?_.jsx(Et,{}):_.jsx(Xf,{size:13})," ",t.loggedIn?rnn():_I()]})]})]})}const LBn={local:dTe,ssh:WTe,tinker:tRe,hf:JAe,modal:yTe,k8s:aTe,slurm:FTe,ray:OTe,openresearch:NTe},lx={local:"local_job",tinker:"tinker_job",hf:"hf_job",modal:"modal_job",k8s:"k8s_job",ssh:"ssh_job",slurm:"slurm_job",ray:"ray_job",openresearch:"openresearch_job"},UR=["hf","modal","slurm","ray","openresearch"],A4=["hf","modal","openresearch"],uq={hf:["cpu-basic","t4-small","a10g-small","a10g-large","a100-large","h100","h200"],modal:["cpu","t4","l4","a10g","a100","a100-80gb","l40s","h100","h100:2"],slurm:["gpu","h100:1","h100:2","a100:4"],ray:["cpu","cpu:2","gpu","gpu:1","gpu:1,cpu:4","gpu:1,mem:8GiB"],openresearch:["h100_sxm","h100_sxm:2","cpu5c","cpu5g","cpu5m"]},kk=["tinker","hf","modal","ray","k8s"],IBn={tinker:IMe,hf:mMe,modal:kMe,openresearch:AMe},GR="__custom__";function g0(e,n){return!!(n&&!(uq[e]??[]).includes(n))}function $Bn({settings:e,projectId:n,onSaved:t}){const r=pn({mutationFn:J4n}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[c,u]=T.useState(i),[d,f]=T.useState(g0(s,i)),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=e.targets.find(B=>B.id===a),y=e.targets.filter(B=>B.configured||B.id===s),x=UR.includes(a),b=A4.includes(a),C=uq[a]??[],N=a===s&&(!x||c.trim()===i),z=Of[a](),A=IBn[a],j=p?usn():b&&!c.trim()?XNt({destination:z}):a==="ssh"?mOt():lOt({destination:z});T.useEffect(()=>{o(s),u(i),f(g0(s,i))},[s,i]);async function M(B,U){const H=UR.includes(B);if(!(p||A4.includes(B)&&!U.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:H&&U.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),f(g0(s,i))}finally{m(!1)}}}function D(B){const U=e.targets.find(Q=>Q.id===B);if(!U)return;o(U.id);const H=U.id===s?i:"";u(H),f(g0(U.id,H)),A4.includes(U.id)||M(U.id,H)}function L(B){if(B===GR){f(!0);return}f(!1),u(B),(!b||B)&&M(a,B)}return _.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:DBt()}),_.jsxs("div",{children:[_.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:B=>{B.preventDefault(),N||M(a,c)},children:[_.jsx(Lc,{choices:y.map(B=>({id:B.id,label:Of[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const U=e.targets.find(H=>H.id===B.id);return U?_.jsx(lp,{kind:lx[U.id],size:16}):null},onSelect:D}),x&&_.jsx("div",{children:d?_.jsxs("div",{className:"relative",children:[_.jsx("input",{className:"h-9 w-full rounded-md border border-border bg-background py-0 pe-10 ps-3 font-sans text-sm text-text outline-none focus:border-text",type:"text",value:c,onChange:B=>u(B.target.value),onBlur:()=>{if(b&&!c.trim()){a===s&&(u(i),f(g0(s,i)));return}N||M(a,c)},placeholder:tBt(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),_.jsx("button",{type:"button",className:"absolute inset-y-0 end-0 inline-flex w-9 items-center justify-center text-muted hover:text-text","aria-label":Xz(),title:Xz(),onMouseDown:B=>B.preventDefault(),onClick:()=>f(!1),children:_.jsx(qc,{size:12})})]}):_.jsx(Lc,{choices:[{id:"",label:b?qNt():AOt()},...c&&!C.includes(c)?[{id:c,label:qjt({value:Ae(c)})}]:[],...C.map(B=>({id:B,label:B})),{id:GR,label:cBt()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:L})})]}),w&&_.jsx("div",{className:"error mt-2.5",children:w}),v&&!v.configured&&_.jsx("p",{className:mo,children:fZt()})]}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:j}),A&&_.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function BBn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?jNt():e.id==="openresearch"?_I():e.id==="ray"?OS():Xtn();return _.jsxs("div",{className:`group relative flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans ${r&&e.enabled?"transition-colors duration-120 ease-standard hover:border-text hover:bg-surface":""} ${e.enabled?"":"opacity-52"}`,children:[r&&_.jsx("button",{type:"button",className:"absolute inset-0 z-10 rounded-lg focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default",onClick:r,disabled:!e.enabled,"aria-label":Of[e.id](),"aria-describedby":i,"aria-haspopup":kk.includes(e.id)?"dialog":void 0}),_.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:_.jsx(lp,{kind:lx[e.id],size:48})}),_.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:Of[e.id]()}),_.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:LBn[e.id]()}),_.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?_.jsxs(_.Fragment,{children:[e.id==="tinker"?fRt():Lrn()," ",_.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:cAt()})]}):t??e.summary}),_.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[_.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?XL():e.configured?!r||kk.includes(e.id)?Ym():Asn():a}),r&&_.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:_.jsx(Sv,{size:16})})]})]})}function PBn({target:e,isDefault:n,onBack:t,remote:r}){return _.jsxs(_.Fragment,{children:[_.jsxs("button",{type:"button",className:"settings-back mb-6 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[_.jsx(db,{size:16})," ",WL()]}),_.jsxs("div",{className:"flex items-center justify-between gap-6",children:[_.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[_.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:_.jsx(lp,{kind:lx[e.id],size:36})}),_.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:Of[e.id]()})]}),n&&_.jsx(Zt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:XL()})]}),_.jsxs("div",{className:"mt-6 font-sans text-base text-text [&_.settings-card]:mb-0 [&_.settings-form]:mt-6 [&_.settings-form]:border-t-0 [&_.settings-form]:pt-0 [&>.settings-form:first-child]:mt-0 [&>div:first-child]:border-t-0",children:[e.id==="ssh"&&_.jsx(jBn,{}),e.id==="slurm"&&_.jsx(TBn,{}),e.id==="openresearch"&&_.jsx(DBn,{remote:r})]})]})}function FBn({target:e,remote:n,onClose:t}){const r=T.useRef(null),[s,i]=T.useState({dirty:!1,saving:!1});T.useEffect(()=>{const o=r.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const a=()=>{s.saving||s.dirty&&!window.confirm(iRt())||t()};return _.jsxs("dialog",{ref:r,className:"m-auto w-140 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"compute-quick-setup-title",onKeyDown:o=>{o.key==="Escape"&&(o.preventDefault(),a())},onCancel:o=>{o.preventDefault(),a()},children:[_.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[_.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[_.jsx(lp,{kind:lx[e.id],size:32}),_.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:Of[e.id]()})]}),_.jsx(Rt,{title:J0(),"aria-label":J0(),onClick:a,disabled:s.saving,children:_.jsx(_r,{size:14})})]}),e.id==="tinker"&&_.jsx(qBn,{target:e}),e.id==="hf"&&_.jsx(GBn,{remote:n}),e.id==="modal"&&_.jsx(EBn,{}),e.id==="ray"&&_.jsx(RBn,{}),e.id==="k8s"&&_.jsx(CBn,{onEditState:i})]})}function HBn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=qI(e==null?void 0:e.id),i=dt(s),a=i.data??null,o=L=>{ts(s.queryKey,B=>(typeof L=="function"?L(B??null):L)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,d]=T.useState(null),[f,p]=T.useState(null),m=a5n(),w=dt(m),k=w.data??null,v=((D=w.error)==null?void 0:D.message)??null;T.useEffect(()=>{d(null),p(null)},[e==null?void 0:e.id]);const y=L=>{o(L),p(null)},x=a?a.targets:null,b=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=x?[...x].sort((L,B)=>+(B.id===b)-+(L.id===b)):null,N=(C==null?void 0:C.filter(L=>L.configured))??[],z=(C==null?void 0:C.filter(L=>!L.configured))??[],A=L=>_.jsx(BBn,{target:L,isDefault:b===L.id,summary:L.id==="local"?k?OBn(k):v??HBt():void 0,onOpen:L.id==="local"?void 0:()=>d(L.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${L.id}`),j=u?a==null?void 0:a.targets.find(L=>L.id===u):null;return j&&!kk.includes(j.id)?_.jsx(PBn,{target:j,isDefault:b===j.id,onBack:()=>d(null),remote:r}):_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:QL()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:y$t()}),_.jsx(cPn,{projectId:e==null?void 0:e.id,onViewHistory:n}),c?_.jsx("div",{className:"error",children:c}):a?_.jsxs(_.Fragment,{children:[f&&_.jsx("div",{className:"error",children:f}),_.jsx($Bn,{settings:a,projectId:e==null?void 0:e.id,onSaved:y}),_.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Ym()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),z.length>0&&_.jsxs("section",{className:"mb-3.5",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:qqt()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:z.map(A)})]}),j&&_.jsx(FBn,{target:j,remote:r,onClose:()=>d(null)})]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",xIt()]})]})}function qBn({target:e}){var x;const n=pn({mutationFn:b4n}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),c=fj(),u=dt(c),d=u.data??null,f=a??((x=u.error)==null?void 0:x.message)??null,p=b=>{ts(c.queryKey,C=>(typeof b=="function"?b(C??null):b)??void 0)},[m,w]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){w(!0),o(null);try{await Ze.fetchQuery({...fj(),staleTime:0})}catch(b){o(b instanceof Error?b.message:String(b))}finally{w(!1)}}}async function y(b){if(b.preventDefault(),!(!t.trim()||s||k)){i(!0),o(null);try{p(await n.mutateAsync(t.trim())),r("")}catch(C){o(C instanceof Error?C.message:String(C))}finally{i(!1)}}}return _.jsxs(_.Fragment,{children:[!d&&k?_.jsxs(Ur,{children:[_.jsx(Et,{})," ",Da()]}):d&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:np()}),_.jsx("dd",{className:"m-0",children:_.jsx(Zt,{variant:d.validationStatus==="valid"?"success":d.validationStatus==="invalid"?"error":"warning",children:d.validationStatus==="valid"?Xm():d.validationStatus==="invalid"?jrn():d.validationStatus==="billingRequired"?prn():ay()})})]}),(d==null?void 0:d.validationStatus)==="billingRequired"&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:_.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:crn()})}),(d==null?void 0:d.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:wrn()}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:y,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||d!==null&&d.validationStatus!=="missing"?ltn():TS(),_.jsx(qr,{type:"password",value:t,placeholder:(d==null?void 0:d.maskedKey)??"",onChange:b=>r(b.target.value),autoComplete:"new-password"})]}),f&&_.jsx("p",{className:"m-0 text-sm text-accent-red",children:f}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Me,{type:"button",disabled:s||k,onClick:()=>void v(),children:[_.jsx(xo,{size:13})," ",k?Da():Qm()]}),_.jsx(Me,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?dI():Qo()})]})]})]})}function UBn({settings:e}){return e.validationStatus==="missing"?_.jsx(Zt,{variant:"warning",children:ay()}):e.validationStatus==="invalid"?_.jsx(Zt,{variant:"error",children:oHt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?_.jsx(Zt,{variant:"success",children:Xm()}):e.jobsWrite===!1?_.jsxs("span",{className:"inline-flex items-center gap-2",children:[_.jsx(Zt,{variant:"warning",children:fGt()}),_.jsx(eg,{content:gTt(),className:"text-subtext",children:_.jsx(WS,{size:15})})]}):null}function GBn({remote:e}){var x;const n=pn({mutationFn:g4n}),t=_j(),r=dt(t),s=r.data??null,i=b=>{ts(t.queryKey,C=>(typeof b=="function"?b(C??null):b)??void 0)},a=s?null:((x=r.error)==null?void 0:x.message)??null,[o,c]=T.useState(""),[u,d]=T.useState(!1),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=ox();async function v(){if(!(u||f||!s&&!a)){p(!0),w(null);try{await Ze.fetchQuery({..._j(),staleTime:0})}catch(b){w(b instanceof Error?b.message:String(b))}finally{p(!1)}}}async function y(b){if(b.preventDefault(),!(!o.trim()||u||f||!s&&!a)){d(!0),w(null);try{const C=await n.mutateAsync(o.trim());i(C),w(null),c("")}catch(C){w(C instanceof Error?C.message:String(C))}finally{d(!1)}}}return _.jsxs(_.Fragment,{children:[a?_.jsx("div",{className:"error",children:a}):s?_.jsxs(_.Fragment,{children:[_.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[s.username&&_.jsxs("div",{className:"flex items-center justify-between gap-4",children:[_.jsx("dt",{className:"font-medium text-subtext",children:LS()}),_.jsx("dd",{className:"m-0 text-text",children:s.username})]}),(s.validationStatus==="missing"||s.validationStatus==="invalid"||s.validationStatus==="valid"&&s.jobsWrite!==null)&&_.jsxs("div",{className:"flex items-center justify-between gap-4",children:[_.jsx("dt",{className:"font-medium text-subtext",children:np()}),_.jsx("dd",{className:"m-0 text-text",children:_.jsx(UBn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&_.jsx("p",{className:ax,children:s.validationError}),s.source==="env"&&_.jsx("p",{className:mo,children:hFt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&_.jsx(BC,{note:uTt({login:"`hf auth login`",url:Ae("huggingface.co/settings/tokens")}),className:mo,disabled:e,onRun:k.start}),_.jsx(cx,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",tqt()]}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:y,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?mtn():kOt(),_.jsx(qr,{type:"password",value:o,onChange:b=>c(b.target.value),placeholder:(s==null?void 0:s.maskedToken)??oFt(),autoComplete:"off"})]}),m&&_.jsx("div",{className:"error",children:m}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Me,{type:"button",disabled:u||f||!s&&!a,onClick:()=>void v(),children:[_.jsx(xo,{size:13})," ",f?Da():Qm()]}),_.jsx(Me,{variant:"primary",type:"submit",disabled:!o.trim()||u||f||!s&&!a,children:u?dI():Qo()})]})]})]})}const _q=/^hf_[A-Za-z0-9]{10,}$/;function fq(){return _.jsx("tr",{children:_.jsx("td",{colSpan:3,children:_.jsxs("p",{dir:"auto",className:mo,children:[bZt()," ",_.jsx("code",{children:"HF_TOKEN"}),sXt()]})})})}const VR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function Sk(e,n){const t=n instanceof Error?n.message:String(n);sn(t.includes(e)?t:`${e}: ${t}`,"error")}function VBn({name:e,entry:n,onVars:t}){const r=pn({mutationFn:f=>MI(...f)}),s=pn({mutationFn:A4n}),[i,a]=T.useState(""),[o,c]=T.useState(!1);async function u(){if(!(!i.trim()||o)){c(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(f){Sk(e,f)}finally{c(!1)}}}async function d(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(f){Sk(e,f)}finally{c(!1)}}}return _.jsxs(_.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{className:"font-mono text-sm",children:e}),_.jsx("td",{className:"text-base text-subtext",children:n?_.jsxs(_.Fragment,{children:[n.maskedValue,n.inProcessEnv&&_.jsx(Zt,{children:YKt()})]}):_.jsx(qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&a("")},placeholder:aI(),"aria-label":Bee({name:Ae(e)}),autoComplete:"new-password",disabled:o})}),_.jsx("td",{children:n?_.jsx(Rt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:fN({name:Ae(e)}),"aria-label":fN({name:Ae(e)}),onClick:()=>void d(),disabled:o,children:_.jsx(Yf,{size:13})}):i.trim()&&_.jsx(Me,{size:"small",onClick:()=>void u(),disabled:o,children:o?Ba():Qo()})})]}),!n&&e!=="HF_TOKEN"&&_q.test(i.trim())&&_.jsx(fq,{})]})}function KBn({onVars:e,onDone:n}){const t=pn({mutationFn:f=>MI(...f)}),[r,s]=T.useState(""),[i,a]=T.useState(""),[o,c]=T.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){c(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(f){Sk(r.trim(),f)}finally{c(!1)}}}const d=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&n()};return _.jsxs(_.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{children:_.jsx(qr,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":TUt(),autoComplete:"off",spellCheck:!1,disabled:o})}),_.jsx("td",{children:_.jsx(qr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:d,placeholder:aI(),"aria-label":$Ut(),autoComplete:"new-password",disabled:o})}),_.jsxs("td",{children:[_.jsx(Me,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?Ba():Qo()}),_.jsx(Rt,{title:Nf(),"aria-label":hIt(),onClick:n,disabled:o,children:_.jsx(_r,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&_q.test(i.trim())&&_.jsx(fq,{})]})}function WBn(){var u;const e=c5n(),n=dt(e),t=n.data??null,r=d=>{ts(e.queryKey,f=>(typeof d=="function"?d(f??null):d)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(d=>d.key).filter(d=>!VR.includes(d)),c=[...VR,...o];return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[_.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:gJt()}),_.jsxs(Me,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[_.jsx(Qf,{size:12})," ",nLt()]})]}),_.jsx("div",{className:Bc,children:s?_.jsx("div",{className:"error",children:s}):t===null?_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]}):_.jsx("table",{className:"env-table w-full table-fixed border-collapse text-base [&_td:first-child]:w-[32%] [&_td:first-child]:wrap-anywhere [&_.badge]:ms-2 [&_td]:h-12 [&_td]:pt-0 [&_td]:pe-2.5 [&_td]:pb-0 [&_td]:ps-0 [&_td]:align-middle [&_td]:border-b [&_td]:border-b-border-variant [&_td:last-child]:w-29 [&_td:last-child]:whitespace-nowrap [&_td:last-child]:text-end [&_td[colspan]]:whitespace-normal [&_td[colspan]]:text-start [&_.icon-btn]:ms-2 [&_.icon-btn]:align-middle",children:_.jsxs("tbody",{children:[c.map(d=>_.jsx(VBn,{name:d,entry:t.find(f=>f.key===d),onVars:r},d)),i&&_.jsx(KBn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const v0=[{value:"system",label:trn,icon:dCn},{value:"light",label:Wnn,icon:FCn},{value:"dark",label:Dnn,icon:pCn}],QBn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function XBn(){const e=d_(),[n,t]=r$(),r=s=>{var d;const i=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!i)return;s.preventDefault();const a=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=a.findIndex(f=>f===document.activeElement),u=((o===-1?v0.findIndex(f=>f.value===n):o)+i+v0.length)%v0.length;t(v0[u].value),(d=a[u])==null||d.focus()};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:QEt()}),_.jsxs("div",{className:`${Bc} mt-3`,children:[_.jsxs("div",{className:`${Il} pb-3.5`,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:ij()}),_.jsx("div",{className:"theme-segmented inline-flex flex-none gap-0.5 p-0.5 border border-border rounded-md bg-surface",role:"radiogroup","aria-label":ij(),onKeyDown:r,children:v0.map(({value:s,label:i,icon:a})=>_.jsxs("button",{type:"button",role:"radio","aria-checked":n===s,tabIndex:n===s?0:-1,className:`theme-segment inline-flex items-center gap-1.5 py-[5px] px-2.5 rounded-sm text-subtext text-sm cursor-pointer transition-[background,color] duration-120 ease-standard [&:hover:not(.on)]:text-text [&:hover:not(.on)]:bg-highlight [&.on]:text-background [&.on]:bg-primary [&:focus-visible]:outline-2 [&:focus-visible]:outline-solid [&:focus-visible]:outline-text [&:focus-visible]:outline-offset-2 ${n===s?"on":""}`,onClick:()=>t(s),children:[_.jsx(a,{size:14}),i()]},s))})]}),_.jsxs("div",{className:Il,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:MRt()}),_.jsx("div",{className:"w-52 flex-none",children:_.jsx(Lc,{choices:QBn,value:e,variant:"field",dropDown:!0,onSelect:s=>{QD(s)&&JI(s)}})})]})]})]})}const YBn={installer:Qbn,"app-bundle":xbn,appimage:zbn,portable:lyn,cargo:Dbn,homebrew:Hbn,nix:nyn,unknown:myn},T4={cargo:kyn,homebrew:Ayn,nix:Iyn};function ZBn(){var f;const e=pn({mutationFn:p=>k4n(...p)}),{status:n,error:t,apply:r}=$6(),[s,i]=T.useState(null),[a,o]=T.useState(null),c=TB(n),u=s!==null||c.restarting;if(!n)return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:nj()}),t?_.jsx("div",{className:Bc,children:_.jsx("div",{className:"error",children:t})}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]})]});const d=async(p,m)=>{i(p),o(null);try{await m()}catch(w){o(w instanceof Error?w.message:String(w))}finally{i(null)}};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:nj()}),_.jsxs("div",{className:`${Bc} mt-3`,children:[_.jsxs("div",{className:`${Lf} pb-3.5`,children:[_.jsx("div",{className:"k",children:oI()}),_.jsx("div",{className:"v",children:n.current}),_.jsx("div",{className:"k",children:zHt()}),_.jsx("div",{className:"v",children:n.latest??"—"}),_.jsx("div",{className:"k",children:ZL()}),_.jsx("div",{className:"v",children:YBn[n.channel]()})]}),n.restartRequired&&_.jsxs("div",{className:Il,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:IQt()}),_.jsx("p",{children:c.error?wI({error:c.error}):Atn({installed:Ae(n.installedVersion??"—"),current:Ae(n.current??n.installedVersion??"—")})})]}),n.canRestart&&_.jsx(Me,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?kI():xI()})]}),n.selfUpdates?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:Il,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:Jz()}),_.jsxs("p",{children:[SUt(),n.envDisabled&&rsn()]})]}),_.jsx(GS,{type:"button",checked:n.autoUpdate,"aria-label":Jz(),disabled:u,onClick:()=>void d("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),_.jsxs("div",{className:Il,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?Xrn({version:Ae(n.latest??"—")}):pNt()}),_.jsxs("p",{children:[n.updateAvailable?ZTt():LNt(),n.updateAvailable&&n.latestTag&&_.jsxs(_.Fragment,{children:[" ",_.jsx("a",{href:AB(n.latestTag),target:"_blank",rel:"noreferrer",className:"underline",children:uI()})]})]})]}),_.jsx(Me,{size:"small",type:"button",disabled:u,onClick:()=>void d("apply",()=>x4n().then(r)),children:s==="apply"?CS():n.updateAvailable?qrn():wNt()})]})]}):_.jsx("div",{className:Il,children:_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:TKt()}),_.jsx("p",{children:((f=T4[n.channel])==null?void 0:f.call(T4))??men()})]})}),n.channel==="app-bundle"&&_.jsx(ePn,{busy:s,disabled:u,run:d}),a&&_.jsx("div",{className:"error",children:a})]})]})}function JBn(){var f;const e=pn({mutationFn:v3n}),n=m5n(),t=dt(n),r=t.data??null,s=p=>{ts(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=T.useState(!1),[o,c]=T.useState(null),u=o??((f=t.error)==null?void 0:f.message)??null,d=()=>{!r||i||(a(!0),c(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>c(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:sJt()}),r?_.jsxs("div",{className:`${Bc} mt-3`,children:[_.jsxs("div",{className:Il,children:[_.jsxs("div",{children:[_.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[Qz(),r.locked&&r.reason&&_.jsx(eg,{content:`${W$t()} ${r.reason}.`,className:"text-subtext",children:_.jsx(WS,{size:15})})]}),_.jsx("p",{children:GUt()})]}),_.jsx(GS,{type:"button",checked:r.enabled,"aria-label":Qz(),disabled:i||r.locked,onClick:d})]}),u&&_.jsx("div",{className:"error",children:u})]}):u?_.jsx("div",{className:"error",children:u}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]})]})}function ePn({busy:e,disabled:n,run:t}){const r=pn({mutationFn:S4n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(d=>{i(d),o(!1)}).catch(d=>{throw o(!u&&String((d==null?void 0:d.message)??d).includes("--force")),d}));return _.jsxs("div",{className:Il,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:$Tt({command:Ae("orx")})}),s?_.jsxs("p",{children:[s.alreadyCurrent?uzt({link:Ae(s.link)}):gzt({link:Ae(s.link)}),!s.onPath&&HEt({directory:Ae(s.dir)})]}):_.jsx("p",{children:TTt({command:Ae("orx")})})]}),_.jsx(Me,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?CS():a?ntn():s?jen():STt()})]})}function tPn({remote:e}){var w;const n=pn({mutationFn:k=>$I(...k)}),t=PS(),r=dt(t),s=r.data??null,i=k=>{ts(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[c,u]=T.useState(null),d=c??((w=r.error)==null?void 0:w.message)??null,f=async()=>{await r.refetch({cancelRefetch:!1})},p=ox(),m=()=>{if(!s||a)return;const k=!s.githubForNewProjects;o(!0),u(null),n.mutateAsync([k,!0]).then(i).catch(v=>u(v instanceof Error?v.message:String(v))).finally(()=>o(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:OPt()}),s?_.jsxs("div",{className:`${Bc} mt-3 project-defaults-card [&_.settings-card-head]:justify-between [&_.settings-card-head]:mb-0 [&_.settings-card-head]:pb-3 [&_.settings-card-head_h3]:m-0`,children:[_.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[_.jsx("h3",{children:FPt()}),_.jsx(Zt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?HL():VL()})]}),_.jsxs("div",{className:Il,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:Zz()}),_.jsx("p",{children:AJt()})]}),_.jsx(GS,{type:"button",checked:s.githubForNewProjects,"aria-label":Zz(),disabled:a||!s.githubAuthenticated&&!s.githubForNewProjects,onClick:m})]}),!s.githubAuthenticated&&_.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:_.jsx(dq,{ghInstalled:s.ghInstalled,remote:e,onCheck:f,onRun:p.start})}),_.jsx(cx,{run:p.run,onComplete:()=>void f(),onClose:p.clear}),d&&_.jsx("div",{className:"error",children:d})]}):d?_.jsx("div",{className:"error",children:d}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]})]})}function dq({ghInstalled:e,remote:n,onCheck:t,onRun:r}){const[s,i]=T.useState(!1),a=()=>{i(!0),t().finally(()=>i(!1))};return _.jsxs(_.Fragment,{children:[_.jsx(BC,{note:e?Itn():GTt(),className:"git-card-helper m-0 text-sm leading-relaxed text-text",disabled:n||!e,onRun:r}),_.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&_.jsxs($h,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[FFt()," ",_.jsx(Rf,{size:12})]}),_.jsx(Me,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?Da():Qm()})]})]})}function nPn(){var m,w,k;const e=pn({mutationFn:r4n}),n=pn({mutationFn:s4n}),t=J8n(),r=dt(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((w=r.data)==null?void 0:w.hasSession)??null,a=v=>ts(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=T.useState(!1),[d,f]=T.useState(null),p=d??((k=r.error)==null?void 0:k.message);return _.jsxs("div",{className:wk,children:[_.jsx("h3",{children:nI()}),_.jsxs("div",{className:Lf,children:[_.jsx("span",{className:"k",children:WPt()}),_.jsx("span",{className:"v",children:_.jsx(Zt,{variant:s?"success":"default",children:s===null?p?ho():Da():s?sj():W3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:IJt()}),s?_.jsx("div",{className:q0,children:_.jsx(Me,{disabled:c,onClick:()=>{u(!0),f(null),e.mutateAsync().then(v=>o(v.hasToken)).catch(v=>f(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?rj():qen()})}):_.jsx(qR,{save:TI,onSaved:v=>o(v.hasToken),placeholder:UKt(),createHref:"https://www.overleaf.com/user/settings"}),_.jsxs("div",{className:Lf,children:[_.jsx("span",{className:"k",children:_Xt()}),_.jsx("span",{className:"v",children:_.jsx(Zt,{variant:i?"success":"default",children:i===null?p?ho():Da():i?sj():W3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:vXt()}),i?_.jsx("div",{className:q0,children:_.jsx(Me,{disabled:c,onClick:()=>{u(!0),f(null),n.mutateAsync().then(v=>a({hasSession:v.hasSession})).catch(v=>f(v instanceof Error?v.message:String(v))).finally(()=>u(!1))},children:c?rj():Len()})}):_.jsx(qR,{save:v=>RI(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:q3(),createHref:"https://www.overleaf.com/project",createLabel:Abt()}),p&&_.jsx("div",{className:"error",children:p})]})}function rPn({project:e,onProjectUpdate:n,remote:t}){var M;const r=pn({mutationFn:D=>$I(...D)}),s={...p5n((e==null?void 0:e.id)??""),enabled:!!e},i=dt(s),a=ox(),o=i.data??null,c=D=>{ts(s.queryKey,L=>(typeof D=="function"?D(L??null):D)??void 0)},[u,d]=T.useState(!1),[f,p]=T.useState(null),m=f??((M=i.error)==null?void 0:M.message)??null,[w,k]=T.useState(!1),[v,y]=T.useState(!1),[x,b]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},z=D=>{const L=D instanceof Error?D.message:String(D);return L.toLowerCase().includes("archived")?jAt():L.includes("(fetch first)")||L.includes("non-fast-forward")?LAt():L.includes("403")||L.toLowerCase().includes("permission denied")?qAt():L},A=()=>{e&&(d(!0),p(null),p3n(e.id).then(D=>{c(D.git),n(D.project),Ze.fetchQuery(PS()).then(L=>{!L.githubForNewProjects&&!L.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(z(D))).finally(()=>d(!1)))},j=D=>{y(!0),b(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(L=>b(L instanceof Error?L.message:String(L))).finally(()=>y(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("h1",{children:AQt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:ktn({project:(e==null?void 0:e.name)??Ljt()})}),e?m&&!o?_.jsx("div",{className:"error",children:m}):o?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:wk,children:[_.jsx("h3",{children:pqt()}),_.jsxs("div",{className:Lf,children:[_.jsx("span",{className:"k",children:_Wt()}),_.jsx("span",{className:"v",children:o.path}),_.jsx("span",{className:"k",children:"Git"}),_.jsx("span",{className:"v",children:o.gitVersion??jL()}),_.jsx("span",{className:"k",children:sYt()}),_.jsx("span",{className:"v",children:o.initialized?wAt({branch:Ae(o.currentBranch??DS()),state:o.clean?rzt():rTt()}):lDt()}),_.jsx("span",{className:"k",children:WLt()}),_.jsx("span",{className:"v",children:o.baselineBranch}),_.jsx("span",{className:"k",children:kQt()}),_.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):GL()})]}),!o.initialized&&_.jsx("div",{className:q0,children:_.jsx(Me,{variant:"primary",onClick:()=>void h3n(e.id).then(c).catch(D=>p(String(D))),children:xFt()})})]}),_.jsxs("div",{className:wk,children:[_.jsx("h3",{children:"GitHub"}),_.jsxs("div",{className:Lf,children:[_.jsx("span",{className:"k",children:KL()}),_.jsx("span",{className:"v",children:_.jsx(Zt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?HL():VL()})}),_.jsx("span",{className:"k",children:CWt()}),_.jsx("span",{className:"v",children:C?_.jsxs(_.Fragment,{children:[_.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&_.jsx(Zt,{children:TYt()})]}):_.jsx(Zt,{children:cqt()})}),o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:SYt()}),_.jsx("span",{className:"v",children:o.github.syncStatus})]})]}),!o.github.authenticated&&_.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:_.jsx(dq,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),_.jsx(cx,{run:a.run,onComplete:()=>void N(),onClose:a.clear}),o.github.authenticated&&!o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:C?gsn():jjt()}),_.jsxs("div",{className:q0,children:[C&&o.github.url&&_.jsxs($h,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[tj()," ",_.jsx(Rf,{size:12})]}),_.jsx(Me,{variant:"primary",disabled:u,onClick:A,children:u?z8t():x8t()})]})]}),o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:nPt()}),_.jsxs("div",{className:q0,children:[o.github.url&&_.jsxs($h,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[tj()," ",_.jsx(Rf,{size:12})]}),_.jsx(Me,{disabled:u,onClick:()=>{d(!0),m3n(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>d(!1))},children:u?D8t():h8t()})]})]})]}),_.jsx(nPn,{}),m&&_.jsx("div",{className:"error",children:z(m)})]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]}):_.jsx("div",{className:Bc,children:_.jsx("p",{className:mo,children:GVt()})}),w&&_.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop-light flex items-start justify-center pt-[var(--modal-top)] px-4 pb-6 overflow-y-auto z-100",onClick:()=>j(!1),children:_.jsxs("div",{className:"modal max-w-[94vw] max-h-[calc(100vh_-_var(--modal-top)_-_48px)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl github-default-modal w-110 [&_>_p]:m-0 [&_>_p]:text-sm [&_>_p]:leading-relaxed [&_>_p]:text-text [&_>_.error]:mt-3.5",role:"dialog","aria-modal":"true","aria-labelledby":"github-default-title",onClick:D=>D.stopPropagation(),children:[_.jsx("h2",{id:"github-default-title",children:jqt()}),_.jsx("p",{children:iZt()}),x&&_.jsx("div",{className:"error",children:x}),_.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[_.jsx(Me,{disabled:v,onClick:()=>j(!1),children:fVt()}),_.jsx(Me,{variant:"primary",disabled:v,onClick:()=>j(!0),children:v?Ba():KRt()})]})]})})]})}const sPn={env:$hn,config:Ghn,xdg:Zhn,default:Thn},R4={preparing:ghn,copying:jdn,verifying:ipn,finalizing:Ldn},iPn=e=>{var n;return((n=R4[e])==null?void 0:n.call(R4))??e};function aPn(){var b;const e=l5n(),n=dt(e),t=n.data??null,r=t?null:((b=n.error)==null?void 0:b.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,u]=T.useState(null),[d,f]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>VI(C=>{C.type==="progress"?f(N=>{const z=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||z}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const w=(t==null?void 0:t.source)==="env",k=s.trim(),v=t!==null&&k===t.current;async function y(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await R4n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function x(C){if(C.preventDefault(),!(d.kind==="moving"||!k||v)&&(m(null),!!window.confirm(Xdn({path:Ae(k)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await M4n(k)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:gYt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:wnn()}),r?_.jsx("div",{className:Bc,children:_.jsx("div",{className:"error",children:r})}):t?_.jsxs("div",{className:Bc,children:[_.jsx("div",{className:"settings-card-head mb-3",children:_.jsx("h3",{children:pBt()})}),_.jsxs("div",{className:Lf,children:[_.jsx("span",{className:"k",children:F$t()}),_.jsx("span",{className:"v",children:t.current}),_.jsx("span",{className:"k",children:sI()}),_.jsx("span",{className:"v",children:sPn[t.source]()})]}),!w&&_.jsxs("form",{className:$C,onSubmit:x,children:[_.jsxs("label",{children:[gUt(),_.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{i(C.target.value),u(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:d.kind==="moving"})]}),c&&!c.error&&c.ok&&_.jsxs("p",{className:mo,children:[sQt()," ",Dl(c.treeBytes??0),c.freeBytes!=null&&` — ${qdn({size:Ae(Dl(c.freeBytes))})}`,c.sameFilesystem?Shn():"","."]}),c&&c.ok===!1&&c.error&&_.jsx("div",{className:"error",children:c.error}),p&&_.jsx("div",{className:"error",children:p}),d.kind==="moving"&&_.jsx(iq,{value:d.copied,max:d.total,label:iPn(d.phase),caption:d.total>0?_.jsxs("span",{className:"text-sm",children:[Dl(d.copied)," / ",Dl(d.total)]}):void 0}),d.kind==="done"&&_.jsxs("p",{className:mo,children:[rUt(),d.oldPathLeft&&_.jsxs(_.Fragment,{children:[" ",jDt({path:Ae(d.oldPathLeft)})]})]}),d.kind==="error"&&_.jsxs("div",{className:"error",children:[Xqt()," ",d.message]}),_.jsxs("div",{className:"actions",children:[_.jsx(Me,{type:"button",onClick:y,disabled:a||!k||v||d.kind==="moving",children:a?Da():nNt()}),_.jsx(Me,{variant:"primary",type:"submit",disabled:!k||v||d.kind==="moving",children:d.kind==="moving"?uhn():rhn()})]})]})]}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]})]})}const Ck=e=>e==="running"||e==="starting";function oPn(e){return Ck(e.status)?em(Date.now()-e.createdAt):e.endedAt?em(e.endedAt-e.createdAt):"—"}function hq({instances:e,emptyLabel:n}){return e.length===0?_.jsx("p",{className:"instances-empty m-0 rounded-lg border border-border bg-background py-3.5 px-4 text-base text-subtext",children:n}):_.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:_.jsxs("table",{className:"runs-table w-full border-collapse bg-background text-base [&_th]:text-start [&_th]:text-text [&_th]:text-sm [&_th]:font-medium [&_th]:py-2 [&_th]:px-3 [&_th]:border-b [&_th]:border-b-border [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-1 [&_td]:py-2 [&_td]:px-3 [&_td]:border-b [&_td]:border-b-divider-faint [&_td]:whitespace-nowrap [&_tr:last-child_td]:border-b-0 [&_tr.clickable]:cursor-pointer [&_tr.clickable:hover_td]:bg-canvas",children:[_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{children:FLt()}),_.jsx("th",{children:np()}),_.jsx("th",{children:YXt()}),_.jsx("th",{children:YQt()})]})}),_.jsx("tbody",{children:e.map(t=>{var s;const r=typeof((s=t.backend)==null?void 0:s.url)=="string"?t.backend.url:void 0;return _.jsxs("tr",{children:[_.jsx("td",{children:_.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[_.jsx(eC,{backend:t.backend}),r&&_.jsx(rp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:ej(),"aria-label":ej(),onClick:i=>i.stopPropagation(),children:_.jsx(Rf,{size:12})})]})}),_.jsx("td",{children:_.jsx(Pl,{status:Aa(t)})}),_.jsx("td",{children:Dc(t.createdAt)}),_.jsx("td",{children:oPn(t)})]},t.id)})})]})})}function cPn({projectId:e,onViewHistory:n}){var f;const t=dt({...Qu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(f=t.error)==null?void 0:f.message,i=t.isFetching,[,a]=T.useState(0);T.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},c=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>Ck(p.status)).sort(c),d=r==null?void 0:r.filter(p=>!Ck(p.status)).sort(c);return _.jsxs("section",{className:"compute-activity [&_.count-badge]:inline-flex [&_.count-badge]:items-center [&_.count-badge]:justify-center [&_.count-badge]:min-w-4.5 [&_.count-badge]:h-4.5 [&_.count-badge]:py-0 [&_.count-badge]:px-[5px] [&_.count-badge]:rounded-md [&_.count-badge]:bg-canvas [&_.count-badge]:border [&_.count-badge]:border-border [&_.count-badge]:text-xs [&_.count-badge]:font-medium [&_.count-badge]:text-text mt-5.5 mx-0 mb-8",children:[_.jsxs("div",{className:"compute-activity-head flex items-start justify-between gap-5 mb-3.5 [&_h2]:flex [&_h2]:items-center [&_h2]:gap-2 [&_h2]:m-0 [&_h2]:text-lg [@media((max-width:_640px))]:items-stretch [@media((max-width:_640px))]:flex-col",children:[_.jsx("div",{children:_.jsxs("h2",{children:[UQt(),u&&u.length>0&&_.jsx("span",{className:"count-badge",children:u.length})]})}),_.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[_.jsxs(Me,{size:"small",onClick:o,disabled:i,children:[_.jsx(xo,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Zm()]}),_.jsx(Me,{size:"small",onClick:n,children:d!=null&&d.length?dJe({count:_n(d.length)}):aJe()})]})]}),s&&_.jsx("div",{className:"error",children:s}),!u||!d?_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]}):_.jsx(hq,{instances:u,emptyLabel:e?BZe():JZe()})]})}function lPn({projectId:e,onBack:n}){var c;const t=dt({...Qu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(c=t.error)==null?void 0:c.message,i=t.isFetching,[,a]=T.useState(0);T.useEffect(()=>{const u=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return _.jsxs(_.Fragment,{children:[_.jsxs("button",{type:"button",className:"settings-back inline-flex items-center gap-1.5 mt-0 mx-0 mb-4.5 text-subtext text-sm font-medium [&:hover]:text-text",onClick:n,children:[_.jsx(db,{size:14})," ",WL()]}),_.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[_.jsx("h1",{children:eHt()}),_.jsxs(Me,{size:"small",onClick:o,disabled:i,children:[_.jsx(xo,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Zm()]})]}),s&&_.jsx("div",{className:"error",children:s}),r?_.jsx(hq,{instances:[...r].sort((u,d)=>d.createdAt-u.createdAt),emptyLabel:e?RZe():VZe()}):_.jsxs(Ur,{children:[_.jsx(Et,{})," ",__()]})]})}const pq=["projects","harnesses","storage"],uPn=[{id:"compute",label:QL,icon:_.jsx(KS,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:YL,icon:_.jsx(Xf,{size:15}),activeTabs:["environment"]},{id:"settings",label:$S,icon:_.jsx(hy,{size:15}),activeTabs:["settings",...pq]}];function _Pn(e){return pq.includes(e)}function fPn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||_Pn(e),a=T.useRef(null);return T.useLayoutEffect(()=>{const o=a.current,c=o==null?void 0:o.parentElement;if(!o||!c)return;const u=()=>o.scrollIntoView({block:"start"}),d=new ResizeObserver(u);d.observe(c),u();const f=()=>d.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,f,{passive:!0});return()=>{f();for(const m of p)window.removeEventListener(m,f)}},[e,n==null?void 0:n.id]),_.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[i&&_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:$S()}),_.jsxs("div",{className:"settings-stack mt-4.5",children:[_.jsx("section",{className:Hd,children:_.jsx(XBn,{})}),_.jsx("section",{ref:e==="projects"?a:void 0,className:Hd,children:_.jsx(tPn,{remote:s})}),_.jsx("section",{ref:e==="harnesses"?a:void 0,className:Hd,children:_.jsx(kBn,{remote:s})}),!s&&_.jsx("section",{ref:e==="storage"?a:void 0,className:Hd,children:_.jsx(aPn,{})}),_.jsx("section",{className:Hd,children:_.jsx(JBn,{})}),!s&&_.jsx("section",{className:Hd,children:_.jsx(ZBn,{})})]})]}),e==="compute"&&_.jsx(HBn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&_.jsx(lPn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:YL()}),_.jsx(WBn,{})]}),e==="git"&&_.jsx(rPn,{project:n,onProjectUpdate:t,remote:s})]})}function vm(e){const n=e.split("@")[0].replace(/[~^]$/,"");return n.charAt(0).toUpperCase()+n.slice(1).replaceAll("-"," ")}function PC(e){return e.replace(/@personal$|\^$/,"@u").replace(/@project$|~$/,"@p")}function Ek(e){return`${e.plugin?`${vm(e.plugin)}: `:""}${vm(e.name)}`}const mq=["plan","goal","new","resume","model","compact","copy","export","side"],dPn={plan:()=>X2t(),goal:()=>BWe(),new:()=>bit(),resume:()=>H8t(),model:()=>hnt(),compact:()=>VAe(),copy:()=>vOe(),export:()=>MBe(),side:()=>kin()};function hPn(e){return{name:e,get description(){return dPn[e]()},source:"command"}}function ux(e){return mq.some(n=>n===e)}const Db={clear:"new",summarize:"compact"};function Nk(e){const n=e.toLowerCase();return ux(n)?n:Object.hasOwn(Db,n)?Db[n]:null}function gq(e){return Object.keys(Db).filter(n=>Db[n]===e)}function pPn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&ux(e.name)&&gq(e.name).some(t=>t.startsWith(n))}function M4(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r=r?d:s}${a.slice(d.length)}`:s+a}const o=((u=/^[ \t]+/.exec(a))==null?void 0:u[0].length)??0;return{text:`${i}/${t}${a}`,cursor:i.length+t.length+1+o}}function KR(e,n){let t=e.slice(0,n.start),r=e.slice(n.end);return t?r?/\s$/.test(t)&&/^\s/.test(r)&&(r=r.slice(1)):t=t.replace(/\s$/,""):r=r.replace(/^\s/,""),{text:t+r,cursor:t.length}}function vq(e){return mq.filter(n=>n!=="plan"||e)}function vPn(e,n){const t=e.filter(r=>!Nk(r.name));for(const r of vq(n))t.push(hPn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||Ek(r).localeCompare(Ek(s),void 0,{sensitivity:"base"}))}function O4(e){return e==="plan"||e==="goal"||e==="side"}function bPn(e,n){for(const t of vq(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...gq(t)].join("|");if(t==="plan"){const s=new RegExp(`(^|\\s)\\/(?:${r})(?=\\s|$)`,"gi");if(s.test(e))return{name:t,prompt:e.replace(s,"").trim()}}else if(t==="goal"||t==="side"){const s=new RegExp(`^\\/(?:${r})(?=\\s|$)`,"i");if(s.test(e.trim()))return{name:t,prompt:e.trim().replace(s,"").trim()}}else if(new RegExp(`^\\/(?:${r})$`,"i").test(e.trim()))return{name:t,prompt:""}}return null}function D4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const yPn=["font-family","font-size","font-weight","font-style","font-variant","line-height","letter-spacing","word-spacing","text-transform","direction","unicode-bidi","tab-size","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"];let xPn=null;function WR(e,n){const t=xPn??(xPn=document.createElement("canvas").getContext("2d"));if(!t||!n)return 6;const r=getComputedStyle(n);t.font=`${r.fontStyle} ${r.fontWeight} ${r.fontSize} ${r.fontFamily}`;const s=20+t.measureText(vm(e)).width-t.measureText(`/${e}`).width;return Math.max(1,Math.ceil((s+6)/t.measureText(" ").width))}const wPn={plan:eCn,goal:A$,new:$Cn,resume:V6n,model:KS,compact:z6n,copy:Wf,export:tg,side:nm};function bq({name:e,className:n}){const t=ux(e)?wPn[e]:YCn;return _.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function yq({name:e}){return _.jsxs(_.Fragment,{children:[_.jsx(bq,{name:e,className:"me-1 inline-block align-middle"}),vm(e)]})}function xq(e,n,t,r,s,i=!1){let a=0;return mPn(e,n).map((o,c,u)=>{var m,w;const d=a+o.text.length;a=d;const f=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,f,d,c);let p=o.text;return i||((m=u[c-1])!=null&&m.command&&(p=p.replace(/^[ \t]+/," ")),(w=u[c+1])!=null&&w.command&&(p=p.replace(/[ \t]+$/," "))),o.command?_.jsx("span",{className:t,onMouseDown:void 0,children:_.jsx(yq,{name:f})},c):i?_.jsx("span",{"aria-hidden":"true",children:o.text},c):_.jsx(T.Fragment,{children:p},c)})}function kPn({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=T.useRef(null),o=T.useRef(null),c=T.useRef(null),u=T.useId(),[d,f]=T.useState(!1),p=dt({...v5n(n,s,r.harness),enabled:d,subscribed:d}),m=p.data??null,w=p.isFetching,[k,v]=T.useState({}),y=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},x=()=>{const N=a.current;if(!N)return;const z=N.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),j=Math.max(16,Math.min(z.left-4,window.innerWidth-A-16));v(z.top>300?{bottom:window.innerHeight-z.top+12,left:j,width:A}:{left:j,top:z.bottom+12,width:A})},b=()=>{y(),x(),f(!0)},C=()=>{y(),c.current=window.setTimeout(()=>f(!1),120)};return T.useEffect(()=>()=>y(),[]),T.useEffect(()=>{if(!d)return;const N=()=>x();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[d]),_.jsxs(T.Fragment,{children:[_.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":d,"aria-label":SJ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 inline-grid align-baseline cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:b,onMouseLeave:C,onFocus:b,onBlur:C,onKeyDown:N=>{var z,A;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),b();return}d&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(z=o.current)==null||z.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),d&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(A=o.current)==null||A.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var z,A;N.preventDefault(),(z=i.current)==null||z.focus(),(A=i.current)==null||A.setSelectionRange(t,t),y()},children:[_.jsx("span",{className:"invisible col-start-1 row-start-1","aria-hidden":"true",children:e}),_.jsx("span",{className:"relative z-1 col-start-1 row-start-1 w-0 whitespace-nowrap",children:_.jsxs("span",{className:"relative inline-block",children:[_.jsx("span",{className:"pointer-events-none absolute -inset-[7px] rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),_.jsx("span",{className:"relative text-skill-blue",children:_.jsx(yq,{name:n})})]})})]}),d&&ni.createPortal(_.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":Ree({name:n}),style:{...k,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:y,onMouseLeave:C,onFocus:y,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[_.jsxs("div",{className:"sticky top-0 z-1 flex items-center gap-2 border-b border-border-variant bg-background px-4 py-3",children:[_.jsx("span",{className:"text-sm font-medium text-muted",children:vm(n)}),_.jsx(Zt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:Van()})]}),_.jsx("div",{className:"p-4 text-sm text-text",children:w&&m===null?_.jsx("span",{className:"text-muted",children:Jan()}):_.jsx($c,{text:m??r.description})})]}),document.body)]})}function SPn({text:e,isCommand:n}){return _.jsx(_.Fragment,{children:xq(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function CPn({text:e,editingTokenEnd:n,isCommand:t,skills:r,projectId:s,textareaRef:i}){const a=T.useRef(null);return T.useLayoutEffect(()=>{const o=i.current,c=a.current;if(!o||!c)return;const u=()=>{const f=getComputedStyle(o);for(const p of yPn)c.style.setProperty(p,f.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)}px`};u();const d=new ResizeObserver(u);return d.observe(o),()=>d.disconnect()},[e,i]),T.useLayoutEffect(()=>{const o=i.current;if(!o)return;const c=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return c(),o.addEventListener("scroll",c),()=>o.removeEventListener("scroll",c)},[i,e]),_.jsxs("div",{ref:a,className:"composer-chips pointer-events-none absolute inset-y-0 start-0 z-2 box-border overflow-hidden whitespace-pre-wrap break-words border-solid border-transparent text-transparent select-none",children:[xq(e,t,"",void 0,(o,c,u,d)=>{if(u===n)return _.jsx("span",{"aria-hidden":"true",children:o},`${d}:${u}`);const f=r.find(p=>p.name===PC(c));return f&&f.source!=="command"?_.jsx(kPn,{label:o,name:c,end:u,skill:f,projectId:s,textareaRef:i},`${d}:${u}`):_.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[_.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${d}:${u}`)},!0),"​"]})}function EPn({skills:e,activeIndex:n,onPick:t,onHover:r}){const s=T.useRef(null);return T.useLayoutEffect(()=>{var i;(i=s.current)==null||i.scrollIntoView({block:"nearest"})},[n,e]),_.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 w-full max-h-[min(18rem,40vh)] overflow-y-auto overscroll-contain p-1.5 bg-background border border-border-variant rounded-2xl shadow-control-subtle z-50",children:e.map((i,a)=>_.jsxs("button",{ref:a===n?s:void 0,type:"button",className:`skill-item flex items-center gap-2 w-full text-start py-1 px-2 rounded-full text-sm font-normal text-text/80 [&.active]:bg-hover-muted [&.active]:text-text ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(i)},onMouseEnter:()=>r(a),children:[_.jsx(bq,{name:i.name,className:"shrink-0"}),_.jsx("span",{className:"skill-name shrink-0",children:Ek(i)}),_.jsx("span",{className:"skill-desc min-w-0 truncate text-muted",children:i.description}),i.source==="user"&&_.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:aon()}),i.source==="project"&&_.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:ZXe()})]},i.name))})}function NPn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const zk=6.5,QR=2*Math.PI*zk;function zPn({usage:e}){return!e||e.usedTokens<=0?null:_.jsx(jPn,{usage:e})}function jPn({usage:e}){const{open:n,setOpen:t,ref:r}=ra(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":NPn(a),c=a===null?"":new Intl.NumberFormat(E(),{style:"percent"}).format(a/100);return _.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[_.jsx("button",{type:"button",className:`${a===null?"inline-flex h-8 items-center rounded-md px-1 transition-[background,color] duration-150 ease-standard hover:bg-surface":"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text transition-[background,color] duration-150 ease-standard hover:bg-surface"} composer-bare context-ring text-sm text-text`,title:YMe(),onClick:()=>t(u=>!u),children:a===null?N1(s):_.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[_.jsx("circle",{cx:"8",cy:"8",r:zk,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),_.jsx("circle",{cx:"8",cy:"8",r:zk,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${QR*Math.max(a,2)/100} ${QR}`,transform:"rotate(-90 8 8)"})]})}),n&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 align-right context-meter-menu w-70 pt-2.5 px-3 pb-3 [&_.progress]:mt-2 [&_.progress]:mx-0 [&_.progress]:mb-0 [&_.progress-track]:h-[5px] [&_.progress-track]:border-0 [&_.progress-track]:bg-border",children:[_.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[_.jsx("span",{children:UMe()}),_.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?sOe({value:Ae(N1(s))}):_Oe({used:Ae(N1(s)),total:Ae(N1(i)),percent:Ae(c)})})]}),a!==null&&_.jsx(iq,{value:s,max:i,fillColor:o})]})]})}function APn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),_.jsxs("div",{role:"group","aria-label":Gz(),children:[_.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:Gz()}),r.slice(n)]},"from-terminal")]}function TPn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=T.useRef(null),i=T.useRef(null),{data:a,isPending:o,error:c}=dt(L5n()),{data:u=[]}=dt(Af()),{data:d=[]}=dt(KI()),[f,p]=T.useState(""),[m,w]=T.useState(0);sp(s,n);const k=T.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=T.useMemo(()=>{const N=f.trim().toLowerCase(),z=M=>!N||M.toLowerCase().includes(N),A=(a??[]).filter(M=>M.id!==e).filter(M=>z(`${M.title??""} ${k.get(M.projectId)??""} ${Iu[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),j=d.filter(M=>z(`${M.title??""} ${M.cwd??""} ${Iu[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...A,...j]},[a,d,f,e,k]),y=T.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),x=Math.min(m,Math.max(0,v.length-1));T.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[x,v]);const b=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return ni.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-start justify-center bg-modal-backdrop p-5 pt-[var(--modal-top)]",onClick:N=>{N.target===N.currentTarget&&n()},children:_.jsxs("div",{ref:s,className:"flex max-h-[calc(100vh_-_var(--modal-top)_-_1.25rem)] w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-label":Kz(),tabIndex:-1,children:[_.jsx("div",{className:"border-b border-border p-3",children:_.jsx(qr,{"data-initial-focus":!0,value:f,placeholder:Vz(),"aria-label":Vz(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[x]?`resume-option-${v[x].key}`:void 0,onChange:N=>{p(N.target.value),w(0)},onKeyDown:N=>{if(!N.nativeEvent.isComposing)if(N.key==="ArrowDown"||N.key==="ArrowUp"){if(N.preventDefault(),v.length===0)return;const z=N.key==="ArrowDown"?1:-1;w((x+z+v.length)%v.length)}else N.key==="Enter"&&v[x]&&(N.preventDefault(),C(v[x]))}})}),_.jsx("div",{id:"resume-options",className:"min-h-0 flex-1 overflow-y-auto p-1.5",role:v.length>0?"listbox":void 0,"aria-label":v.length>0?Kz():void 0,children:o?_.jsxs(Ur,{className:"px-2.5 py-2",role:"status",children:[_.jsx(Et,{})," ",NS()]}):c&&!a?_.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:ES({error:Ae(c instanceof Error?c.message:String(c))})}):v.length===0?_.jsx("div",{className:"px-2.5 py-2 text-sm text-muted",role:"status",children:Q8t()}):APn(v,y,(N,z)=>{var D;const A=N.kind==="native"?N.chat:null,j=N.kind==="session"?N.session:null;return _.jsxs(un,{id:`resume-option-${N.key}`,ref:z===x?i:void 0,type:"button",role:"option","aria-selected":z===x,active:z===x,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>w(z),onClick:()=>C(N),children:[_.jsx(Ph,{harness:(A==null?void 0:A.harness)??(j==null?void 0:j.harness)??"claude-code"}),_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(A==null?void 0:A.title)??(j==null?void 0:j.title))==null?void 0:D.trim())||xv()}),_.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(A==null?void 0:A.cwd)??void 0,children:A?b(A.cwd):k.get((j==null?void 0:j.projectId)??"")??""}),_.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:Dc((A==null?void 0:A.updatedAt)??(j==null?void 0:j.updatedAt)??0)})]},N.key)})})]})}),document.body)}const Lb="!";function XR(e){return e.startsWith(Lb)?e.slice(Lb.length).trim():null}function RPn(e){return e.startsWith(Lb)?e.slice(Lb.length):e}function MPn(e){return e.replace(/([\\`*_[\]<>$~])/g,"\\$1").replace(/(^|\n)(\s*)(#{1,6}|>|[-+]|\d+\.)\s/g,"$1$2\\$3 ").replace(/(^|\n)(\s*)(=+|-{1,2})(?=\s*(?:\n|$))/g,"$1$2\\$3").replace(/(^|\n)(\s*)(-{3,})(?=\s*(?:\n|$))/g,"$1$2\\$3")}function OPn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),t="`".repeat(n+1),r=/^[\s`]|[\s`]$/.test(e)?` ${e} `:e;return`${t}${r}${t}`}function DPn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` ${t} ${e.replace(/^\n|\n$/g,"")} @@ -1081,22 +1081,22 @@ ${t} ${e} \\] -`:`\\(${e}\\)`}function dPn(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function LPn(e,n){const t=n.trim().split(` `),r=" ".repeat(e.length+1);return[`${e} ${t[0]??""}`,...t.slice(1).map(s=>s?`${r}${s}`:"")].join(` -`)}function hPn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,c)=>a[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),i=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...i.map(r)].join(` -`)}function pPn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function mPn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function gPn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const wq="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",FC="tool-output py-1.5 px-2.5 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere max-h-65 overflow-y-auto bg-background border border-border-variant rounded-sm",u_=256,kq=1024,Sq=2e4,L4=8,vPn="chat-annotations",bPn="side-chat-annotations";function tf(e){return e instanceof Element?e:e.parentElement}function YR(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function I4(e,n){return YR(e).compareBoundaryPoints(Range.START_TO_START,YR(n))<0}function ZR(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const yPn=new Set(["A","B","CODE","EM","I","STRONG"]);function xPn(e,n){var s,i;const t=tf(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=tf(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(yPn.has(a.tagName)){const o=a.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}a=a.parentElement}}const r=(s=tf(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const a=(i=r.querySelector("code"))==null?void 0:i.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&a instanceof HTMLElement&&(a.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(a),n.replaceChildren(o))}}function wPn(e){e.querySelectorAll("button").forEach(n=>{n.replaceWith(document.createTextNode(n.textContent??""))}),e.querySelectorAll("script, style, iframe, object, embed, input, textarea, select").forEach(n=>n.remove()),e.querySelectorAll("*").forEach(n=>{for(const t of Array.from(n.attributes))(t.name.toLowerCase().startsWith("on")||t.name==="contenteditable"||t.name==="tabindex")&&n.removeAttribute(t.name)})}function kPn(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const i=Array.from(n.querySelectorAll(".katex")).filter(a=>e.intersectsNode(a));for(const a of i){const o=a.closest(".katex-display")??a,c=document.createRange();c.selectNode(o);const u={container:c.startContainer,offset:c.startOffset},d={container:c.endContainer,offset:c.endOffset};if(I4(s,u)&&t.append(ZR(s,u)),t.append(o.cloneNode(!0)),s=d,!I4(s,r))break}return i.length===0?t.append(e.cloneContents()):I4(s,r)&&t.append(ZR(s,r)),xPn(e,t),wPn(t),t}function SPn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>vm(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function IPn(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,c)=>a[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),i=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...i.map(r)].join(` +`)}function $Pn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function BPn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function PPn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const wq="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",FC="tool-output py-1.5 px-2.5 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere max-h-65 overflow-y-auto bg-background border border-border-variant rounded-sm",u_=256,kq=1024,Sq=2e4,L4=8,FPn="chat-annotations",HPn="side-chat-annotations";function tf(e){return e instanceof Element?e:e.parentElement}function YR(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function I4(e,n){return YR(e).compareBoundaryPoints(Range.START_TO_START,YR(n))<0}function ZR(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const qPn=new Set(["A","B","CODE","EM","I","STRONG"]);function UPn(e,n){var s,i;const t=tf(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=tf(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(qPn.has(a.tagName)){const o=a.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}a=a.parentElement}}const r=(s=tf(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const a=(i=r.querySelector("code"))==null?void 0:i.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&a instanceof HTMLElement&&(a.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(a),n.replaceChildren(o))}}function GPn(e){e.querySelectorAll("button").forEach(n=>{n.replaceWith(document.createTextNode(n.textContent??""))}),e.querySelectorAll("script, style, iframe, object, embed, input, textarea, select").forEach(n=>n.remove()),e.querySelectorAll("*").forEach(n=>{for(const t of Array.from(n.attributes))(t.name.toLowerCase().startsWith("on")||t.name==="contenteditable"||t.name==="tabindex")&&n.removeAttribute(t.name)})}function VPn(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const i=Array.from(n.querySelectorAll(".katex")).filter(a=>e.intersectsNode(a));for(const a of i){const o=a.closest(".katex-display")??a,c=document.createRange();c.selectNode(o);const u={container:c.startContainer,offset:c.startOffset},d={container:c.endContainer,offset:c.endOffset};if(I4(s,u)&&t.append(ZR(s,u)),t.append(o.cloneNode(!0)),s=d,!I4(s,r))break}return i.length===0?t.append(e.cloneContents()):I4(s,r)&&t.append(ZR(s,r)),UPn(e,t),GPn(t),t}function KPn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>bm(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${hPn(n,!!e.querySelector("tr:first-child th"))} +${IPn(n,!!e.querySelector("tr:first-child th"))} -`:""}function Cq(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const i=[];for(const a of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=a.getAttribute("value"),c=o===null?s:Number(o),u=Number.isFinite(c)?c:s;s=u+1;const d=Array.from(a.childNodes).map(_=>_ instanceof HTMLElement&&_.matches("UL, OL")?` -${Cq(_).trim()} -`:vm(_)).join("").trim();i.push(dPn(n?`${u}.`:"-",d))}return` +`:""}function Cq(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const i=[];for(const a of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=a.getAttribute("value"),c=o===null?s:Number(o),u=Number.isFinite(c)?c:s;s=u+1;const d=Array.from(a.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` +${Cq(f).trim()} +`:bm(f)).join("").trim();i.push(LPn(n?`${u}.`:"-",d))}return` ${i.join(` `)} -`}function vm(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return uPn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(vm).join("");if(e.matches(".katex-display")){const c=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return c?jk(c,!0):""}if(e.matches(".katex")){const c=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return c?jk(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return SPn(e);if(e.matches("UL, OL"))return Cq(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return _Pn(e.textContent??"");if(e.tagName==="PRE")return fPn(e.textContent??"");const n=Array.from(e.childNodes).map(vm).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const c=e.getAttribute("href");return c?`[${n}](${c})`:n}if(e.tagName==="LI")return`${n.trim()} +`}function bm(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return MPn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(bm).join("");if(e.matches(".katex-display")){const c=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return c?jk(c,!0):""}if(e.matches(".katex")){const c=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return c?jk(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return KPn(e);if(e.matches("UL, OL"))return Cq(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return OPn(e.textContent??"");if(e.tagName==="PRE")return DPn(e.textContent??"");const n=Array.from(e.childNodes).map(bm).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const c=e.getAttribute("href");return c?`[${n}](${c})`:n}if(e.tagName==="LI")return`${n.trim()} `;if(e.matches("TH, TD"))return`${n.trim()} | `;if(e.tagName==="TR")return`${n.replace(/ \| $/,"")} `;if(e.tagName==="BLOCKQUOTE")return` @@ -1104,7 +1104,7 @@ ${n.trim().split(` `).map(c=>`> ${c}`).join(` `)} -`;const t=pPn(e.tagName,n);return t?` +`;const t=$Pn(e.tagName,n);return t?` ${t} @@ -1112,37 +1112,37 @@ ${t} ${n.trim()} -`:n}function CPn(e,n){return vm(e).replace(/\r\n?/g,` +`:n}function WPn(e,n){return bm(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function JR(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function EPn(e,n){var s,i,a,o;if(!mPn(e))return;const t=JR(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const d=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=c.querySelector(".katex-html"))==null?void 0:i.textContent,c.textContent].filter(w=>!!w).map(JR).find(w=>gPn(w,t));if(!d)continue;const _=(o=(a=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!_)continue;const p=!!c.closest(".katex-display"),m={markdown:jk(_,p).trim(),delta:Math.abs(d.length-t.length)};(!r||m.delta .md .katex")){const d=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=c.querySelector(".katex-html"))==null?void 0:i.textContent,c.textContent].filter(w=>!!w).map(JR).find(w=>PPn(w,t));if(!d)continue;const f=(o=(a=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!f)continue;const p=!!c.closest(".katex-display"),m={markdown:jk(f,p).trim(),delta:Math.abs(d.length-t.length)};(!r||m.deltaj.width>0&&j.height>0),w=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topw.top),v=k.length>0?k:[w],y=Math.min(...v.map(j=>j.left)),x=Math.max(...v.map(j=>j.right)),b=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),N=34,z=74,A=b>=N+L4?b-N-L4:C+L4;return{text:CPn(p,_),range:t.cloneRange(),x:Math.min(window.innerWidth-z,Math.max(z,y+(x-y)/2)),top:A}}function zPn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const c=e.current;r(c?NPn(c):null)},[e]);T.useEffect(()=>{let c=null;const u=()=>{s.current||i()},d=p=>{const m=e.current,w=p.target;!p.isPrimary||p.button!==0||!m||!(w instanceof Node)||!m.contains(w)||(s.current=!0,r(null))},_=p=>{!p.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",d,!0),window.addEventListener("pointerup",_,!0),window.addEventListener("pointercancel",_,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",d,!0),window.removeEventListener("pointerup",_,!0),window.removeEventListener("pointercancel",_,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[i]),T.useEffect(()=>{if(!t)return;const c=u=>{const d=u.target;d instanceof Element&&d.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",i)}},[t,i]);const a=T.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=T.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function jPn(e,n){T.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const t=e.flatMap(s=>s.range?[s.range]:[]);if(t.length===0){CSS.highlights.delete(n);return}const r=new Highlight(...t);return CSS.highlights.set(n,r),()=>{CSS.highlights.get(n)===r&&CSS.highlights.delete(n)}},[e,n])}function APn({annotation:e}){const n=T.useRef(null),[t,r]=T.useState();return T.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?EPn(e.text,s):void 0)},[e.id,e.text]),f.jsx("div",{ref:n,children:f.jsx($c,{text:t??e.text})})}function TPn({annotations:e,onRemove:n}){return e.map((t,r)=>f.jsxs("div",{className:`annotation-item grid gap-2 py-2 px-1 [&+&]:border-t [&+&]:border-border-variant ${n?"grid-cols-[24px_minmax(0,_1fr)_28px]":"grid-cols-[24px_minmax(0,_1fr)]"}`,children:[f.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-sm text-muted mb-1",children:ESe()}),f.jsx(APn,{annotation:t})]}),n&&f.jsx(At,{type:"button",size:"small","data-annotation-remove":!0,title:jke(),"aria-label":TJ({number:ln(r+1)}),onClick:()=>n(t.id),children:f.jsx(ur,{size:13})})]},t.id))}function HC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=ra(s),c=n==="sent",u=T.useRef(null),d=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},_=()=>{u.current=window.setTimeout(()=>{var w;(w=i.current)!=null&&w.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const w=c||!o.open;o.setOpen(w),w&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=w=>{r==null||r(w),window.requestAnimationFrame(()=>{var v,y;(y=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||y.focus()})};return T.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),f.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:c?d:void 0,onMouseLeave:c?_:void 0,children:[f.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[f.jsxs("button",{ref:s,type:"button",className:`inline-flex items-center gap-1.5 py-1 text-sm font-medium text-text [&:hover]:bg-surface ${c?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[f.jsx(R$,{size:c?13:14,className:"text-muted"}),e.length===1?lbe():k0e({count:ln(e.length)})]}),t&&f.jsx("button",{type:"button",className:"inline-flex items-center justify-center self-stretch w-6.5 text-muted border-s border-border [&:hover]:bg-surface [&:hover]:text-text",title:MN(),"aria-label":MN(),onClick:t,children:f.jsx(ur,{size:13})})]}),o.open&&f.jsx("div",{id:a,ref:i,tabIndex:-1,className:`annotation-menu absolute bottom-[calc(100%_+_8px)] z-50 w-[min(440px,_calc(100vw_-_48px))] max-h-80 overflow-y-auto overscroll-contain bg-background border border-border rounded-lg shadow-popover p-2 text-start ${c?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":bSe(),children:f.jsx(TPn,{annotations:e,onRemove:r?m:void 0})})]})}function RPn(e){return f.jsx(HC,{...e,variant:"composer"})}const MPn=["prompt-collapsed text-muted text-base font-[375] my-3.5 mx-0 [&_summary]:flex","[&_summary]:items-center [&_summary]:gap-2 [&_summary]:cursor-pointer","[&_summary]:list-none [&_summary]:select-none [&_summary::-webkit-details-marker]:hidden","[&_summary::after]:content-['›'] [&_summary::after]:text-muted","[&_summary::after]:transition-transform [&_summary::after]:duration-80 [&_summary::after]:ease-standard [&[open]_summary::after]:rotate-90"].join(" "),eM=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),OPn=["prompt-collapsed plan-resolved text-subtext my-3.5 mx-0","[&_summary]:flex [&_summary]:items-center [&_summary]:gap-2 [&_summary]:w-fit [&_summary]:max-w-full","[&_summary]:py-[3px] [&_summary]:px-1 [&_summary]:cursor-pointer [&_summary]:rounded-sm","[&_summary]:list-none [&_summary]:select-none [&_summary:hover]:bg-surface","[&_summary::-webkit-details-marker]:hidden","[&_summary_.plan-chevron]:transition-transform [&_summary_.plan-chevron]:duration-120","[&_summary_.plan-chevron]:ease-standard [&[open]_summary_.plan-chevron]:rotate-90"].join(" "),DPn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),Ak="prompt-actions flex flex-wrap gap-2",tM=[],nM=[],b0={};function Q_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function $4(e){var t;const n=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return((t=n.at(-1))==null?void 0:t.toLowerCase())!=="skill.md"?null:n.at(-2)??null}function LPn(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function di(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function B4(e,n,t){const r=e[n];if(!Array.isArray(r))return null;for(const s of r){if(!s||typeof s!="object"||!(t in s))continue;const i=s[t];if(typeof i=="string"&&i)return i}return null}function P4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=u_));s++);return r}function IPn(e,n){const t=e[n];if(!Array.isArray(t))return null;const r=[];for(const s of t){if(typeof s!="string")return null;r.push(s)}return r}function _h(...e){const n=new Set,t=new RegExp(`^${xf}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=u_||r++>=kq)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function ux(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!f)return null;const p=VPn(t,e),m=Array.from(t.getClientRects()).filter(j=>j.width>0&&j.height>0),w=m[0]??t.getBoundingClientRect(),k=m.filter(j=>j.topw.top),v=k.length>0?k:[w],y=Math.min(...v.map(j=>j.left)),x=Math.max(...v.map(j=>j.right)),b=Math.min(...v.map(j=>j.top)),C=Math.max(...v.map(j=>j.bottom)),N=34,z=74,A=b>=N+L4?b-N-L4:C+L4;return{text:WPn(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-z,Math.max(z,y+(x-y)/2)),top:A}}function YPn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const c=e.current;r(c?XPn(c):null)},[e]);T.useEffect(()=>{let c=null;const u=()=>{s.current||i()},d=p=>{const m=e.current,w=p.target;!p.isPrimary||p.button!==0||!m||!(w instanceof Node)||!m.contains(w)||(s.current=!0,r(null))},f=p=>{!p.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",d,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",d,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[i]),T.useEffect(()=>{if(!t)return;const c=u=>{const d=u.target;d instanceof Element&&d.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",i)}},[t,i]);const a=T.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),o=T.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function ZPn(e,n){T.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const t=e.flatMap(s=>s.range?[s.range]:[]);if(t.length===0){CSS.highlights.delete(n);return}const r=new Highlight(...t);return CSS.highlights.set(n,r),()=>{CSS.highlights.get(n)===r&&CSS.highlights.delete(n)}},[e,n])}function JPn({annotation:e}){const n=T.useRef(null),[t,r]=T.useState();return T.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?QPn(e.text,s):void 0)},[e.id,e.text]),_.jsx("div",{ref:n,children:_.jsx($c,{text:t??e.text})})}function eFn({annotations:e,onRemove:n}){return e.map((t,r)=>_.jsxs("div",{className:`annotation-item grid gap-2 py-2 px-1 [&+&]:border-t [&+&]:border-border-variant ${n?"grid-cols-[24px_minmax(0,_1fr)_28px]":"grid-cols-[24px_minmax(0,_1fr)]"}`,children:[_.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("div",{className:"text-sm text-muted mb-1",children:ESe()}),_.jsx(JPn,{annotation:t})]}),n&&_.jsx(Rt,{type:"button",size:"small","data-annotation-remove":!0,title:jke(),"aria-label":TJ({number:_n(r+1)}),onClick:()=>n(t.id),children:_.jsx(_r,{size:13})})]},t.id))}function HC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=ra(s),c=n==="sent",u=T.useRef(null),d=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},f=()=>{u.current=window.setTimeout(()=>{var w;(w=i.current)!=null&&w.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const w=c||!o.open;o.setOpen(w),w&&window.requestAnimationFrame(()=>{var k;return(k=i.current)==null?void 0:k.focus()})},m=w=>{r==null||r(w),window.requestAnimationFrame(()=>{var v,y;(y=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||y.focus()})};return T.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),_.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:c?d:void 0,onMouseLeave:c?f:void 0,children:[_.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[_.jsxs("button",{ref:s,type:"button",className:`inline-flex items-center gap-1.5 py-1 text-sm font-medium text-text [&:hover]:bg-surface ${c?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[_.jsx(R$,{size:c?13:14,className:"text-muted"}),e.length===1?lbe():k0e({count:_n(e.length)})]}),t&&_.jsx("button",{type:"button",className:"inline-flex items-center justify-center self-stretch w-6.5 text-muted border-s border-border [&:hover]:bg-surface [&:hover]:text-text",title:MN(),"aria-label":MN(),onClick:t,children:_.jsx(_r,{size:13})})]}),o.open&&_.jsx("div",{id:a,ref:i,tabIndex:-1,className:`annotation-menu absolute bottom-[calc(100%_+_8px)] z-50 w-[min(440px,_calc(100vw_-_48px))] max-h-80 overflow-y-auto overscroll-contain bg-background border border-border rounded-lg shadow-popover p-2 text-start ${c?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":bSe(),children:_.jsx(eFn,{annotations:e,onRemove:r?m:void 0})})]})}function tFn(e){return _.jsx(HC,{...e,variant:"composer"})}const nFn=["prompt-collapsed text-muted text-base font-[375] my-3.5 mx-0 [&_summary]:flex","[&_summary]:items-center [&_summary]:gap-2 [&_summary]:cursor-pointer","[&_summary]:list-none [&_summary]:select-none [&_summary::-webkit-details-marker]:hidden","[&_summary::after]:content-['›'] [&_summary::after]:text-muted","[&_summary::after]:transition-transform [&_summary::after]:duration-80 [&_summary::after]:ease-standard [&[open]_summary::after]:rotate-90"].join(" "),eM=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),rFn=["prompt-collapsed plan-resolved text-subtext my-3.5 mx-0","[&_summary]:flex [&_summary]:items-center [&_summary]:gap-2 [&_summary]:w-fit [&_summary]:max-w-full","[&_summary]:py-[3px] [&_summary]:px-1 [&_summary]:cursor-pointer [&_summary]:rounded-sm","[&_summary]:list-none [&_summary]:select-none [&_summary:hover]:bg-surface","[&_summary::-webkit-details-marker]:hidden","[&_summary_.plan-chevron]:transition-transform [&_summary_.plan-chevron]:duration-120","[&_summary_.plan-chevron]:ease-standard [&[open]_summary_.plan-chevron]:rotate-90"].join(" "),sFn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),Ak="prompt-actions flex flex-wrap gap-2",tM=[],nM=[],b0={};function Q_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function $4(e){var t;const n=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return((t=n.at(-1))==null?void 0:t.toLowerCase())!=="skill.md"?null:n.at(-2)??null}function iFn(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function di(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function B4(e,n,t){const r=e[n];if(!Array.isArray(r))return null;for(const s of r){if(!s||typeof s!="object"||!(t in s))continue;const i=s[t];if(typeof i=="string"&&i)return i}return null}function P4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=u_));s++);return r}function aFn(e,n){const t=e[n];if(!Array.isArray(t))return null;const r=[];for(const s of t){if(typeof s!="string")return null;r.push(s)}return r}function _h(...e){const n=new Set,t=new RegExp(`^${xf}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=u_||r++>=kq)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function _x(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function $Pn(e){const n=e.changes;if(!Array.isArray(n))return null;for(const t of n){if(!t||typeof t!="object"||!("path"in t)||typeof t.path!="string")continue;const r="kind"in t?t.kind:null,s=r&&typeof r=="object"&&"type"in r&&typeof r.type=="string"?r.type:null;return{path:t.path,type:s}}return null}function BPn(e){const n=e.trim(),t=n.match(/^\/bin\/(?:ba|z)?sh\s+-lc\s+([\s\S]+)$/);let r=((t==null?void 0:t[1])??n).trim();return r=YRn(r),Eq(r)}function Eq(e){return FPn(e).replace(/[\t\r ]+/g," ").trim()}function PPn(e){let n=null,t=!1;for(let r=0;r!i.startsWith("-")&&i.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&zq(s)?{ref:r,path:s}:null}function UPn(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function rM(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const i of n.split("/"))if(!(!i||i===".")){if(i===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(i);continue}r.push(i)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function GPn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const c=rM(s,o);if(!c)return null;s=c}return s?rM(s,e):e}const yc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",VPn=new RegExp(`\\bchat_(${yc})\\b`,"gi"),xf=`(?:${yc}|[0-9a-f]{8})`;function fh(e){const n=[];let t="",r="",s=null,i=!1;const a=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=u=>{let d=1,_=null,p=!1;for(let m=u;m{let d=!1;for(let _=u;_ZRn(t.raw,n))}function lo(e,n){return _x(e,n).length>0}function KPn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,Sq).matchAll(VPn))if(n.add(t[0].toLowerCase()),n.size>=u_)break;return[...n]}function Tk(e,n){if(!e)return[];const t=new Set,r=e.slice(0,Sq),s=n==="runs"?[new RegExp(`/runs/(${yc})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${yc})`,"gi"),new RegExp(`^\\s*RUN\\s+(${yc})\\b`,"gim"),new RegExp(`={3,}\\s*(${yc})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${yc})`,"gi"),new RegExp(`^\\s*id:\\s*(${yc})`,"gim"),new RegExp(`={3,}\\s*(${yc})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=u_)return[...t];const i=new RegExp(`^\\s*(${yc})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=u_)break;return[...t]}function Aq(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),i=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,i+r.raw.length),{invocation:r,offset:Math.max(0,i)}})}function Tq(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let i="";for(const a of e.matchAll(s)){if((a.index??0)>=t)break;i=a[1]??a[2]??a[3]??""}return[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function Rq(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let i="";for(const a of e.matchAll(s)){const o=a.index??0;if(o>=t)break;const c=o+a[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function WPn(e,n,t=[],r=[]){const s=_x(e,"logs"),i=new Set;if(s.length===0){if(!lo(e,"logs"))return[];const o=t.length>0?[]:Tk(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=u_)break;return _h([...i])}let a=!1;for(const{invocation:o,offset:c}of Aq(e,s)){const u=fm(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const d=u.slice(1);let _=null;for(let v=0;v0?[]:Tk(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=u_)break}return _h([...i])}function qd(e,n,t=[],r=[]){const s=_x(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of Aq(e,s)){const u=fm(o.raw),d=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let _=!1;d&&new RegExp(`^${xf}$`,"i").test(d)&&(i.add(d),_=!0);const p=d?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(d):null;if(p){const m=p[1],w=Tq(e,m,c,xf);if(w.length>0){for(const v of w)i.add(v);_=!0}const k=Rq(e,m,c,xf);for(const v of k)i.add(v);k.length>0&&(_=!0)}_||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:Tk(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=u_)break}return _h([...i])}const sM=new WeakMap;function If(e){const n=E(),t=sM.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=QPn(e);return sM.set(e,{locale:n,activity:r}),r}function QPn(e){var y,x,b,C,N,z;const n=e.tool??"tool",t=((y=e.state)==null?void 0:y.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=di(i,"command","cmd"),o=IPn(i,"commandArgv"),c=((x=e.state)==null?void 0:x.output)||((b=e.state)==null?void 0:b.error),u=_h(P4(i,"targetIds")),d=_h(P4(i,"runTargetIds")),_=_h(P4(i,"experimentTargetIds")),p=di(i,"filePath","file_path","notebookPath","notebook_path","path"),m=di(i,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),k=w.at(-1)??n.toLowerCase();if(k==="run"&&w.includes("web")){const A=B4(i,"search_query","q"),j=B4(i,"image_query","q"),M=B4(i,"find","pattern");return A?{kind:"web",label:mN({query:A})}:j?{kind:"web",label:qae({query:j})}:M?{kind:"web",label:joe({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:P3e()}:Array.isArray(i.weather)?{kind:"web",label:l2e()}:Array.isArray(i.finance)?{kind:"web",label:Qxe()}:Array.isArray(i.sports)?{kind:"web",label:n2e()}:Array.isArray(i.time)?{kind:"web",label:Hxe()}:{kind:"web",label:TN()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["compacted","contextcompaction"],["imported","importedchat"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:O5e()};const A=BPn(a??(o==null?void 0:o.join(" "))??""),j=fh(A);let M=j.map(G=>G.raw);if(o!=null&&o.length){const G=jT(o);M=G===null?[o]:fh(Eq(G)).map(ae=>ae.raw)}let D=null;for(const G of M)if(D=JRn(G),D)break;const L=M.some(G=>{const ae=fm(G);return ae!==null&&ae[0]!=="discover"&&ae[0]!=="paper"});if(D&&!L){const G=D.kind==="discover"&&!D.query?eMn(o?jT(o)??A:A,c??"",D.strategy):[],ae=D.kind==="discover"?{keyword:uae(),embedding:gae(),openalex:loe(),biorxiv:Sae(),pubmed:moe()}[D.strategy]:null,le=D.kind==="discover"?D.query?pN({activity:ae??x1(),query:D.query}):G.length===1?pN({activity:ae??x1(),query:G[0]}):G.length>1?Fne({activity:ae??x1(),count:ln(G.length)}):ae??x1():D.id?o0({target:Ae(D.id)}):kse();return{kind:D.kind==="paper"?"read":"search",label:le,litCall:D,queries:G}}if(lo(A,"agent\\s+spawn"))return{kind:"agent",label:W2e(),spawnedSessionIds:KPn(c),litCall:D??void 0};const B=j.map(G=>jq(G.raw)),U=lo(A,"exp\\s+status"),H=lo(A,"exp\\s+desc"),Q=_x(A,"exp\\s+desc").some(G=>(fm(G.raw)??[]).some(le=>le==="--set"||le.startsWith("--set=")||le==="--stdin")),K=Q?Sce():mse(),Z=Q?dte():Aie();if(lo(A,"logs")){const G=WPn(A,c,d,u);return{kind:"project",label:G.length===1?mie():kie(),runIds:G,litCall:D??void 0}}if(lo(A,"exp\\s+run"))return{kind:"project",label:s6e(),litCall:D??void 0};if(lo(A,"exp\\s+wait"))return{kind:"project",label:a7e(),litCall:D??void 0};if(lo(A,"exp\\s+cancel"))return{kind:"project",label:cxe(),litCall:D??void 0};const ee=lo(A,"project\\s+view");if(ee&&U&&H)return{kind:"project",label:Z,experimentIds:qd(A,c,_,u),litCall:D??void 0};if(ee&&H)return{kind:"project",label:K,experimentIds:qd(A,c,_,u),litCall:D??void 0};if(ee&&U)return{kind:"project",label:RN(),experimentIds:qd(A,c,_,u),litCall:D??void 0};if(ee)return{kind:"project",label:cke(),litCall:D??void 0};if(U&&H)return{kind:"project",label:Z,experimentIds:qd(A,c,_,u),litCall:D??void 0};if(U)return{kind:"project",label:RN(),experimentIds:qd(A,c,_,u),litCall:D??void 0};if(H)return{kind:"project",label:K,experimentIds:qd(A,c,_,u),litCall:D??void 0};if(lo(A,"runs?"))return{kind:"project",label:t3e(),litCall:D??void 0};if(lo(A,"projects"))return{kind:"project",label:c3e(),litCall:D??void 0};if(lo(A,"compute"))return{kind:"project",label:wxe(),litCall:D??void 0};const $=B.map(qPn).find(G=>G!=null);if($){const G=$4($.path);return{kind:G?"skill":"read",label:G?mw({name:Ae(G)}):o0({target:Ae(Q_($.path))}),filePath:$.path,fileRef:$.ref,labelTarget:G?`${G} skill`:Q_($.path)}}const I=B.findIndex(G=>G!=null&&["sed","cat","head","tail"].includes(G.name)),F=I>=0?B[I]:null,q=F?HPn(F):null,V=q?GPn(q,j,I,di(i,"cwd","workdir")):null;if(q&&V){const G=$4(V);return{kind:G?"skill":"read",label:G?mw({name:Ae(G)}):o0({target:Ae(Q_(q))}),filePath:V,labelTarget:G?`${G} skill`:Q_(q)}}if(B.some(G=>(G==null?void 0:G.name)==="find"||(G==null?void 0:G.name)==="ls"||(G==null?void 0:G.name)==="rg"&&G.args.includes("--files")))return{kind:"search",label:HN()};const ie=B.findIndex(G=>(G==null?void 0:G.name)==="rg"||(G==null?void 0:G.name)==="grep");if(ie>=0){const G=UPn(j[ie].raw);return{kind:"search",label:G?vw({pattern:Ae(G)}):gw(),searchPattern:G??void 0}}const oe=B.find(G=>(G==null?void 0:G.name)==="git"),ce=oe==null?void 0:oe.args[0];if(ce==="grep"){const G=oe==null?void 0:oe.args.slice(1).find(ae=>!ae.startsWith("-"));return{kind:"search",label:G?vw({pattern:Ae(G)}):gw(),searchPattern:G}}if(ce==="status")return{kind:"command",label:Dxe()};if(ce==="diff")return{kind:"command",label:aSe()};if(ce==="log")return{kind:"command",label:tke()};const ne=G=>B.some(ae=>!ae||!["cargo","pnpm","npm","yarn"].includes(ae.name)?!1:ae.args[0]===G||ae.args[0]==="run"&&ae.args[1]===G);return ne("test")?{kind:"command",label:F5e()}:B.some(G=>(G==null?void 0:G.name)==="tsc")||ne("typecheck")?{kind:"command",label:m2e()}:ne("lint")?{kind:"command",label:pxe()}:ne("build")?{kind:"command",label:Wye()}:{kind:"command",label:Qre({command:Ae(A)})}}case"skill":{const A=di(i,"skill","name"),j=A?LPn(n,A):null;return{kind:"skill",label:A?zre({name:Ae(A)}):xre(),filePath:j??void 0,labelTarget:j&&A?`${A} skill`:void 0}}case"read":{const A=p?Q_(p):null,j=p?$4(p):null;return j?{kind:"skill",label:mw({name:Ae(j)}),filePath:p??void 0,labelTarget:`${j} skill`}:A?{kind:"read",label:o0({target:Ae(A)}),filePath:p??void 0,labelTarget:A}:{kind:"read",label:W5e()}}case"edit":case"write":case"notebookedit":{const A=$Pn(i),j=p??(A==null?void 0:A.path)??null,M=j?Q_(j):null,D=M?(A==null?void 0:A.type)==="add"?Kte({target:Ae(M)}):(A==null?void 0:A.type)==="delete"?hne({target:Ae(M)}):Nne({target:Ae(M)}):null;return M?{kind:"edit",label:D??$N(),filePath:j??void 0,labelTarget:M}:{kind:"edit",label:$N()}}case"grep":{const A=di(i,"pattern");return{kind:"search",label:A?vw({pattern:Ae(A)}):gw(),searchPattern:A??void 0}}case"glob":{const A=di(i,"pattern");return{kind:"search",label:A?ore({pattern:Ae(A)}):HN()}}case"websearch":{const A=di(i,"query"),j=di(i,"url"),M=di(i,"pattern");return A?{kind:"web",label:mN({query:A})}:M&&j?{kind:"web",label:noe({pattern:M})}:j?{kind:"web",label:Hre({target:Ae(j)})}:{kind:"web",label:m??TN()}}case"webfetch":{const A=di(i,"url");return{kind:"web",label:A?o0({target:Ae(A)}):m??Hse()}}case"task":return{kind:"agent",label:m??nse()};case"subagent":return{kind:"agent",label:XPn(i)};case"error":return{kind:"command",label:PCe()};case"importedchat":return{kind:"project",label:ere()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Pte():((N=e.state)==null?void 0:N.status)==="running"?hN():Nte(),progressLabel:hN()};default:{const A=m??p??a??((z=e.state)==null?void 0:z.title)??"";return{kind:"command",label:A?`${n}: ${A}`:n}}}}function XPn(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return Xoe();case"sendInput":return qoe();case"resumeAgent":return nie();case"wait":return Tce();case"closeAgent":return yte()}switch(typeof e.kind=="string"?e.kind:""){case"started":return gce();case"interacted":return Vee();case"interrupted":return uce()}return rce()}function Lb({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=f.jsx(Xf,{...t});if(e.litCall)r=f.jsx(mF,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=f.jsx(k$,{...t});break;case"read":case"project":r=f.jsx(S$,{...t});break;case"search":r=f.jsx(D$,{...t});break;case"edit":r=f.jsx(XS,{...t});break;case"web":r=f.jsx(w6n,{...t});break;case"agent":r=f.jsx(JS,{...t});break}return f.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function F4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=T.useState(!1),a=T.useRef(null),o=T.useRef(!1);return T.useEffect(()=>{var c,u;!s||!o.current||(o.current=!1,(u=(c=a.current)==null?void 0:c.querySelector("button"))==null||u.focus())},[s]),f.jsxs("span",{className:"tool-target-overflow inline",children:[s&&f.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((c,u)=>f.jsxs("span",{children:[u>0&&", ",n||t?f.jsx("button",{className:"tool-target",...n?ns(d=>n(c.id,d),{stopPropagation:!0}):{onClick:d=>{d.stopPropagation(),t==null||t(c.id)}},children:c.label}):f.jsx("span",{children:c.label})]},c.id))}),s&&", ",f.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?rZ({target:r}):Cee({count:ln(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?zS():Uje({count:ln(e.length)})})]})}function Rk({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,d;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return f.jsxs("a",{className:"tool-target",href:oMn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,f.jsx(CSn,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const _=e.filePath;return f.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...ns(p=>n(_,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const _=e.spawnedSessionIds,p=_.slice(0,3),m=_.slice(p.length).map((w,k)=>({id:w,label:SN({number:ln(p.length+k+1)})}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((w,k)=>f.jsxs("span",{children:[k>0&&", ",f.jsx("button",{className:"tool-target",title:M3e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(w)},children:SN({number:ln(k+1)})})]},w)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(F4,{items:m,onSelect:r,targetType:u0e()})]})]})}if((u=e.runIds)!=null&&u.length){const _=s?e.runIds.filter(w=>!!s(w)):e.runIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(w=>({id:w,label:(s==null?void 0:s(w))||El()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((w,k)=>f.jsxs("span",{children:[k>0&&", ",t?f.jsx("button",{className:"tool-target",title:YZ({run:Ae(w)}),...ns(v=>t(w,v),{stopPropagation:!0}),children:(s==null?void 0:s(w))||El()}):f.jsx("span",{children:(s==null?void 0:s(w))||El()})]},w)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(F4,{items:m,onOpen:t,targetType:d9e()})]})]})}if((d=e.experimentIds)!=null&&d.length){const _=a?e.experimentIds.filter(w=>!!a(w)):e.experimentIds;if(_.length===0)return e.label;const p=_.slice(0,3),m=_.slice(p.length).map(w=>({id:w,label:(a==null?void 0:a(w))||El()}));return f.jsxs(f.Fragment,{children:[e.label," — ",p.map((w,k)=>f.jsxs("span",{children:[k>0&&", ",i?f.jsx("button",{className:"tool-target",title:IZ({name:(a==null?void 0:a(w))||Ae(w)}),...ns(v=>i(w,v),{stopPropagation:!0}),children:(a==null?void 0:a(w))||El()}):f.jsx("span",{children:(a==null?void 0:a(w))||El()})]},w)),m.length>0&&f.jsxs(f.Fragment,{children:[", ",f.jsx(F4,{items:m,onOpen:i,targetType:Vge()})]})]})}return e.label}function qC(e){const n=e.progressLabel??{skill:Dre(),read:Qse(),search:Loe(),edit:One(),project:Iie(),web:ate(),agent:one(),command:tL()}[e.kind];return{...e,label:n}}function Mq(e,n){const t=If({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:hre(),read:lse(),search:rae(),edit:eL(),project:lie(),web:Jee(),agent:ene(),command:Uie()}[t.kind]}function YPn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const ZPn=250;function JPn(e,n){const[t,r]=T.useState(e),s=T.useRef(Date.now()),i=T.useRef(e);return T.useEffect(()=>{if(i.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const a=ZPn-(Date.now()-s.current);if(a<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(i.current)},a);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const eFn=160;function Oq(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),eFn);return()=>window.clearTimeout(r)},[e]),e&&n}function tFn(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:lL()}}function nFn(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null,n.queries??null])}function rFn(e){const n=[];let t=null;for(const r of e){const s=If(r),i=nFn(r,s),a=n[n.length-1];i&&a&&t===i?a.count++:n.push({part:r,activity:s,count:1}),t=i}return n}function Dq({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var w,k;const i=(w=e.state)==null?void 0:w.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,c]=T.useState(Date.now());if(T.useEffect(()=>{if(typeof a!="number"||(c(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const y=Date.now();c(y),y>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=GRn(i??{},o);return f.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[f.jsx(Ct,{}),f.jsx("span",{children:v})]})}const u=dF(i==null?void 0:i.recoveryAction),d=i==null?void 0:i.turnId,_=fF(e)?hve():s?R9e():nz(),p=s?m6n:ZS,m=ux(((k=e.state)==null?void 0:k.error)||nz());return f.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[f.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[f.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),f.jsx("span",{children:_}),f.jsx(yo,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),f.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&d&&(u==="retry"||u==="continue")&&f.jsx(Oe,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(d,u),children:t?aEe():u==="retry"?Ks():ige()})]})}function iM({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,d=(u==null?void 0:u.status)==="error",_=ux((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=d&&!!_,[m,w]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return f.jsx(Dq,{part:e,busy:!1,recovering:!1,usageLimited:Y5(e)});const v=f.jsxs(f.Fragment,{children:[d&&f.jsxs("span",{className:"sr-only",children:[SS()," "]}),d?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(N$,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):f.jsx(Lb,{activity:n,className:"text-muted"}),f.jsxs("span",{className:`${wq} ${d?"text-accent-red":"text-subtext"}`,children:[f.jsx(Rk,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}),t>1&&f.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:gZ({count:ln(t)}),children:["×",t]})]})]});return p?f.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[f.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,f.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":k,"aria-label":m?uZ({activity:n.label}):vee({activity:n.label}),onClick:()=>w(y=>!y),children:f.jsx(yo,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&f.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:f.jsx("div",{className:FC,children:_.slice(0,2e4)})})]}):f.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function sFn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,D,L;const[c,u]=T.useState(!1),[d,_]=T.useState(!1),p=()=>{_(!0),u(B=>!B)},m=rFn(e),w=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,y=k==null?void 0:k.activity,x=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(y&&qC(y))??null:null,b=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(x!=null&&x.progressLabel)&&(YPn((D=v.state)==null?void 0:D.input)||(x==null?void 0:x.kind)==="command"&&!di(((L=v.state)==null?void 0:L.input)??{},"command","cmd")),C=JPn(x,b),N=Oq(C!=null),z=C??tFn(w),A=C?C.label:lL();return e.length===1?C?f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[f.jsx(Lb,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),f.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:A,children:f.jsx(Rk,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):f.jsx("div",{className:"tool-group my-3.5 mx-0",children:f.jsx(iM,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[f.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[f.jsx(Lb,{activity:z,className:N?"tool-running-shimmer-icon":"text-muted"}),C?f.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:A,children:f.jsx(Rk,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):f.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":c,children:A}),f.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":c,"aria-label":c?$me():Bge(),children:f.jsx(yo,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),f.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:d&&m.map(({part:B,count:U,activity:H})=>f.jsx(iM,{part:B,repeatCount:U,activity:H,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},B.id))})})})]})}function iFn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var d;const s=e.prompt,[i,a]=T.useState([]),o=!n,c=_=>n==null?void 0:n({promptId:e.id,..._});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:e5e(),icon:ti,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:x5e(),icon:XS,iconClass:"text-accent-amber"}:s.approved===!1?{label:o5e(),icon:ur,iconClass:"text-accent-red"}:{label:h5e(),icon:_y,iconClass:"text-muted"},w=m.icon;return f.jsxs("details",{className:OPn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?_L():JN()}),f.jsx(w,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),f.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),f.jsx(yo,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),f.jsxs("div",{className:`${eM} ms-6`,children:[f.jsx($c,{text:s.plan??"",onOpenFile:t}),s.note&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const _=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,w)=>({id:`${e.id}-annotation-${w}`,text:m.text}));return f.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&f.jsx(HC,{annotations:p,variant:"sent"}),f.jsxs("details",{className:MPn,children:[f.jsxs("summary",{children:[f.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||i8e()}),f.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${_?"chosen":""}`,children:_||J8e()})]}),f.jsxs("div",{className:eM,children:[s.header&&s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&f.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var w;return f.jsx("li",{className:(w=s.answers)!=null&&w.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==_&&f.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const _=!!r;return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${o?"readonly":""}`,children:[f.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?V7e():JN()}),f.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--surface))] [&.clamped::after]:pointer-events-none ${_?"clamped":""}`,children:f.jsx($c,{text:s.plan??"",onOpenFile:t})}),_&&f.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...ns(p=>r(s.plan??"",e.id,p)),children:JCe()}),!o&&!_&&f.jsxs("div",{className:Ak,children:[f.jsx(Oe,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:jbe()}),f.jsx(Oe,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:Lbe()}),f.jsx(Oe,{size:"small",onClick:()=>c({approve:!1}),children:pke()})]})]})}if(s.kind==="permission"){const _=s.toolInput??{},p=di(_,"command","cmd","filePath","file_path","path")||"",m=typeof((d=s.toolInput)==null?void 0:d.reason)=="string"&&s.toolInput.reason||"",w=di(_,"description")||"",k=m||w||Mq(s.tool,_),v=`permission-heading-${e.id}`;return f.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${o?"readonly":""}`,role:"group","aria-labelledby":v,children:[f.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[f.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:f.jsx(ZS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),f.jsx("span",{id:v,className:"text-base font-semibold text-text",children:uye()})]}),f.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[f.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&f.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!o&&f.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[f.jsx(Oe,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:Ewe()}),f.jsx(Oe,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:rye()})]})]})]})}const u=_=>a(p=>s.multiSelect?p.includes(_)?p.filter(m=>m!==_):[...p,_]:[_]);return f.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${o?"readonly":""}`,children:[s.header&&f.jsx("div",{className:DPn,children:s.header}),s.question&&f.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),f.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(_=>{const p=i.includes(_.label);return f.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?u(_.label):c({answers:[_.label]}),children:[f.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:_.label}),_.description&&f.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:_.description})]},_.label)})}),s.multiSelect&&!o&&f.jsx("div",{className:Ak,children:f.jsx(Oe,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:MCe()})})]})}function aFn(e,n){return e.role==="user"?!0:e.parts.some(t=>qh(t,n))}function oFn(e){const n=e.text??"",t=n.startsWith("data:")?n:w3n(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",i=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:i,name:s}}async function UC(e){try{if(!navigator.clipboard)throw new Error(mL());await navigator.clipboard.writeText(e),tn(Cf(),"success")}catch(n){tn(n instanceof Error?n.message:String(n),"error")}}function cFn(e,n){const t=URL.createObjectURL(new Blob([n],{type:"text/markdown;charset=utf-8"})),r=document.createElement("a");r.href=t,r.download=e,document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(t),1e3)}function lFn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const d=t>1,_=new Date(n),p=()=>UC(e);return f.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${d?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[d&&f.jsxs(f.Fragment,{children:[f.jsx(At,{size:"small",title:GN(),"aria-label":GN(),disabled:o||!s,onClick:()=>s&&a(s),children:f.jsx(C$,{size:14})}),f.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),f.jsx(At,{size:"small",title:UN(),"aria-label":UN(),disabled:o||!i,onClick:()=>i&&a(i),children:f.jsx(yo,{size:14})})]}),f.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[f.jsx("time",{dateTime:_.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:_.toLocaleTimeString(E(),{hour:"numeric",minute:"2-digit"})}),f.jsx(At,{size:"small","aria-label":AS(),disabled:!e,onClick:p,children:f.jsx(Wf,{size:13})})]}),f.jsx(At,{size:"small",title:IN(),"aria-label":IN(),disabled:u,onClick:c,children:f.jsx(XS,{size:13})})]})}const uFn=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:d,onOpenPlan:_,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:k,skills:v,predictTextTail:y=!1,forkCount:x,forkIndex:b=0,forkPrevId:C,forkNextId:N,forkDisabled:z,branchDisabled:A,onFork:j,onSelectFork:M}){var Z,ee;d_();const[D,L]=T.useState(null),B=fFn(n);if(B)return f.jsx(dFn,{part:B});if(n.role==="user"){const $=n.parts.filter(oe=>oe.type==="text").map(oe=>oe.text??"").join(` -`),I=oe=>!!(v!=null&&v.some(ce=>ce.name===PC(oe))),F=n.parts.filter(oe=>oe.type==="image"&&oe.text).map(oFn),q=F.filter(oe=>!oe.isPdf),V=F.filter(oe=>oe.isPdf),ie=n.parts.filter(oe=>oe.type==="annotation"&&oe.text).map(oe=>({id:oe.id,text:oe.text??""}));if(D!==null){const oe=()=>{const ce=D.trim();!ce||z||(L(null),j(n.id,ce))};return f.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:f.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[f.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":Gwe(),value:D,autoFocus:!0,onChange:ce=>L(ce.target.value),onKeyDown:ce=>{ce.key==="Escape"?(ce.preventDefault(),L(null)):ce.key==="Enter"&&!ce.shiftKey&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),oe())}}),f.jsxs("div",{className:`${Ak} justify-end`,children:[f.jsx(Oe,{size:"small",onClick:()=>L(null),children:txe()}),f.jsx(Oe,{size:"small",variant:"primary",onClick:oe,disabled:z||!D.trim(),children:L3()})]})]})})}return f.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[ie.length>0&&f.jsx(HC,{annotations:ie,variant:"sent"}),f.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:align-baseline",children:[f.jsx(tPn,{text:$,isCommand:I}),q.length>0&&f.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:q.map((oe,ce)=>f.jsx("a",{href:oe.src,target:"_blank",rel:"noreferrer",children:f.jsx("img",{src:oe.src,alt:Y0e()})},ce))}),V.length>0&&f.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:V.map((oe,ce)=>f.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:oe.src,target:"_blank",rel:"noreferrer",children:[f.jsx(_y,{size:15}),f.jsx("span",{children:oe.name})]},ce))})]}),x!==void 0&&f.jsx(lFn,{text:$,createdAt:n.createdAt,count:x,index:b,prevId:C,nextId:N,onSelect:M,pagerDisabled:A,onEdit:()=>L($),editDisabled:z})]})}const U=n.parts.find($=>$.type==="tool"&&Y5($)),H=n.parts.find(lg)??U,Q=BRn(n.parts.filter($=>$!==H&&!(U&&Y5($))),H),K=y&&!n.completedAt?"":_F(n);return f.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[f.jsx(_Fn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:d,onOpenPlan:_,onOpenSubagent:p,predictTextTail:y}}),H&&f.jsx(Dq,{part:H,usageLimited:!!U,busy:m,recovering:w===((ee=(Z=H.state)==null?void 0:Z.input)==null?void 0:ee.turnId),onRecover:k}),K&&f.jsx("div",{className:"flex opacity-0 transition-opacity duration-80 ease-standard group-hover/turn:opacity-100 group-focus-within/turn:opacity-100",children:f.jsx(At,{size:"small",title:EN(),"aria-label":EN(),onClick:()=>void UC(K),children:f.jsx(Wf,{size:13})})})]})});function _Fn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=lF(n,r),[a,o]=T.useState(!1),[,c]=T.useState(0);if(T.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>c(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return f.jsx(f.Fragment,{children:Mv(i,t)});const u=e.completedAt??(r?Date.now():null),d=u===null?null:u-e.createdAt,_=d===null?null:d<6e4||d>=36e5?J0(d):KNe({minutes:ln(Math.floor(d/6e4)),seconds:ln(Math.floor(d/1e3)%60)});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"turn-work mb-4",children:[f.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[f.jsx("span",{children:_===null?PNe():eze({duration:_})}),f.jsx(yo,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),f.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:f.jsx("div",{className:"tool-group-disclosure-inner",children:f.jsx("div",{className:"turn-work-content pt-4",children:Mv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),f.jsx("div",{className:"turn-answer",children:Mv(i,t)})]})}function fFn(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===WI?n:null}function dFn({part:e}){var c;const n=e.state,t=di((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",i=typeof((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),o=r?tL():s&&i!==null?Cme({code:ln(i)}):null;return f.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:f.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[f.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[f.jsxs("span",{className:"sr-only",children:[aL()," "]}),f.jsx(Xf,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),f.jsx("span",{children:t})]}),a&&f.jsx("div",{className:`${FC} mt-2`,children:a.slice(0,2e4)}),o&&f.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function Mv(e,n){var x,b;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:d,onOpenPlan:_,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(C=>C.type!=="steer"&&qh(C,t)).at(-1),k=[];let v=[];const y=()=>{v.length!==0&&(k.push(f.jsx(sFn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(qh(C,t)){if(C.type==="tool"&&(pFn(C.tool)||(((x=C.children)==null?void 0:x.length)??0)>0)){y(),k.push(f.jsx(gFn,{part:C,pendingTail:m&&((b=C.state)==null?void 0:b.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}y(),C.type==="text"?k.push(f.jsx($c,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(w==null?void 0:w.id)},C.id)):C.type==="steer"?k.push(f.jsx("div",{dir:"auto",role:"note","aria-label":N7e(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:C.text},C.id)):C.type==="prompt"&&C.prompt&&k.push(f.jsx(iFn,{part:C,onRespond:d,onOpenFile:s,onOpenPlan:_},C.id))}return y(),k}function hFn(e){return If(e).label}function pFn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function Lq(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function Ib(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&Ib(t.children,n);if(r)return r}return null}function mFn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var w,k,v,y;const o=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",d=u?ux(((v=e.state)==null?void 0:v.error)||((y=e.state)==null?void 0:y.output)||""):"",_=Mv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?oF(o):null}),m=o.some(x=>x.type==="text"&&!!x.text)?"":Lq(e);return f.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&f.jsxs("span",{className:"sr-only",children:[SS()," "]}),d&&f.jsx("div",{className:FC,children:d.slice(0,2e4)}),_.length===0&&!m&&!d?f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?CS():xve()}):f.jsxs(f.Fragment,{children:[_,m&&f.jsx($c,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function gFn({part:e,pendingTail:n,onOpenSubagent:t}){var u,d,_,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=ux(((d=e.state)==null?void 0:d.error)||((_=e.state)==null?void 0:_.output)||""),i=n&&!r?qC(If(e)):If(e),a=Oq(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!Lq(e),c=f.jsxs(f.Fragment,{children:[r&&f.jsxs("span",{className:"sr-only",children:[SS()," "]}),r?f.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:f.jsx(N$,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):f.jsx(Lb,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),f.jsx("span",{className:`${wq} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?f.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:c}):f.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:mbe(),...ns(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[c,f.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:f.jsx(yo,{size:12})})]})}function vFn(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,i)=>{var a,o;for(const c of s){const u=`${i}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(u,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function GC(e){const n=(t,r)=>{var s;for(const i of t){const a=i.prompt;if(i.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const o=a.toolInput??{},u=di(o,"reason","description")||Mq(a.tool,o);return{id:i.id,path:`${r}/${i.id}`,label:u}}if((s=i.children)!=null&&s.length){const o=n(i.children,`${r}/${i.id}`);if(o)return o}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function bFn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var w,k,v,y,x;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:i,states:a}=vFn(e),o=GC(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},t(b=>({text:o?gN({label:Ml(o.label)}):"",sequence:b.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,d=[...a].filter(([b,C])=>{var N;return((N=c.get(b))==null?void 0:N.status)!==C.status});if(r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==u){t(b=>({text:gN({label:Ml(o.label)}),sequence:b.sequence+1}));return}const _=(k=d.find(([,b])=>lg(b.part)))==null?void 0:k[1].part;if((_==null?void 0:_.id)==="turn-recovery"){const b=dF((y=(v=_.state)==null?void 0:v.input)==null?void 0:y.recoveryAction);t(C=>({text:`${Ble()}${b?` ${b==="retry"?sle():Yce()}`:""}`,sequence:C.sequence+1}));return}if((_==null?void 0:_.id)==="turn-retry"){t(b=>({text:Uce(),sequence:b.sequence+1}));return}const p=d.filter(([,b])=>b.status==="error");if(p.length>0){const b=p.slice(0,2).map(([,C])=>If(C.part).label).join(", ");t(C=>({text:p.length===1?Cle({labels:b}):Rle({count:ln(p.length),labels:b}),sequence:C.sequence+1}));return}const m=d.filter(([,b])=>b.status==="running");if(m.length>0){const b=(x=m.at(-1))==null?void 0:x[1].part;t(C=>({text:b?qC(If(b)).label:_le(),sequence:C.sequence+1}));return}d.some(([,b])=>b.status==="completed")&&t(b=>({text:vle(),sequence:b.sequence+1}))},[e]),n}const yFn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:d,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:y,onOpenPlan:x,onOpenSubagent:b,recoveringTurnId:C,onRecover:N,skills:z}){var $,I,F;d_();const A=(($=GC(n))==null?void 0:$.id)??null,j=T.useMemo(()=>n.filter(q=>aFn(q,A)),[n,A]),M=T.useMemo(()=>{const q=j.filter(V=>V.role==="user"&&!V.id.startsWith(bf));return IRn(a,n,q,V=>V.startsWith(bf))},[n,j,a]),D=T.useRef(new Set),[L,B]=T.useState(!1),U=T.useCallback(q=>j[q].id,[j]),H=T.useCallback(q=>{if(L)return j.map((ie,oe)=>oe);const V=new Set(mC(q));return j.forEach((ie,oe)=>{D.current.has(ie.id)&&V.add(oe)}),[...V].sort((ie,oe)=>ie-oe)},[j,L]),Q=aF({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:U,estimateSize:()=>400,overscan:1,initialRect:{width:((I=t.current)==null?void 0:I.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var q;return Math.max(0,j.length*400-(((q=t.current)==null?void 0:q.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:H});T.useLayoutEffect(()=>{const q=()=>Q.scrollToEnd();return r.current=q,i(),()=>{r.current=null}},[Q,r,i]),T.useEffect(()=>{const q=()=>{var oe;const V=window.getSelection();if(!V||V.isCollapsed||!V.rangeCount)return;const ie=V.getRangeAt(0);for(const ce of((oe=t.current)==null?void 0:oe.querySelectorAll("[data-message-id]"))??[])ie.intersectsNode(ce)&&ce.dataset.messageId&&D.current.add(ce.dataset.messageId)};return document.addEventListener("selectionchange",q),()=>document.removeEventListener("selectionchange",q)},[t]);const K=j.at(-1),Z=bFn(n),ee=d?cF(n):null;return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f.jsx("span",{children:Z.text},Z.sequence)}),f.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":L,onClick:()=>B(q=>!q),children:V9e()}),f.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(q=>{var ne,G,ae,le,ge,be;const V=j[q.index],ie=V.parts.find(lg),oe=(G=(ne=ie==null?void 0:ie.state)==null?void 0:ne.input)==null?void 0:G.turnId,ce=ie?d||C!==null:!1;return f.jsx("div",{"data-index":q.index,"data-message-id":V.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:q.start},onClickCapture:Ee=>{!(Ee.target instanceof Element)||!Ee.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(V.id),onFocusCapture:()=>D.current.add(V.id),children:f.jsx(uFn,{message:V,forkCount:(ae=M.get(V.id))==null?void 0:ae.count,forkIndex:(le=M.get(V.id))==null?void 0:le.index,forkPrevId:(ge=M.get(V.id))==null?void 0:ge.prevId,forkNextId:(be=M.get(V.id))==null?void 0:be.nextId,forkDisabled:!o,branchDisabled:d,onFork:c,onSelectFork:u,activePermissionId:A,pendingTailToolId:(ee==null?void 0:ee.messageId)===V.id?ee.toolId:null,onOpenFile:_,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:y,onOpenPlan:x,onOpenSubagent:b,busy:ce,recoveringTurnId:oe===C?C:null,onRecover:N,skills:z,predictTextTail:d&&V===K&&V.role==="assistant"})},V.id)})})]})}),xFn=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function H4(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const wFn=[{id:"archived",label:jN,railLabel:jN},{id:"active",label:qbe,railLabel:fL},{id:"all",label:Xbe,railLabel:iL}];function kFn({value:e,onChange:n,grouping:t,onGroupingChange:r}){const{open:s,setOpen:i,ref:a}=ra();return f.jsxs("div",{className:"rail-filter relative inline-flex",ref:a,children:[f.jsx(At,{size:"small",className:"rail-filter-btn text-subtext",active:e!=="active",title:FN(),"aria-label":FN(),onClick:()=>i(o=>!o),children:f.jsx(L$,{size:15,className:"text-subtext"})}),s&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-40 p-1 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:[f.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:kin()}),["projects","list"].map(o=>f.jsxs(on,{size:"compact",className:"text-sm",onClick:()=>{r(o),i(!1)},children:[f.jsx("span",{children:o==="projects"?MS():Ain()}),t===o&&f.jsx(ti,{size:13})]},o)),f.jsx("div",{className:"my-1 border-t border-border"}),f.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:min()}),wFn.map(o=>f.jsxs(on,{size:"compact",className:"text-sm",onClick:()=>{n(o.id),i(!1)},children:[f.jsx("span",{children:o.label()}),e===o.id&&f.jsx(ti,{size:13})]},o.id))]})]})}const SFn=14,CFn=500,EFn=1200;function Iq({title:e,animate:n}){return n?f.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?f.jsx("span",{"aria-hidden":!0,children:t},r):f.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*SFn,CFn)}ms`},children:t},r))}):f.jsx(f.Fragment,{children:e})}function NFn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:d,setOpen:_,ref:p}=ra(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[w,k]=T.useState(!1),[v,y]=T.useState(""),x=T.useRef(null);function b(){var z;y(((z=e.title)==null?void 0:z.trim())||""),k(!0)}function C(){var A;const z=v.trim();k(!1),z&&z!==(((A=e.title)==null?void 0:A.trim())||"")&&o(z)}return T.useEffect(()=>{var z,A;w&&((z=x.current)==null||z.focus(),(A=x.current)==null||A.select())},[w]),f.jsxs("div",{ref:p,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] ps-2.5 pe-1.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${n?"active":""} ${t?"unread":""} ${d?"menu-open":""} ${w?"editing":""}`,title:`${Iu[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?J9e():""}`,onClick:()=>{w||(d?_(!1):a())},onKeyDown:z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),d?_(!1):a())},children:[e.parentSessionId&&!w&&f.jsx(JS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),w?f.jsx("input",{ref:x,className:"session-title-input","aria-label":GSe(),value:v,onChange:z=>y(z.target.value),onClick:z=>z.stopPropagation(),onBlur:C,onKeyDown:z=>{z.stopPropagation(),z.key==="Enter"?(z.preventDefault(),C()):z.key==="Escape"&&(z.preventDefault(),k(!1))}}):f.jsx("span",{className:"session-title",children:f.jsx(Iq,{title:m,animate:i!==void 0},i??"static")}),f.jsx("span",{className:"session-dot",children:r?f.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&f.jsx("span",{className:"unread-dot"})}),f.jsx("button",{className:"session-menu-btn",title:XN(),"aria-label":XN(),onClick:z=>{z.stopPropagation(),_(A=>!A)},children:f.jsx(ip,{size:14})}),d&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down session-menu",children:[f.jsx(on,{onClick:z=>{z.stopPropagation(),_(!1),b()},children:f.jsx("span",{children:cL()})}),f.jsx(on,{onClick:z=>{z.stopPropagation(),_(!1),c(!e.archived)},children:f.jsx("span",{children:e.archived?dNe():A0e()})}),f.jsx(on,{danger:!0,onClick:z=>{z.stopPropagation(),_(!1),u()},children:f.jsx("span",{children:oL()})})]})]})}const aM=[S$,D$,Xf,Bh],zFn=()=>[{title:v6e(),prompt:_6e()},{title:R6e(),prompt:C6e()},{title:V6e(),prompt:B6e()},{title:aCe(),prompt:J6e()}],q4=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],oM="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function jFn(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:ob(n,t,e.serviceTier),reasoningLevel:FI(n,t,e.reasoningLevel)}}function cM({projectId:e,projectName:n,contentLoading:t=!1,contentError:r=null,onRetryContent:s,railHeader:i,railOpen:a,onShowRail:o,onNewProject:c,mainView:u,onSelectMainView:d,onOpenFile:_,onOpenRun:p,runExperimentName:m,onOpenExperiment:w,experimentName:k,onOpenPlan:v,onOpenSubagent:y,runtime:x,onOpenDemoWelcome:b,composerFocusNonce:C=0,demoRunningRunId:N=null,activeSessionId:z,onActiveSessionChange:A,preferredAgent:j,onPreferredAgentChange:M,preferredAutonomy:D,onPreferredAutonomyChange:L,embedded:B=!1,onOpenSideChat:U,children:H}){var Xr,lc,ci,kp,A_,uc,fd;const Q=vn({mutationFn:J=>v3n(...J)}),K=vn({mutationFn:J=>h3n(...J)}),Z=vn({mutationFn:J=>g3n(...J)}),ee=vn({mutationFn:J=>m3n(...J)}),$=vn({mutationFn:J=>c3n(...J)}),I=vn({mutationFn:J=>_3n(...J)}),F=vn({mutationFn:J=>f3n(...J)}),q=vn({mutationFn:J=>d3n(...J)}),V=vn({mutationFn:n5}),ie=Vm(),{data:oe=[]}=ft({...Af(),enabled:!B}),{data:ce=[]}=ft({...wj(),enabled:!B}),[ne,G]=T.useState(()=>{try{return localStorage.getItem("sidebar-grouping")==="list"?"list":"projects"}catch{return"projects"}}),[ae,le]=T.useState(()=>{try{const J=JSON.parse(localStorage.getItem("sidebar-pinned-projects")??"[]");return Array.isArray(J)?J.filter(he=>typeof he=="string"):[]}catch{return[]}}),[ge,be]=T.useState("active"),[Ee,Fe]=T.useState(!1),Ye=T.useRef(null),[Me,Ue]=T.useState(0),[dt,wt]=T.useState(null),[Ft,Ht]=T.useState({});T.useLayoutEffect(()=>{const J=Ye.current;if(!J||B)return;const he=()=>Ue(J.clientHeight),Se=new ResizeObserver(he);return Se.observe(J),he(),()=>Se.disconnect()},[a,B,u]);const qt=new Map(ce.map(J=>[J.projectId,J.lastActivityAt])),$e=[...oe].sort((J,he)=>Number(ae.includes(he.id))-Number(ae.includes(J.id))||Math.max(qt.get(he.id)??0,he.updatedAt)-Math.max(qt.get(J.id)??0,J.updatedAt)),ot=ne==="list"||Ee?$e.length:Math.max(1,Math.ceil(Me/36));let Ce=$e.slice(0,ot);const me=oe.find(J=>J.id===e);me&&!Ce.some(J=>J.id===e)&&(Ce=[...Ce.slice(0,ot-1),me]);const ze=lD({queries:(ne==="projects"?Ce:[]).map(J=>({...pi(J.id),enabled:!B}))}),He=ZK({queryKey:Nt("listSidebarChatSessions",ge),queryFn:({pageParam:J,signal:he})=>p5n(ge,J,he),initialPageParam:null,getNextPageParam:J=>J.next??void 0,enabled:!B&&ne==="list"}),We=T.useMemo(()=>pi(e),[e]),{data:ct=nM}=ft(We),St=T.useCallback(J=>{ts(We.queryKey,he=>{if(!he)return;const Se=typeof J=="function"?J(he):J,xe=new Map(he.map(Le=>[Le.id,Le]));for(const Le of Se)xe.get(Le.id)!==Le&&_o(Ze,We.queryKey,Le.id),xe.delete(Le.id);for(const Le of xe.keys())_o(Ze,We.queryKey,Le);return Se})},[We]),Be=z,un=T.useRef(A);un.current=A;const Vt=T.useRef({projectId:e});Vt.current.projectId!==e&&(Vt.current={projectId:e});const[_n,Gt]=T.useState(new Set),[cn,Tt]=T.useState(""),[$t,Lr]=T.useState(!1),[mr,Gr]=T.useState(!1),[Jt,Gn]=T.useState([]),ls=T.useRef(0),ut=T.useRef({projectId:e,activeId:Be,mainView:u});(ut.current.projectId!==e||ut.current.activeId!==Be||ut.current.mainView!==u)&&(ut.current={projectId:e,activeId:Be,mainView:u});const[fn,yn]=T.useState([]),[Tn,Vn]=T.useState(null),dn=Be??`${e}:new`,Dn=T.useRef(new Map),Kn=T.useRef(r4);Kn.current={draft:cn,attachments:fn,annotations:Jt};const Et=e===c0&&!B&&ct.length>0&&ct.every(J=>J.sideParentSessionId||J2n[J.id]===J.activeLeafId)?uj:null,Rt=T.useRef(null);Et!==null&&Rt.current===null&&Be!==null&&(Rt.current=dn);const Pn=dn===Rt.current?Et:null;T.useLayoutEffect(()=>{const J=Dn.current.get(dn)??r4;return Kn.current=J,Tt(J.draft),yn(J.attachments),Gn(J.annotations),()=>{const he=WRn(Kn.current,Pn);he?Dn.current.set(dn,he):Dn.current.delete(dn)}},[dn,Pn]);const[rs,Wt]=T.useState(null),rr=T.useRef(Promise.resolve()),Wn=T.useRef(0),zr=T.useRef(0),[Es,Vr]=T.useState(null),gr=T.useRef(null),Qe=T.useRef(!1),pt=T.useRef(null),[pn,xn,Rn]=y5n(e,u==="chat"?Be:null),{data:_r=TFn}=ft(r_()),[sr,Ln]=T.useState(j);T.useEffect(()=>Ln(j),[j]);const[us,Ns]=T.useState({}),[Ir,Kr]=T.useState(b0),[Yo,Xc]=T.useState(null),ia=T.useRef(!1),Zl=T.useRef(null),[bi,Ii]=T.useState(null),zs=T.useRef(!1),kr=T.useRef(null),[Fs,yi]=T.useState(new Map),ri=T.useRef(new Map),xi=T.useRef(null),si=T.useRef(null),js=T.useRef(null),ss=T.useRef(!0),[Zo,aa]=T.useState(!0),vr=T.useRef(null),[wi,oa]=T.useState(!1),qa=ra(),Ua=T.useCallback(J=>{var he;ls.current+=1,Gn(Se=>[...Se,{id:`annotation-${ls.current}`,...J}]),(he=vr.current)==null||he.focus()},[]),ca=zPn(si,Ua);jPn(Jt,B?bPn:vPn),T.useEffect(()=>{oa(!1),ca.dismiss()},[Be,e,ca.dismiss]);const[ii,Ga]=T.useState(0),[la,Ws]=T.useState(!1),[ua,Yc]=T.useState(0),[or,Sr]=T.useState(0),_s=T.useRef(!1);function jr(J){if(!fs)return;if(!Si&&J.source==="command"&&lx(J.name)&&J.name!=="goal"){x_(J.name,cn,fs);return}const he=J.name.replace(/@u$/,"^").replace(/@p$/,"~"),Se=J.source==="command"?1:WR(he,vr.current),xe=WBn(cn,fs,he,Se);Tt(xe.text),window.requestAnimationFrame(()=>{var Le,yt;(Le=vr.current)==null||Le.focus(),(yt=vr.current)==null||yt.setSelectionRange(xe.cursor,xe.cursor),Sr(xe.cursor)})}function _a(J){if(ds)return!1;const he=J.selectionStart;if(_s.current||he!==J.selectionEnd)return!1;const Se=cn.slice(0,he).replace(/[ \t]+$/,"").length,xe=M4(cn,Se);if(!xe||xe.end!==Se||!No(xe.query)||he>Se&&he-Se!==WR(xe.query,J))return!1;const Le=KR(cn,{...xe,end:he});return Tt(Le.text),Sr(Le.cursor),window.requestAnimationFrame(()=>J.setSelectionRange(Le.cursor,Le.cursor)),!0}function Zc(J){Vn(null);let xe=fn.reduce((Le,yt)=>Le+yt.size,0);for(const Le of J){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Le.type))continue;if(Le.size>31457280){Vn(sme({name:Ae(Le.name)}));continue}if(xe+Le.size>41943040){Vn(_me());continue}xe+=Le.size;const yt=ut.current,gt=dn,sn=new FileReader;sn.onload=()=>{const Bt={dataUrl:sn.result,mediaType:Le.type,name:Le.name,size:Le.size};if(ut.current.projectId===yt.projectId&&ut.current.activeId===yt.activeId){yn(Ci=>[...Ci,Bt]);return}const Bn=Dn.current.get(gt)??r4;Dn.current.set(gt,{...Bn,attachments:[...Bn.attachments,Bt]})},sn.readAsDataURL(Le)}}function v_(J){const he=Array.from(J.clipboardData.items).filter(Se=>Se.kind==="file"&&(Se.type.startsWith("image/")||Se.type==="application/pdf")).map(Se=>Se.getAsFile()).filter(Se=>Se!==null);he.length>0&&(J.preventDefault(),Zc(he))}const Mt=ct.find(J=>J.id===Be),Jo=sr??A7n(_r),Hs=Mt?{harness:Mt.harness,model:us.model!==void 0?us.model:Mt.model,serviceTier:us.serviceTier!==void 0?us.serviceTier:Mt.serviceTier,permissionMode:us.permissionMode??Mt.permissionMode,reasoningLevel:us.reasoningLevel??Mt.reasoningLevel}:Jo?{...Jo,...us}:null,{data:ki=AFn}=ft(Q3n(Hs==null?void 0:Hs.harness,e)),_t=Hs?_r.find(J=>J.id===Hs.harness):void 0,Qt=_t==null?void 0:_t.options,fa=T.useMemo(()=>QBn(ki,Qt==null?void 0:Qt.planActivation),[ki,Qt==null?void 0:Qt.planActivation]),wo=XR(cn),Va=wo!==null,fs=M4(cn,or),Ka=(fs==null?void 0:fs.query)??null,Jl=Ka===null?[]:fa.filter(J=>VBn(J,Ka)),ds=!Va&&Ka!==null&&(fs==null?void 0:fs.end)===or&&Jl.length>0,ai=ds&&!la?Jl:[],ec=ai.length>0,ko=Math.min(ii,Math.max(0,ai.length-1));T.useEffect(()=>Ga(0),[Ka]);const mn=jFn(Hs,_t),eu=ly(_t,mn==null?void 0:mn.model),Jc=J=>{if(!mn)return;const he={...mn,...J},Se={};J.model!==void 0&&J.model!==mn.model&&(Se.model=J.model),J.serviceTier!==void 0&&J.serviceTier!==mn.serviceTier&&(Se.serviceTier=J.serviceTier),J.permissionMode!==void 0&&J.permissionMode!==mn.permissionMode&&(Se.permissionMode=J.permissionMode),J.reasoningLevel!==void 0&&J.reasoningLevel!==mn.reasoningLevel&&(Se.reasoningLevel=J.reasoningLevel),Kr(xe=>({...xe,...Se})),Ln(he),M(he).catch(()=>{}),Mt?Ns(xe=>({...xe,...J})):J.harness&&J.harness!==mn.harness&&Ns({})},Wr=T.useCallback(J=>{const he=rr.current.catch(()=>{}).then(()=>{if(!Un(We.queryKey))throw new DOMException("Workspace changed","AbortError");return J()});return rr.current=he.then(()=>{},()=>{}),he},[We]),$i=J=>{if(J==="plan"&&(_t==null?void 0:_t.id)==="claude-code"?(Kr(xe=>({...xe,permissionMode:J})),Ns(xe=>({...xe,permissionMode:J}))):(Ns(xe=>{const Le={...xe};return delete Le.permissionMode,Le}),Jc({permissionMode:J})),!Mt)return;const he=Mt.id,Se=++Wn.current;Wt(null),Wr(()=>Q.mutateAsync([he,J])).then(xe=>{St(Le=>Le.map(yt=>yt.id===xe.id?xe:yt)),Wn.current===Se&&Ns(Le=>{const yt={...Le};return delete yt.permissionMode,yt})}).catch(()=>{Wn.current===Se&&(Ns(xe=>{const Le={...xe};return delete Le.permissionMode,Le}),Wt(MNe()))})},sd=J=>Jc({reasoningLevel:J}),wn=J=>{if(!Mt){L(J);return}const he=Mt.id,Se=Mt.autonomy,xe=++Wn.current,Le=yt=>St(gt=>gt.map(sn=>sn.id===yt.id?yt:sn));Le({...Mt,autonomy:J}),Wt(null),Wr(()=>Z.mutateAsync([he,J])).then(yt=>{Le(yt),L(yt.autonomy)}).catch(()=>{St(yt=>yt.map(gt=>gt.id===he&>.autonomy===J?{...gt,autonomy:Se}:gt)),Wn.current===xe&&Wt(ENe())})},da=((Xr=Mt==null?void 0:Mt.goal)==null?void 0:Xr.trim())||"",So=(mn==null?void 0:mn.harness)==="claude-code"?mn.permissionMode==="plan":(Qt==null?void 0:Qt.planActivation)==="command"?Es??(Mt==null?void 0:Mt.planMode)??!1:!1;T.useEffect(()=>{Es===null||(Mt==null?void 0:Mt.planMode)!==Es||(gr.current=null,Vr(null))},[Mt==null?void 0:Mt.planMode,Es]);async function Wa(J){if(Kr(xe=>({...xe,planMode:J})),gr.current=J,Vr(J),!Mt)return;const he=Mt.id,Se=++zr.current;Wt(null);try{const xe=await Wr(()=>K.mutateAsync([he,J]));St(Le=>Le.map(yt=>yt.id===xe.id?xe:yt)),zr.current===Se&&(gr.current=null,Vr(null),Wt(null))}catch(xe){throw zr.current===Se&&(gr.current=null,Vr(null)),xe}}async function mp(){if((mn==null?void 0:mn.harness)==="claude-code"){$i("auto");return}if(Mt)try{await Wa(!1)}catch{Wt(Rge())}}async function id(){const J=!So;try{if((mn==null?void 0:mn.harness)==="claude-code")$i(J?"plan":"auto");else if((Qt==null?void 0:Qt.planActivation)==="command")await Wa(J);else throw new Error(k1())}catch{Wt(tz())}}function b_(J,he=""){var Se;switch(J){case"plan":return id(),!1;case"new":return B?Mt!=null&&Mt.sideParentSessionId&&(U==null||U(Mt.sideParentSessionId,"")):cc(),!1;case"resume":return oa(!0),!0;case"model":return Yc(xe=>xe+1),!0;case"compact":return od(),!1;case"goal":return tu(he),!1;case"side":return y_(he),!1;case"copy":{const xe=As.at(-1),Le=fr&&(xe==null?void 0:xe.role)==="assistant"&&!xe.completedAt,yt=HRn(Le?As.slice(0,-1):As);return yt?UC(yt):tn(Qve(),"info"),!1}case"export":{const xe=((Se=Mt==null?void 0:Mt.title)==null?void 0:Se.trim())||yv(),Le=Mt?qRn(xe,As,{user:Jge(),assistant:Iu[Mt.harness]}):null;return Le?cFn(URn(xe),Le):tn(nbe(),"info"),!1}}}function y_(J){B?tn(Lsn(),"info"):!Mt||!U?tn(jsn(),"info"):U(Mt.id,J)}async function ad(J){Wt(null);const he=Vt.current;try{const Se=await $.mutateAsync([e,J]);if(Ze.invalidateQueries({queryKey:KI().queryKey}),Vt.current!==he)return;St(xe=>[Se,...xe.filter(Le=>Le.id!==Se.id)]),be("all"),A(Se.id,{projectId:Se.projectId})}catch(Se){if(Vt.current!==he)return;Wt(K1e({error:Ae(Se instanceof Error?Se.message:String(Se))}))}}async function tu(J){var gt;const he=J.trim();if(!he){const sn=(gt=Mt==null?void 0:Mt.goal)==null?void 0:gt.trim();tn(sn?d1e({goal:Ml(sn)}):E1e(),"info");return}const Se=ut.current,xe=()=>ut.current.activeId===Se.activeId;Wt(null);let Le=Be;if(!Le){if(!(_t!=null&&_t.agentReady)||!mn){Wt(k1());return}try{Le=(await ac(mn,D4(Qt==null?void 0:Qt.planActivation,void 0,gr.current))).id}catch(sn){Wt(NN({error:Ae(sn instanceof Error?sn.message:String(sn))}));return}}const yt=/^(clear|none|off)$/i.test(he);try{const sn=await Wr(()=>ee.mutateAsync([Le,yt?null:he]));St(Bt=>Bt.map(Bn=>Bn.id===sn.id?sn:Bn)),tn(yt?a1e():M1e(),"success")}catch(sn){if(!xe())return;Wt(NN({error:Ae(sn instanceof Error?sn.message:String(sn))}))}}async function od(){const J=Be;if(!J){tn(Hve(),"info");return}if(fr){Wt(Gme());return}Wt(null),ge==="archived"&&be("active");const he=ut.current;try{const{message:Se}=await k3n(J);xn({type:"upsertMessage",sessionId:J,message:Se})}catch(Se){if(ut.current.activeId!==he.activeId)return;Wt(Zme({error:Ae(Se instanceof Error?Se.message:String(Se))}))}}function x_(J,he,Se){const xe=KR(he,Se);Tt(xe.text),Ws(!0),!b_(J)&&window.requestAnimationFrame(()=>{var Le,yt;(Le=vr.current)==null||Le.focus(),(yt=vr.current)==null||yt.setSelectionRange(xe.cursor,xe.cursor),Sr(xe.cursor)})}const ha=T.useCallback(async(J=!1)=>{const he=Vt.current;if(he.projectId!==e||!Un(We.queryKey))return null;const Se=(Ze.getQueryData(We.queryKey)??[]).map(xe=>xe.id);try{const xe=await Ze.fetchQuery({...We,...J?{staleTime:0}:{}});if(Vt.current!==he||!Un(We.queryKey))return null;const Le=xe.filter(gt=>!Ac.has(gt.id)),yt=new Set(Le.map(gt=>gt.id));for(const gt of Se)yt.has(gt)||Qs(gt);return ri.current=new Map(Le.map(gt=>[gt.id,gt.title])),Le}catch{return null}},[e]),tc=T.useCallback(async J=>{Vt.current.projectId!==e||!Un(We.queryKey)||await Promise.all([Ze.fetchQuery({...Rc(J),staleTime:0}),ha(!0)]).catch(()=>{})},[e,ha]);T.useEffect(()=>{const J=X$();Gt(e===c0?new Set([ay,oy].filter(Se=>!J.has(Se))):new Set),Lr(!1),Gr(!1),yi(new Map),ri.current=new Map,ha();const he=Vt.current;return()=>{Vt.current===he&&(Vt.current={projectId:e})}},[e,ha]),T.useEffect(()=>{Kr(b0),kr.current=null},[Be]),T.useEffect(()=>em(J=>{switch(J.type){case"session":{if(J.session.projectId!==e||Ac.has(J.session.id))return;const he=ri.current.has(J.session.id),Se=ri.current.get(J.session.id)!==J.session.title;ri.current.set(J.session.id,J.session.title),he&&Se&&J.session.titleSource==="generated"&&(yi(xe=>{const Le=new Map(xe);return Le.set(J.session.id,(xe.get(J.session.id)??0)+1),Le}),window.setTimeout(()=>{yi(xe=>{if(!xe.has(J.session.id))return xe;const Le=new Map(xe);return Le.delete(J.session.id),Le})},EFn));break}case"sessionDeleted":Qs(J.sessionId);break}}),[e]),T.useEffect(()=>em(J=>{J.type==="reconnected"&&ha(!0)}),[ha]);const el=Be?pn.messagesBySession[Be]??tM:tM,Co=Be?pn.activeLeafBySession[Be]??null:null;Zl.current=Co;const As=T.useMemo(()=>DRn(el,Co),[el,Co]),Bi=T.useRef({projectId:e,ids:pn.busySessions});T.useEffect(()=>{const J=Bi.current;Bi.current={projectId:e,ids:pn.busySessions},J.projectId===e&&Gt(he=>FRn(he,J.ids,pn.busySessions,ct,u==="chat"?Be:null))},[e,pn.busySessions,ct,Be,u]);const fr=Be?pn.busySessions.has(Be):!1,gp=!fr&&!!(_t!=null&&_t.agentReady),tl=fr&&cF(As)!=null,vp=fr&&PRn(As),Pi=Be?pn.queuedBySession[Be]??[]:[],nu=Pi.some(J=>J.dispatchState==="retrying"),w_=Pi.findIndex(J=>J.dispatchState==="blocked"),nc=Pi.reduce((J,he)=>he.dispatchState!=="retrying"||typeof he.nextRetryAt!="number"?J:J===null?he.nextRetryAt:Math.min(J,he.nextRetryAt),null),[bp,Eo]=T.useState(()=>Date.now());T.useEffect(()=>{if(!nu||nc===null||(Eo(Date.now()),nc<=Date.now()))return;const J=window.setInterval(()=>{const he=Date.now();Eo(he),he>=nc&&window.clearInterval(J)},1e3);return()=>window.clearInterval(J)},[nu,nc]),T.useEffect(()=>{const J=Pi.reduce((he,Se)=>Se.planMode??he,void 0);J!==void 0?(Qe.current=!0,gr.current=J,Vr(J)):Qe.current&&(Qe.current=!1,gr.current=null,Vr(null))},[Pi]);const Qa=!!Be&&Rn.isPending,pa=T.useMemo(()=>{const J=new Set;for(const he of pn.busySessions)(pn.messagesBySession[he]??[]).some(Se=>Se.parts.some(xe=>xe.type==="prompt"&&xe.prompt&&!xe.prompt.resolved&&xe.prompt.nativeId))&&J.add(he);return J},[pn.busySessions,pn.messagesBySession]),k_=Be?pa.has(Be):!1,ir=Mt,hs=ir?Fs.get(ir.id):void 0,qs=T.useMemo(()=>{var J;for(let he=As.length-1;he>=0;he--)for(const Se of As[he].parts)if(Se.type==="prompt"&&((J=Se.prompt)==null?void 0:J.kind)==="plan"&&!Se.prompt.resolved)return{promptId:Se.id,plan:Se.prompt.plan??"",synthesized:!!Se.prompt.synthesized};return null},[As]),Si=T.useMemo(()=>Be?$Rn(As,ir==null?void 0:ir.harness,pn.busySessions.has(Be)):null,[As,ir==null?void 0:ir.harness,Be,pn.busySessions]),Fi=Va&&!Si,No=J=>{if(Si||Va)return!1;const he=Nk(J),Se=fa.find(xe=>xe.name===PC(he??J));return!Se||Se.source!=="command"?!!Se:he&&O4(he)?he==="plan"||cn.trim().toLowerCase().startsWith(`/${J}`):cn.trim().toLowerCase()===`/${J}`},S_=T.useMemo(()=>fa.filter(J=>J.source!=="command"),[fa]),[Xa,C_]=T.useState(null),zo=Xa&&Xa.sessionId===Be?Xa:null;T.useEffect(()=>{if(!Xa)return;const J=pn.busySessions.has(Xa.sessionId),he=Xa.sessionId===Be&&qs&&qs.promptId!==Xa.promptId;(!J||he)&&C_(null)},[Xa,qs,pn.busySessions,Be]);const ru=T.useMemo(()=>GC(As),[As]),rc=fr&&!!(_t!=null&&_t.supportsSteering)&&!!(_t!=null&&_t.agentReady)&&!qs&&!Si&&!ru&&fn.length===0&&Jt.length===0,ma=T.useMemo(()=>v&&Be?(J,he,Se)=>v(J,Be,he,Se):void 0,[v,Be]),cd=T.useMemo(()=>y&&Be?(J,he,Se)=>y(Be,J,he,Se):void 0,[y,Be]),sc=T.useMemo(()=>_&&((J,he,Se,xe,Le)=>_(J,Be??void 0,he,Se,xe,Le)),[_,Be]);T.useEffect(()=>{Wn.current+=1,zr.current+=1;const J=(Be?pn.queuedBySession[Be]??[]:[]).reduce((he,Se)=>Se.planMode??he,void 0);Qe.current=J!==void 0,gr.current=J??null,Vr(J??null),Ns({}),Wt(null)},[Be]);const jo=u==="chat"&&(As.length>0||fr),nl=(mn==null?void 0:mn.harness)??null,su=(mn==null?void 0:mn.model)??null,Ya=Rn.data?null:Rn.error,E_=u==="chat"&&!B&&!jo&&!t&&!r&&!Qa&&!Ya,iu=ft({...k5n(e,nl??"claude-code",su,E()),enabled:E_&&nl!==null,subscribed:E_&&nl!==null}),Ts=(lc=iu.data)!=null&&lc.blank?zFn():((ci=iu.data)==null?void 0:ci.prompts)??null,Qn=nl!==null&&iu.isPending,au=e===c0?"demo":"project",yp=J=>{Tt(J),Ws(!1),window.requestAnimationFrame(()=>{const he=vr.current;he&&(he.focus(),he.setSelectionRange(J.length,J.length),Sr(J.length))})};T.useEffect(()=>{Pn&&(Tt(J=>J||Pn),Ws(!1),Sr(Pn.length))},[Pn]),T.useEffect(()=>{if(C===0)return;const J=window.requestAnimationFrame(()=>{const he=vr.current;he&&(he.focus(),he.setSelectionRange(he.value.length,he.value.length),he.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(J)},[C]);const rl=T.useId(),N_=e===c0&&cn===uj&&!$t,ar=T.useCallback(J=>{const he=J.scrollHeight-J.scrollTop-J.clientHeight<60;ss.current=he,aa(he)},[]),ps=T.useCallback(()=>{var J;ss.current=!0,aa(!0),(J=js.current)==null||J.call(js)},[]);T.useEffect(()=>{const J=xi.current,he=si.current;if(!J||!he)return;const Se=new ResizeObserver(()=>{var xe;ss.current?(xe=js.current)==null||xe.call(js):aa(J.scrollHeight-J.scrollTop-J.clientHeight<60)});return Se.observe(J),Se.observe(he),()=>Se.disconnect()},[jo]);const ic=T.useCallback(J=>{J.currentTarget.blur(),ps()},[ps]);async function ou({queue:J=!1}={}){var hd,To,Sp,Cp,ol,_c;const he=cn.trim(),Se=Si?null:XBn(he,Qt==null?void 0:Qt.planActivation);if(Se&&Se.name!=="plan"){Tt(O4(Se.name)?"":Se.prompt),Ws(!1),b_(Se.name,Se.prompt);return}if(Lu({name:"first_action",surface:au,action:"typed_prompt"}),zs.current)return;const xe=!!Se,Le=!So,yt=D4(Qt==null?void 0:Qt.planActivation,xe?Le:void 0,gr.current),gt=xe&&(_t==null?void 0:_t.id)==="claude-code"?Le?"plan":"auto":void 0,sn=Se?Se.prompt:he,Bt=fn,Bn=Jt,Ci=Bn.map(Fn=>({text:Fn.text})),to=e,no=u;let ro=Be;const so=()=>{const Fn=ut.current;return Un(We.queryKey)&&Fn.projectId===to&&Fn.activeId===ro&&Fn.mainView===no},lu=()=>{so()&&(Tt(Fn=>Fn||he),yn(Fn=>Fn.length?Fn:Bt),Gn(Fn=>Fn.length?Fn:Bn))};if(xe&&!sn&&Bt.length===0&&Bn.length===0){Tt(""),Ws(!1);try{if((_t==null?void 0:_t.id)==="claude-code")$i(Le?"plan":"auto");else if((Qt==null?void 0:Qt.planActivation)==="command")await Wa(Le);else throw new Error(k1())}catch{Wt(tz()),lu()}return}const as=mn?{...mn,...gt?{permissionMode:gt}:{}}:null;gt&&$i(gt);let dd=null;const ms=gr.current;xe&&(Qt==null?void 0:Qt.planActivation)==="command"&&(dd=++zr.current,gr.current=Le,Vr(Le));const Xn=()=>{!so()||dd===null||zr.current!==dd||(gr.current=ms,Vr(ms))};if(!sn&&Bt.length===0&&Bn.length===0)return;if((sn||Bn.length>0)&&Si&&Bt.length===0){Tt(""),Gn([]),eo({promptId:Si,answers:[],note:sn||void 0,annotations:Ci}).then(Fn=>{Fn||lu()});return}const Sn=JSON.stringify({text:sn,images:Bt.map(Fn=>({mediaType:Fn.mediaType,name:Fn.name,dataUrl:Fn.dataUrl})),annotations:Ci,settings:as?{model:as.model,serviceTier:as.serviceTier,permissionMode:as.permissionMode,planMode:yt,reasoningLevel:as.reasoningLevel}:null}),qi=((hd=kr.current)==null?void 0:hd.signature)===Sn?kr.current.id:`ct_${crypto.randomUUID()}`;if(kr.current={signature:Sn,id:qi},fr){if(!Be||!(_t!=null&&_t.agentReady)){Xn();return}const Fn=Be;Tt(""),yn([]),Gn([]),Vn(null);const ga=as?{model:as.model,serviceTier:as.serviceTier,permissionMode:as.permissionMode,planMode:(Qt==null?void 0:Qt.planActivation)==="command"?yt??(Mt==null?void 0:Mt.planMode):yt,reasoningLevel:as.reasoningLevel}:{};so()&&Ns({});const Ro=Bt.map(Cr=>({mediaType:Cr.mediaType,dataBase64:Cr.dataUrl.slice(Cr.dataUrl.indexOf(",")+1),name:Cr.name}));try{(To=(await Wr(()=>r5(Fn,sn,ga,Ro.length?Ro:void 0,Ci,qi,rc&&!J&&!xe?"steer":void 0))).turn)!=null&&To.existing&&await tc(Fn),so()&&Kr(b0),((Sp=kr.current)==null?void 0:Sp.id)===qi&&(kr.current=null)}catch{Xn(),lu()}return}if(!(_t!=null&&_t.agentReady)){Xn();return}if(!as){Xn();return}let $r=Be;try{Tt(Yn=>Yn===cn?"":Yn),yn(Yn=>Yn===Bt?[]:Yn),Gn(Yn=>Yn===Bn?[]:Yn),Vn(null),zs.current=!0;try{if(!$r){const io=await ac(as,yt);$r=io.id,ro=io.id}if(!Un(We.queryKey))return;const Yn=Rc($r);await Ze.fetchQuery({...Yn,...((Cp=Ze.getQueryState(Yn.queryKey))==null?void 0:Cp.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{zs.current=!1}if(!Un(We.queryKey))return;xn({type:"optimisticUser",sessionId:$r,text:sn||U0e(),attachments:Bt.map(Yn=>({url:Yn.dataUrl,mediaType:Yn.mediaType,name:Yn.name})),annotations:Bn}),xn({type:"busy",sessionId:$r,busy:!0}),so()&&ps(),so()&&ge==="archived"&&be("active");const Fn=as?{model:as.model,serviceTier:as.serviceTier,permissionMode:as.permissionMode,planMode:yt,reasoningLevel:as.reasoningLevel}:{};so()&&Ns({});const ga=Bt.map(Yn=>({mediaType:Yn.mediaType,dataBase64:Yn.dataUrl.slice(Yn.dataUrl.indexOf(",")+1),name:Yn.name})),Ro=$r;if(!Ro)throw new Error(B9e());(ol=(await Wr(()=>r5(Ro,sn,Fn,ga.length?ga:void 0,Ci,qi))).turn)!=null&&ol.existing&&await tc(Ro),so()&&Kr(b0),((_c=kr.current)==null?void 0:_c.id)===qi&&(kr.current=null)}catch(Fn){if(!Un(We.queryKey)||(lu(),Xn(),!$r))return;const ga=Fn instanceof Error?Fn.message:String(Fn);if(!/session is busy/i.test(ga)&&await Ze.fetchQuery({...pi(e),staleTime:0}).then(Cr=>{var Ui;return!!((Ui=Cr.find(Yn=>Yn.id===$r))!=null&&Ui.busy)}).catch(()=>!1)){so()&&(Tt(Cr=>Cr===sn?"":Cr),yn(Cr=>Cr===Bt?[]:Cr),Gn(Cr=>Cr===Bn?[]:Cr));return}xn({type:"busy",sessionId:$r,busy:!1}),xn({type:"localError",sessionId:$r,text:ove({error:Ae(ga)})})}}async function ac(J,he){const Se=ut.current,xe=Vt.current,Le=await I.mutateAsync([e,J.harness,{model:J.model,serviceTier:J.serviceTier,permissionMode:J.permissionMode,planMode:he,reasoningLevel:J.reasoningLevel,autonomy:D}]);return Vt.current===xe&&(St(yt=>[Le,...yt.filter(gt=>gt.id!==Le.id)]),Ze.getQueryData(We.queryKey)||ha(!0)),Vt.current===xe&&ut.current===Se&&(un.current(Le.id,{replace:!0}),ut.current={...Se,activeId:Le.id}),Le}function sl(){const J=lPn(cn);Tt(J),window.requestAnimationFrame(()=>{var he,Se;(he=vr.current)==null||he.focus(),(Se=vr.current)==null||Se.setSelectionRange(J.length,J.length),Sr(J.length)})}async function Rs(){const J=wo;if(!J)return;if(Wt(null),fr){Wt(vme());return}const he=cn,Se=ut.current;let xe=Be;const Le=()=>{const Bt=ut.current;return Bt.projectId===Se.projectId&&Bt.activeId===xe&&Bt.mainView===Se.mainView},yt=()=>{Le()&&Tt(Bt=>Bt||he)};Tt(""),Ws(!1);let gt=Be;if(!gt){if(!(_t!=null&&_t.agentReady)||!mn){yt(),Wt(k1());return}try{const Bt=D4(Qt==null?void 0:Qt.planActivation,void 0,gr.current);gt=(await ac(mn,Bt)).id,xe=gt,Le()&&Ns({})}catch(Bt){yt();const Bn=Bt instanceof Error?Bt.message:String(Bt);Le()&&Wt(CN({error:Ae(Bn)}));return}}Le()&&ge==="archived"&&be("active");const sn=`${bf}shell-${Date.now()}`;xn({type:"localShell",sessionId:gt,id:sn,command:J}),Le()&&ps();try{const{message:Bt}=await S3n(gt,J);xn({type:"upsertMessage",sessionId:gt,message:Bt})}catch(Bt){const Bn=Bt instanceof Error?Bt.message:String(Bt);xn({type:"localShell",sessionId:gt,id:sn,command:J,error:CN({error:Ae(Bn)})})}}function Ms(){Be&&z3n(Be).catch(()=>{Wt(yEe())})}const oc=T.useCallback(async(J,he)=>{if(!(!Be||ia.current)){ia.current=!0,Wt(null),Xc(J);try{const Se=KRn({model:Ir.model,serviceTier:Ir.serviceTier,permissionMode:Ir.permissionMode,planMode:Ir.planMode,reasoningLevel:Ir.reasoningLevel}),xe=Be;(await C3n(xe,J,he,Se)).turn.existing&&await tc(xe),Kr(b0)}catch{Wt(R8e())}finally{ia.current=!1,Xc(null)}}},[Be,Ir,tc]),il=T.useCallback((J,he)=>{if(!Be||fr||!(_t!=null&&_t.agentReady))return;const Se=Be;xn({type:"busy",sessionId:Se,busy:!0}),ps(),Wr(()=>E3n(Se,J,he)).catch(xe=>{xn({type:"busy",sessionId:Se,busy:!1});const Le=xe instanceof Error?xe.message:String(xe);xn({type:"localError",sessionId:Se,text:V8e({error:Ae(Le)})})})},[Be,fr,_t==null?void 0:_t.agentReady,ps,Wr]),is=T.useCallback(J=>{if(!Be||fr)return;const he=Be,Se=Zl.current;xn({type:"activeLeaf",sessionId:he,leafId:J}),Wr(()=>N3n(he,J)).catch(xe=>{xn({type:"activeLeaf",sessionId:he,leafId:Se});const Le=xe instanceof Error?xe.message:String(xe);xn({type:"localError",sessionId:he,text:NEe({error:Ae(Le)})})})},[Be,fr,Wr]);function al(J){if(!Be)return;const he=Be;y3n(he,J).then(({removed:Se})=>{if(Se)return tc(he)}).catch(()=>Wt(B8e()))}async function ld(J){if(!Be||bi)return;const he=Be;Wt(null),Ii(J);try{await x3n(he,J),await tc(he)}catch{Wt(a9e())}finally{Ii(null)}}const Za=T.useRef(!1);T.useEffect(()=>{const J=he=>{Za.current=H4(he.target)};return document.addEventListener("pointerdown",J,!0),()=>document.removeEventListener("pointerdown",J,!0)},[]),T.useEffect(()=>{if(!fr||u!=="chat")return;function J(he){var xe;he.key!=="Escape"||he.defaultPrevented||(he.target===document.body?Za.current:H4(he.target))!==B||(he.preventDefault(),Ms(),(xe=vr.current)==null||xe.focus())}return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[fr,Be,u,B]);function Qs(J){sy(J),Dn.current.delete(J),Rt.current===J&&(Rt.current=null),ut.current.projectId===e&&ut.current.activeId===J&&ut.current.mainView==="chat"&&(Tt(""),yn([]),Gn([]),un.current(null,{replace:!0})),Gt(he=>{if(!he.has(J))return he;const Se=new Set(he);return Se.delete(J),Se}),ri.current.delete(J)}function Ao(J,he){const Se=pi(J.projectId);_o(Ze,Se.queryKey,J.id),ts(Se.queryKey,xe=>xe==null?void 0:xe.map(Le=>Le.id===J.id?{...Le,...he}:Le))}function Ja(J,he){const Se=J.archived;Ao(J,{archived:he}),F.mutateAsync([J.id,he]).catch(()=>{Ao(J,{archived:Se})})}function Hi(J,he){const Se=J.title;Ao(J,{title:he}),q.mutateAsync([J.id,he]).catch(()=>{Ao(J,{title:Se})})}async function ud(J){var Se;const he=((Se=J.title)==null?void 0:Se.trim())||yv();if(window.confirm(vge({title:Ml(he)}))){try{await V.mutateAsync(J.id)}catch(xe){tn(Cge({title:Ml(he),error:Ae(xe instanceof Error?xe.message:String(xe))}),"error");return}Qs(J.id)}}const eo=T.useCallback(J=>{if(!Be)return Promise.resolve(!1);const he=Be;return xn({type:"busy",sessionId:he,busy:!0}),Wr(()=>j3n(he,J)).then(()=>!0).catch(()=>!1).finally(()=>{Un(We.queryKey)&&(Ze.fetchQuery({...Rc(he),staleTime:0}).catch(()=>{}),Ze.fetchQuery({...pi(e),staleTime:0}).catch(()=>{}))})},[Be,e,Wr,We]),z_=/Mac|iPhone|iPad/.test(navigator.platform),xp=z_?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",wp=z_?"⌘ Enter":"Ctrl + Enter",_d=T.useCallback(()=>{be("active"),A(null)},[A]),cc=T.useCallback(async()=>{try{const he=(await Ze.fetchQuery({...wj(),staleTime:0})).reduce((Se,xe)=>!Se||xe.lastActivityAt>Se.lastActivityAt?xe:Se,void 0);be("active"),A(null,{projectId:(he==null?void 0:he.projectId)??e})}catch(J){tn(J instanceof Error?J.message:String(J),"error")}},[e,A]),j_=T.useCallback(J=>{be("all"),A(J)},[A]);T.useEffect(()=>{if(B)return;const J=he=>{he.repeat||he.key!=="Enter"||!he.metaKey&&!he.ctrlKey||he.altKey||!he.shiftKey||H4(he.target)||(he.preventDefault(),cc())};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[cc,B]);const Y=[];if(ne==="projects"&&Ce.forEach((J,he)=>{const Se=ze[he],Le=(J.id===e?ct:Se.data??nM).filter(Bt=>!Bt.sideParentSessionId&&(xFn(ge,Bt.archived)||Bt.id===Be)).sort((Bt,Bn)=>Bn.updatedAt-Bt.updatedAt),yt=Ft[J.id]??6;let gt=Le.slice(0,yt);const sn=Le.find(Bt=>Bt.id===Be);sn&&!gt.some(Bt=>Bt.id===Be)&&(gt=[...gt.slice(0,yt-1),sn]),ne==="projects"&&Y.push({kind:"project",project:J}),gt.forEach(Bt=>Y.push({kind:"chat",project:J,session:Bt})),Le.length>yt&&Y.push({kind:"more",project:J}),!gt.length&&(ne==="projects"||Se.isPending||Se.error)&&Y.push({kind:"status",project:J,pending:Se.isPending,error:!!Se.error,retry:()=>{Se.refetch()}})}),ne==="list"){const J=((kp=He.data)==null?void 0:kp.pages.flatMap(xe=>xe.sessions))??[],he=ct.find(xe=>xe.id===Be);he&&!J.some(xe=>xe.id===he.id)&&J.push(he),J.filter(xe=>!Ac.has(xe.id)).sort((xe,Le)=>Le.updatedAt-xe.updatedAt).forEach(xe=>{const Le=oe.find(yt=>yt.id===xe.projectId);Le&&Y.push({kind:"chat",project:Le,session:xe})});const Se=me??oe[0];Se&&(!Y.length||He.isFetchingNextPage||He.isError)&&Y.push({kind:"status",project:Se,pending:He.isPending||He.isFetchingNextPage,error:He.isError,retry:()=>{He.isFetchNextPageError?He.fetchNextPage():He.refetch()}})}const _e=ne==="list"||Ee,we=CT(Y,Me,Be),Te=we.lengthJ+B0(he),0),zt=J=>J.kind==="chat"?J.session.id:`${J.kind}:${J.project.id}`,In=aF({count:Y.length,getScrollElement:()=>Ye.current,getItemKey:J=>zt(Y[J]),estimateSize:J=>B0(Y[J]),overscan:5,rangeExtractor:J=>{const he=mC(J),Se=Y.findIndex(xe=>zt(xe)===dt);return Se<0||he.includes(Se)?he:[...he,Se].sort((xe,Le)=>xe-Le)},enabled:_e&&a&&!B}),Qr=In.getVirtualItems(),Xs=((A_=Qr.at(-1))==null?void 0:A_.index)??-1;T.useEffect(()=>{ne==="list"&&a&&!B&&Xs>=Y.length-6&&He.hasNextPage&&!He.isFetching&&!He.isError&&He.fetchNextPage()},[ne,a,B,Xs,Y.length,He.hasNextPage,He.isFetching,He.isError,He.fetchNextPage]);const Us=f.jsxs("aside",{className:"session-rail w-75 shrink-0 flex flex-col mt-5 mac-titlebar:mt-8 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:pt-0 [&_.rail-body]:pb-0 [&_.rail-body]:ps-2 [&_.rail-body]:pe-1 border border-border rounded-lg overflow-visible shadow-elevated",children:[i,f.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[f.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":xp,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:cc,children:[f.jsx(Qf,{size:15}),D3()]}),f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${u==="skills"?"active":""}`,onClick:()=>d("skills"),children:[f.jsx(k$,{size:15}),D2e()]}),FBn.map(J=>f.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${u!=="chat"&&u!=="skills"&&J.activeTabs.includes(u)?"active":""}`,"data-onboarding":J.id==="compute"?"nav-compute":void 0,onClick:()=>d(J.id),children:[J.icon,J.label()]},J.id))]}),f.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[f.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:ne==="projects"?MS():iL()}),f.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[c&&f.jsx(Jm,{interactive:!0,content:tb(),className:"rounded-sm",children:f.jsx(At,{size:"small",className:"text-subtext","aria-label":tb(),onClick:c,children:f.jsx(_6n,{size:15,className:"text-subtext"})})}),f.jsx(kFn,{value:ge,onChange:be,grouping:ne,onGroupingChange:J=>{G(J);try{localStorage.setItem("sidebar-grouping",J)}catch{}Fe(!1),Ht({}),Ye.current&&(Ye.current.scrollTop=0)}})]})]}),f.jsxs("div",{className:"relative flex-1 min-h-0",children:[f.jsx("div",{ref:Ye,tabIndex:-1,className:`rail-body h-full overflow-x-hidden ${_e?"overflow-y-auto":"overflow-y-hidden"}`,children:f.jsxs("div",{className:"relative",style:{height:(_e?In.getTotalSize():nt)+(it?38:0)+(Ee?46:0)},children:[(_e?Qr.map(J=>({row:Y[J.index],top:J.start,index:J.index})):De.map((J,he)=>({row:J,top:0,index:he}))).map(({row:J,top:he,index:Se})=>{var yt;const xe=J.project,Le=J.kind==="chat"?J.session:null;return f.jsx("div",{"data-index":Se,onFocusCapture:()=>wt(zt(J)),onBlurCapture:gt=>{gt.currentTarget.contains(gt.relatedTarget)||wt(null)},className:_e?"absolute top-0 start-0 w-full":"relative",style:{height:B0(J),transform:_e?`translateY(${he}px)`:void 0},children:J.kind==="project"?f.jsx("div",{className:"group h-9 flex items-end gap-1 rounded-md px-2.5 text-text",children:f.jsx(vRn,{project:xe,chatCount:(yt=ce.find(gt=>gt.projectId===xe.id))==null?void 0:yt.totalAgents,pinned:ae.includes(xe.id),onPin:()=>{const gt=ae.includes(xe.id)?ae.filter(sn=>sn!==xe.id):[...ae,xe.id];le(gt);try{localStorage.setItem("sidebar-pinned-projects",JSON.stringify(gt))}catch{}},onRemoved:()=>{xe.id===e&&ie({to:"/projects"})},onNewChat:()=>{xe.id===e?_d():ie({to:"/projects/$projectId/tasks/new",params:{projectId:xe.id}})}})}):Le?f.jsx("div",{className:ne==="projects"?"ms-5.5":void 0,children:f.jsx(NFn,{session:Le,active:Le.id===Be&&u==="chat",unread:_n.has(Le.id),busy:xe.id===e?pn.busySessions.has(Le.id):Le.busy,waiting:pa.has(Le.id),revealTitle:Fs.get(Le.id),onOpen:()=>{if(xe.id===e?A(Le.id):ie({to:"/projects/$projectId/tasks/$sessionId",params:{projectId:xe.id,sessionId:Le.id}}),xe.id===c0){l7n(Le.id);const gt=Z2n[Le.id];gt&&(Lu({name:"demo_experiment_started",kind:"curated",experiment:gt}),Lu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:gt=>Hi(Le,gt),onSetArchived:gt=>Ja(Le,gt),onDelete:()=>void ud(Le)},Le.id)}):J.kind==="more"?f.jsx(Oe,{variant:"ghost",size:"small",className:"ms-5.5 font-normal text-subtext",onClick:()=>{Fe(!0),Ht(gt=>({...gt,[xe.id]:(gt[xe.id]??6)+6}))},children:I3()}):J.kind==="status"&&f.jsx("div",{className:`flex h-full items-center px-2.5 text-sm text-subtext ${ne==="projects"?"ms-5.5":""}`,children:J.error?f.jsx(Oe,{size:"small",onClick:J.retry,children:Ks()}):J.pending?f.jsx(Ct,{}):ge==="archived"?zve():Dve()})},zt(J))}),it&&f.jsx("div",{className:"absolute start-0 flex h-9.5 w-full items-center pt-1",style:{top:_e?In.getTotalSize():nt},children:f.jsx(Oe,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Fe(!0)},children:I3()})}),Ee&&f.jsx("div",{className:"absolute start-0 w-full pt-1",style:{top:In.getTotalSize()+(it?38:0)},children:f.jsx(Oe,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Fe(!1),Ht({}),wt(null),Ye.current&&(Ye.current.scrollTop=0,Ye.current.focus())},children:zS()})})]})}),_e&&f.jsxs(f.Fragment,{children:[(In.scrollOffset??0)>0&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 z-5 h-3 bg-linear-to-b from-background to-transparent"}),f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-5 h-3 bg-linear-to-t from-background to-transparent"})]})]}),f.jsx(jB,{runtime:x})]}),oi="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",cu=!a&&!B&&f.jsx(At,{title:YN(),"aria-label":YN(),onClick:o,className:"mac-titlebar:ms-16",children:f.jsx(M$,{size:20})});return u!=="chat"?f.jsxs(f.Fragment,{children:[a&&Us,f.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!a&&f.jsx("div",{className:"flex h-12 shrink-0 items-center",children:cu}),f.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:r?f.jsxs("div",{role:"alert",className:"p-6 text-subtext",children:[r,f.jsx(Oe,{onClick:s,children:Ks()})]}):t?f.jsxs(Ur,{className:"p-6",children:[f.jsx(Ct,{}),qN()]}):H})]})]}):f.jsxs(f.Fragment,{children:[a&&Us,f.jsxs("section",{"data-side-chat":B||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${B?"":"mt-5"}`,children:[f.jsxs("div",{className:a||B?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[cu,f.jsxs("div",{className:oi,children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:ir&&f.jsxs(f.Fragment,{children:[(uc=ir.title)!=null&&uc.trim()?f.jsx(sm,{variant:"header",className:"flex-initial",title:ir.title.trim(),children:f.jsx(Iq,{title:ir.title.trim(),animate:hs!==void 0},hs??"static")}):fr?f.jsx(Ct,{}):null,f.jsx("span",{className:"min-w-0 truncate rounded-md border border-border bg-surface px-2.5 py-0.5 text-sm font-normal text-subtext",title:n,children:n})]})}),b&&f.jsx(At,{"data-tip":zN(),"aria-label":zN(),onClick:b,children:f.jsx($Sn,{size:15})})]})]}),r?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:r}),f.jsx(Oe,{onClick:s,children:Ks()})]}):Ya?f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[f.jsx("p",{children:Ya.message}),f.jsx(Oe,{onClick:()=>void Rn.refetch(),children:Ks()})]}):t||Qa?f.jsx("div",{className:"chat-loading flex-1 min-h-0 overflow-hidden [scrollbar-gutter:stable_both-edges]",role:"status","aria-label":qN(),"aria-busy":"true",children:f.jsxs("div",{"aria-hidden":"true",className:"mx-auto flex h-full w-full max-w-readable flex-col gap-6 px-4 pb-8 pt-4 motion-safe:animate-pulse",children:[f.jsx("div",{className:"ms-auto h-14 w-3/5 shrink-0 rounded-lg bg-surface"}),f.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-5/6","w-full","w-11/12","w-2/3","w-full","w-3/4","w-1/2"].map((J,he)=>f.jsx("div",{className:`h-3 rounded bg-surface ${J}`},he))}),f.jsx("div",{className:"ms-auto h-10 w-2/5 shrink-0 rounded-lg bg-surface"}),f.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-full","w-11/12","w-3/4","w-5/6","w-1/2","w-full","w-5/6","w-11/12","w-2/3","w-3/4","w-1/3"].map((J,he)=>f.jsx("div",{className:`h-3 rounded bg-surface ${J}`},he))}),f.jsx("div",{className:"ms-auto h-16 w-1/2 shrink-0 rounded-lg bg-surface"})]})}):!jo&&(ir!=null&&ir.sideParentSessionId)?f.jsxs("div",{className:"chat-empty flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center text-subtext",children:[f.jsx(tm,{size:22}),f.jsx("p",{className:"m-0 text-balance",children:wsn()})]}):jo?f.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:xi,tabIndex:0,role:"region","aria-label":((fd=ir==null?void 0:ir.title)==null?void 0:fd.trim())||yv(),onScroll:J=>{ar(J.currentTarget),ca.dismiss()},children:f.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:si,children:[f.jsx(tq,{projectId:e,sessionId:Be,children:f.jsx(yFn,{scrollRef:xi,scrollToEndRef:js,stickToBottom:ss,onPinToBottom:ps,messages:As,allMessages:el,canFork:gp,onFork:il,onSelectFork:is,busy:fr,onOpenFile:sc,onOpenRun:p,onOpenSpawnedSession:j_,runExperimentName:m,onOpenExperiment:w,experimentName:k,onRespond:eo,onOpenPlan:ma,onOpenSubagent:cd,recoveringTurnId:Yo,onRecover:oc,skills:S_},Be)}),fr&&k_&&f.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:d7e()}),fr&&!k_&&!tl&&!vp&&f.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:f.jsx("span",{className:"tool-running-shimmer",children:FEe()})})]})}):f.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[f.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:f.jsx(vy,{})}),f.jsx("h2",{children:y7e()}),Qn&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:oM,"aria-hidden":"true",children:aM.map((J,he)=>f.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${q4[he].box}`,children:[f.jsxs("span",{className:`flex w-full items-center gap-2.5 ${q4[he].icon}`,children:[f.jsx(J,{size:17}),f.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),f.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},he))}),f.jsxs(Ur,{className:"mt-3",role:"status",children:[f.jsx(Ct,{}),f.jsx("span",{children:dCe()})]})]}),Ts&&Ts.length>0&&f.jsx("div",{className:oM,role:"group","aria-label":yCe(),children:Ts.map((J,he)=>{const Se=aM[he],xe=q4[he];return f.jsxs("button",{type:"button",className:`flex min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background px-5 py-4 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${xe.box}`,onClick:()=>{Lu({name:"project_starter_clicked",slot:he+1}),Lu({name:"first_action",surface:au,action:"starter_click"}),yp(J.prompt)},children:[f.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[f.jsx(Se,{size:17,className:xe.icon}),J.title]}),f.jsx("span",{className:"w-full truncate text-sm text-subtext",children:J.prompt})]},he)})})]}),ca.action&&f.jsxs(Oe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:ca.action.x,top:ca.action.top,transform:"translateX(-50%)"},onMouseDown:J=>J.preventDefault(),onClick:ca.add,children:[f.jsx(R$,{size:14}),kye()]}),f.jsxs("div",{inert:t||!!r||Qa,className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[jo&&f.jsx(At,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${Zo?"opacity-0":"opacity-100"}`,title:ez(),"aria-label":ez(),inert:Zo,onClick:ic,children:fr&&!k_?f.jsx(ip,{size:18,className:"tool-running-shimmer-icon"}):f.jsx(xSn,{size:16})}),qs&&!(zo&&qs.promptId===zo.promptId)&&f.jsx(K$n,{synthesized:qs.synthesized,agentLabel:ir?Iu[ir.harness]:OEe(),showResumeModes:(ir==null?void 0:ir.harness)==="claude-code",onView:J=>ma==null?void 0:ma(qs.plan,qs.promptId,J),onApprove:J=>eo({promptId:qs.promptId,approve:!0,...J?{resumeMode:J}:{}}),onReject:()=>eo({promptId:qs.promptId,approve:!1}),onRevise:J=>{Be&&C_({sessionId:Be,promptId:qs.promptId}),eo({promptId:qs.promptId,approve:!1,note:J})}}),Pi.length>0&&f.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Pi.map((J,he)=>f.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:J.error?`${J.text} +`).trim()}function oFn(e){const n=e.changes;if(!Array.isArray(n))return null;for(const t of n){if(!t||typeof t!="object"||!("path"in t)||typeof t.path!="string")continue;const r="kind"in t?t.kind:null,s=r&&typeof r=="object"&&"type"in r&&typeof r.type=="string"?r.type:null;return{path:t.path,type:s}}return null}function cFn(e){const n=e.trim(),t=n.match(/^\/bin\/(?:ba|z)?sh\s+-lc\s+([\s\S]+)$/);let r=((t==null?void 0:t[1])??n).trim();return r=yMn(r),Eq(r)}function Eq(e){return uFn(e).replace(/[\t\r ]+/g," ").trim()}function lFn(e){let n=null,t=!1;for(let r=0;r!i.startsWith("-")&&i.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&zq(s)?{ref:r,path:s}:null}function dFn(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function rM(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const i of n.split("/"))if(!(!i||i===".")){if(i===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(i);continue}r.push(i)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function hFn(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const c=rM(s,o);if(!c)return null;s=c}return s?rM(s,e):e}const yc="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",pFn=new RegExp(`\\bchat_(${yc})\\b`,"gi"),xf=`(?:${yc}|[0-9a-f]{8})`;function fh(e){const n=[];let t="",r="",s=null,i=!1;const a=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=u=>{let d=1,f=null,p=!1;for(let m=u;m{let d=!1;for(let f=u;fxMn(t.raw,n))}function lo(e,n){return fx(e,n).length>0}function mFn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,Sq).matchAll(pFn))if(n.add(t[0].toLowerCase()),n.size>=u_)break;return[...n]}function Tk(e,n){if(!e)return[];const t=new Set,r=e.slice(0,Sq),s=n==="runs"?[new RegExp(`/runs/(${yc})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${yc})`,"gi"),new RegExp(`^\\s*RUN\\s+(${yc})\\b`,"gim"),new RegExp(`={3,}\\s*(${yc})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${yc})`,"gi"),new RegExp(`^\\s*id:\\s*(${yc})`,"gim"),new RegExp(`={3,}\\s*(${yc})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=u_)return[...t];const i=new RegExp(`^\\s*(${yc})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=u_)break;return[...t]}function Aq(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),i=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,i+r.raw.length),{invocation:r,offset:Math.max(0,i)}})}function Tq(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let i="";for(const a of e.matchAll(s)){if((a.index??0)>=t)break;i=a[1]??a[2]??a[3]??""}return[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function Rq(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let i="";for(const a of e.matchAll(s)){const o=a.index??0;if(o>=t)break;const c=o+a[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function gFn(e,n,t=[],r=[]){const s=fx(e,"logs"),i=new Set;if(s.length===0){if(!lo(e,"logs"))return[];const o=t.length>0?[]:Tk(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=u_)break;return _h([...i])}let a=!1;for(const{invocation:o,offset:c}of Aq(e,s)){const u=dm(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const d=u.slice(1);let f=null;for(let v=0;v0?[]:Tk(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=u_)break}return _h([...i])}function qd(e,n,t=[],r=[]){const s=fx(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of Aq(e,s)){const u=dm(o.raw),d=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;d&&new RegExp(`^${xf}$`,"i").test(d)&&(i.add(d),f=!0);const p=d?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(d):null;if(p){const m=p[1],w=Tq(e,m,c,xf);if(w.length>0){for(const v of w)i.add(v);f=!0}const k=Rq(e,m,c,xf);for(const v of k)i.add(v);k.length>0&&(f=!0)}f||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:Tk(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=u_)break}return _h([...i])}const sM=new WeakMap;function If(e){const n=E(),t=sM.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=vFn(e);return sM.set(e,{locale:n,activity:r}),r}function vFn(e){var y,x,b,C,N,z;const n=e.tool??"tool",t=((y=e.state)==null?void 0:y.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=di(i,"command","cmd"),o=aFn(i,"commandArgv"),c=((x=e.state)==null?void 0:x.output)||((b=e.state)==null?void 0:b.error),u=_h(P4(i,"targetIds")),d=_h(P4(i,"runTargetIds")),f=_h(P4(i,"experimentTargetIds")),p=di(i,"filePath","file_path","notebookPath","notebook_path","path"),m=di(i,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),k=w.at(-1)??n.toLowerCase();if(k==="run"&&w.includes("web")){const A=B4(i,"search_query","q"),j=B4(i,"image_query","q"),M=B4(i,"find","pattern");return A?{kind:"web",label:mN({query:A})}:j?{kind:"web",label:qae({query:j})}:M?{kind:"web",label:joe({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:P3e()}:Array.isArray(i.weather)?{kind:"web",label:l2e()}:Array.isArray(i.finance)?{kind:"web",label:Qxe()}:Array.isArray(i.sports)?{kind:"web",label:n2e()}:Array.isArray(i.time)?{kind:"web",label:Hxe()}:{kind:"web",label:TN()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["compacted","contextcompaction"],["imported","importedchat"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:O5e()};const A=cFn(a??(o==null?void 0:o.join(" "))??""),j=fh(A);let M=j.map(G=>G.raw);if(o!=null&&o.length){const G=jT(o);M=G===null?[o]:fh(Eq(G)).map(ae=>ae.raw)}let D=null;for(const G of M)if(D=wMn(G),D)break;const L=M.some(G=>{const ae=dm(G);return ae!==null&&ae[0]!=="discover"&&ae[0]!=="paper"});if(D&&!L){const G=D.kind==="discover"&&!D.query?kMn(o?jT(o)??A:A,c??"",D.strategy):[],ae=D.kind==="discover"?{keyword:uae(),embedding:gae(),openalex:loe(),biorxiv:Sae(),pubmed:moe()}[D.strategy]:null,le=D.kind==="discover"?D.query?pN({activity:ae??w1(),query:D.query}):G.length===1?pN({activity:ae??w1(),query:G[0]}):G.length>1?Fne({activity:ae??w1(),count:_n(G.length)}):ae??w1():D.id?o0({target:Ae(D.id)}):kse();return{kind:D.kind==="paper"?"read":"search",label:le,litCall:D,queries:G}}if(lo(A,"agent\\s+spawn"))return{kind:"agent",label:W2e(),spawnedSessionIds:mFn(c),litCall:D??void 0};const B=j.map(G=>jq(G.raw)),U=lo(A,"exp\\s+status"),H=lo(A,"exp\\s+desc"),Q=fx(A,"exp\\s+desc").some(G=>(dm(G.raw)??[]).some(le=>le==="--set"||le.startsWith("--set=")||le==="--stdin")),K=Q?Sce():mse(),Z=Q?dte():Aie();if(lo(A,"logs")){const G=gFn(A,c,d,u);return{kind:"project",label:G.length===1?mie():kie(),runIds:G,litCall:D??void 0}}if(lo(A,"exp\\s+run"))return{kind:"project",label:s6e(),litCall:D??void 0};if(lo(A,"exp\\s+wait"))return{kind:"project",label:a7e(),litCall:D??void 0};if(lo(A,"exp\\s+cancel"))return{kind:"project",label:cxe(),litCall:D??void 0};const ee=lo(A,"project\\s+view");if(ee&&U&&H)return{kind:"project",label:Z,experimentIds:qd(A,c,f,u),litCall:D??void 0};if(ee&&H)return{kind:"project",label:K,experimentIds:qd(A,c,f,u),litCall:D??void 0};if(ee&&U)return{kind:"project",label:RN(),experimentIds:qd(A,c,f,u),litCall:D??void 0};if(ee)return{kind:"project",label:cke(),litCall:D??void 0};if(U&&H)return{kind:"project",label:Z,experimentIds:qd(A,c,f,u),litCall:D??void 0};if(U)return{kind:"project",label:RN(),experimentIds:qd(A,c,f,u),litCall:D??void 0};if(H)return{kind:"project",label:K,experimentIds:qd(A,c,f,u),litCall:D??void 0};if(lo(A,"runs?"))return{kind:"project",label:t3e(),litCall:D??void 0};if(lo(A,"projects"))return{kind:"project",label:c3e(),litCall:D??void 0};if(lo(A,"compute"))return{kind:"project",label:wxe(),litCall:D??void 0};const $=B.map(fFn).find(G=>G!=null);if($){const G=$4($.path);return{kind:G?"skill":"read",label:G?gw({name:Ae(G)}):o0({target:Ae(Q_($.path))}),filePath:$.path,fileRef:$.ref,labelTarget:G?`${G} skill`:Q_($.path)}}const I=B.findIndex(G=>G!=null&&["sed","cat","head","tail"].includes(G.name)),F=I>=0?B[I]:null,q=F?_Fn(F):null,V=q?hFn(q,j,I,di(i,"cwd","workdir")):null;if(q&&V){const G=$4(V);return{kind:G?"skill":"read",label:G?gw({name:Ae(G)}):o0({target:Ae(Q_(q))}),filePath:V,labelTarget:G?`${G} skill`:Q_(q)}}if(B.some(G=>(G==null?void 0:G.name)==="find"||(G==null?void 0:G.name)==="ls"||(G==null?void 0:G.name)==="rg"&&G.args.includes("--files")))return{kind:"search",label:HN()};const ie=B.findIndex(G=>(G==null?void 0:G.name)==="rg"||(G==null?void 0:G.name)==="grep");if(ie>=0){const G=dFn(j[ie].raw);return{kind:"search",label:G?bw({pattern:Ae(G)}):vw(),searchPattern:G??void 0}}const oe=B.find(G=>(G==null?void 0:G.name)==="git"),ce=oe==null?void 0:oe.args[0];if(ce==="grep"){const G=oe==null?void 0:oe.args.slice(1).find(ae=>!ae.startsWith("-"));return{kind:"search",label:G?bw({pattern:Ae(G)}):vw(),searchPattern:G}}if(ce==="status")return{kind:"command",label:Dxe()};if(ce==="diff")return{kind:"command",label:aSe()};if(ce==="log")return{kind:"command",label:tke()};const ne=G=>B.some(ae=>!ae||!["cargo","pnpm","npm","yarn"].includes(ae.name)?!1:ae.args[0]===G||ae.args[0]==="run"&&ae.args[1]===G);return ne("test")?{kind:"command",label:F5e()}:B.some(G=>(G==null?void 0:G.name)==="tsc")||ne("typecheck")?{kind:"command",label:m2e()}:ne("lint")?{kind:"command",label:pxe()}:ne("build")?{kind:"command",label:Wye()}:{kind:"command",label:Qre({command:Ae(A)})}}case"skill":{const A=di(i,"skill","name"),j=A?iFn(n,A):null;return{kind:"skill",label:A?zre({name:Ae(A)}):xre(),filePath:j??void 0,labelTarget:j&&A?`${A} skill`:void 0}}case"read":{const A=p?Q_(p):null,j=p?$4(p):null;return j?{kind:"skill",label:gw({name:Ae(j)}),filePath:p??void 0,labelTarget:`${j} skill`}:A?{kind:"read",label:o0({target:Ae(A)}),filePath:p??void 0,labelTarget:A}:{kind:"read",label:W5e()}}case"edit":case"write":case"notebookedit":{const A=oFn(i),j=p??(A==null?void 0:A.path)??null,M=j?Q_(j):null,D=M?(A==null?void 0:A.type)==="add"?Kte({target:Ae(M)}):(A==null?void 0:A.type)==="delete"?hne({target:Ae(M)}):Nne({target:Ae(M)}):null;return M?{kind:"edit",label:D??$N(),filePath:j??void 0,labelTarget:M}:{kind:"edit",label:$N()}}case"grep":{const A=di(i,"pattern");return{kind:"search",label:A?bw({pattern:Ae(A)}):vw(),searchPattern:A??void 0}}case"glob":{const A=di(i,"pattern");return{kind:"search",label:A?ore({pattern:Ae(A)}):HN()}}case"websearch":{const A=di(i,"query"),j=di(i,"url"),M=di(i,"pattern");return A?{kind:"web",label:mN({query:A})}:M&&j?{kind:"web",label:noe({pattern:M})}:j?{kind:"web",label:Hre({target:Ae(j)})}:{kind:"web",label:m??TN()}}case"webfetch":{const A=di(i,"url");return{kind:"web",label:A?o0({target:Ae(A)}):m??Hse()}}case"task":return{kind:"agent",label:m??nse()};case"subagent":return{kind:"agent",label:bFn(i)};case"error":return{kind:"command",label:PCe()};case"importedchat":return{kind:"project",label:ere()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Pte():((N=e.state)==null?void 0:N.status)==="running"?hN():Nte(),progressLabel:hN()};default:{const A=m??p??a??((z=e.state)==null?void 0:z.title)??"";return{kind:"command",label:A?`${n}: ${A}`:n}}}}function bFn(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return Xoe();case"sendInput":return qoe();case"resumeAgent":return nie();case"wait":return Tce();case"closeAgent":return yte()}switch(typeof e.kind=="string"?e.kind:""){case"started":return gce();case"interacted":return Vee();case"interrupted":return uce()}return rce()}function Ib({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=_.jsx(Xf,{...t});if(e.litCall)r=_.jsx(mF,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=_.jsx(k$,{...t});break;case"read":case"project":r=_.jsx(S$,{...t});break;case"search":r=_.jsx(D$,{...t});break;case"edit":r=_.jsx(XS,{...t});break;case"web":r=_.jsx(U6n,{...t});break;case"agent":r=_.jsx(JS,{...t});break}return _.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function F4({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=T.useState(!1),a=T.useRef(null),o=T.useRef(!1);return T.useEffect(()=>{var c,u;!s||!o.current||(o.current=!1,(u=(c=a.current)==null?void 0:c.querySelector("button"))==null||u.focus())},[s]),_.jsxs("span",{className:"tool-target-overflow inline",children:[s&&_.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((c,u)=>_.jsxs("span",{children:[u>0&&", ",n||t?_.jsx("button",{className:"tool-target",...n?ns(d=>n(c.id,d),{stopPropagation:!0}):{onClick:d=>{d.stopPropagation(),t==null||t(c.id)}},children:c.label}):_.jsx("span",{children:c.label})]},c.id))}),s&&", ",_.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?rZ({target:r}):Cee({count:_n(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?zS():Uje({count:_n(e.length)})})]})}function Rk({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,d;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return _.jsxs("a",{className:"tool-target",href:AMn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,_.jsx(KSn,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return _.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...ns(p=>n(f,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const f=e.spawnedSessionIds,p=f.slice(0,3),m=f.slice(p.length).map((w,k)=>({id:w,label:SN({number:_n(p.length+k+1)})}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",_.jsx("button",{className:"tool-target",title:M3e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(w)},children:SN({number:_n(k+1)})})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(F4,{items:m,onSelect:r,targetType:u0e()})]})]})}if((u=e.runIds)!=null&&u.length){const f=s?e.runIds.filter(w=>!!s(w)):e.runIds;if(f.length===0)return e.label;const p=f.slice(0,3),m=f.slice(p.length).map(w=>({id:w,label:(s==null?void 0:s(w))||El()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",t?_.jsx("button",{className:"tool-target",title:YZ({run:Ae(w)}),...ns(v=>t(w,v),{stopPropagation:!0}),children:(s==null?void 0:s(w))||El()}):_.jsx("span",{children:(s==null?void 0:s(w))||El()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(F4,{items:m,onOpen:t,targetType:d9e()})]})]})}if((d=e.experimentIds)!=null&&d.length){const f=a?e.experimentIds.filter(w=>!!a(w)):e.experimentIds;if(f.length===0)return e.label;const p=f.slice(0,3),m=f.slice(p.length).map(w=>({id:w,label:(a==null?void 0:a(w))||El()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",i?_.jsx("button",{className:"tool-target",title:IZ({name:(a==null?void 0:a(w))||Ae(w)}),...ns(v=>i(w,v),{stopPropagation:!0}),children:(a==null?void 0:a(w))||El()}):_.jsx("span",{children:(a==null?void 0:a(w))||El()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(F4,{items:m,onOpen:i,targetType:Vge()})]})]})}return e.label}function qC(e){const n=e.progressLabel??{skill:Dre(),read:Qse(),search:Loe(),edit:One(),project:Iie(),web:ate(),agent:one(),command:tL()}[e.kind];return{...e,label:n}}function Mq(e,n){const t=If({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:hre(),read:lse(),search:rae(),edit:eL(),project:lie(),web:Jee(),agent:ene(),command:Uie()}[t.kind]}function yFn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const xFn=250;function wFn(e,n){const[t,r]=T.useState(e),s=T.useRef(Date.now()),i=T.useRef(e);return T.useEffect(()=>{if(i.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const a=xFn-(Date.now()-s.current);if(a<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(i.current)},a);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const kFn=160;function Oq(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),kFn);return()=>window.clearTimeout(r)},[e]),e&&n}function SFn(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:lL()}}function CFn(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null,n.queries??null])}function EFn(e){const n=[];let t=null;for(const r of e){const s=If(r),i=CFn(r,s),a=n[n.length-1];i&&a&&t===i?a.count++:n.push({part:r,activity:s,count:1}),t=i}return n}function Dq({part:e,busy:n,recovering:t,onRecover:r,usageLimited:s=!1}){var w,k;const i=(w=e.state)==null?void 0:w.input,a=(i==null?void 0:i.nextRetryAt)??null,[o,c]=T.useState(Date.now());if(T.useEffect(()=>{if(typeof a!="number"||(c(Date.now()),a<=Date.now()))return;const v=window.setInterval(()=>{const y=Date.now();c(y),y>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=hMn(i??{},o);return _.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[_.jsx(Et,{}),_.jsx("span",{children:v})]})}const u=dF(i==null?void 0:i.recoveryAction),d=i==null?void 0:i.turnId,f=fF(e)?hve():s?R9e():nz(),p=s?$6n:ZS,m=_x(((k=e.state)==null?void 0:k.error)||nz());return _.jsxs("details",{className:"turn-usage-limit group/limit text-base text-subtext",children:[_.jsxs("summary",{className:"flex w-fit max-w-full items-center gap-2 cursor-pointer list-none rounded-sm focus-visible:outline-2 focus-visible:outline-text [&::-webkit-details-marker]:hidden",children:[_.jsx(p,{size:18,className:"shrink-0 text-accent-red","aria-hidden":"true"}),_.jsx("span",{children:f}),_.jsx(yo,{size:16,className:"shrink-0 text-text transition-transform duration-120 ease-standard group-open/limit:rotate-90 motion-reduce:transition-none","aria-hidden":"true"})]}),_.jsx("pre",{className:"mt-2 rounded-md bg-surface p-2 text-sm font-mono whitespace-pre-wrap wrap-anywhere",children:m}),!s&&r&&d&&(u==="retry"||u==="continue")&&_.jsx(Me,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(d,u),children:t?aEe():u==="retry"?Ks():ige()})]})}function iM({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,d=(u==null?void 0:u.status)==="error",f=_x((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=d&&!!f,[m,w]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return _.jsx(Dq,{part:e,busy:!1,recovering:!1,usageLimited:Y5(e)});const v=_.jsxs(_.Fragment,{children:[d&&_.jsxs("span",{className:"sr-only",children:[SS()," "]}),d?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(N$,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):_.jsx(Ib,{activity:n,className:"text-muted"}),_.jsxs("span",{className:`${wq} ${d?"text-accent-red":"text-subtext"}`,children:[_.jsx(Rk,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}),t>1&&_.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:gZ({count:_n(t)}),children:["×",t]})]})]});return p?_.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[_.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[v,_.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":k,"aria-label":m?uZ({activity:n.label}):vee({activity:n.label}),onClick:()=>w(y=>!y),children:_.jsx(yo,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&_.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:_.jsx("div",{className:FC,children:f.slice(0,2e4)})})]}):_.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:v})}function NFn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var j,M,D,L;const[c,u]=T.useState(!1),[d,f]=T.useState(!1),p=()=>{f(!0),u(B=>!B)},m=EFn(e),w=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,y=k==null?void 0:k.activity,x=((j=v==null?void 0:v.state)==null?void 0:j.status)!=="error"?(y&&qC(y))??null:null,b=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(x!=null&&x.progressLabel)&&(yFn((D=v.state)==null?void 0:D.input)||(x==null?void 0:x.kind)==="command"&&!di(((L=v.state)==null?void 0:L.input)??{},"command","cmd")),C=wFn(x,b),N=Oq(C!=null),z=C??SFn(w),A=C?C.label:lL();return e.length===1?C?_.jsx("div",{className:"tool-group my-3.5 mx-0",children:_.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[_.jsx(Ib,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),_.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:A,children:_.jsx(Rk,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):_.jsx("div",{className:"tool-group my-3.5 mx-0",children:_.jsx(iM,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):_.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[_.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[_.jsx(Ib,{activity:z,className:N?"tool-running-shimmer-icon":"text-muted"}),C?_.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:A,children:_.jsx(Rk,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):_.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":c,children:A}),_.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":c,"aria-label":c?$me():Bge(),children:_.jsx(yo,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),_.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:_.jsx("div",{className:"tool-group-disclosure-inner",children:_.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:d&&m.map(({part:B,count:U,activity:H})=>_.jsx(iM,{part:B,repeatCount:U,activity:H,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},B.id))})})})]})}function zFn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var d;const s=e.prompt,[i,a]=T.useState([]),o=!n,c=f=>n==null?void 0:n({promptId:e.id,...f});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:e5e(),icon:ti,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:x5e(),icon:XS,iconClass:"text-accent-amber"}:s.approved===!1?{label:o5e(),icon:_r,iconClass:"text-accent-red"}:{label:h5e(),icon:fy,iconClass:"text-muted"},w=m.icon;return _.jsxs("details",{className:rFn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?_L():JN()}),_.jsx(w,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),_.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),_.jsx(yo,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),_.jsxs("div",{className:`${eM} ms-6`,children:[_.jsx($c,{text:s.plan??"",onOpenFile:t}),s.note&&_.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,w)=>({id:`${e.id}-annotation-${w}`,text:m.text}));return _.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&_.jsx(HC,{annotations:p,variant:"sent"}),_.jsxs("details",{className:nFn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||i8e()}),_.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${f?"chosen":""}`,children:f||J8e()})]}),_.jsxs("div",{className:eM,children:[s.header&&s.question&&_.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&_.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var w;return _.jsx("li",{className:(w=s.answers)!=null&&w.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==f&&_.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return _.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${o?"readonly":""}`,children:[_.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?V7e():JN()}),_.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--surface))] [&.clamped::after]:pointer-events-none ${f?"clamped":""}`,children:_.jsx($c,{text:s.plan??"",onOpenFile:t})}),f&&_.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...ns(p=>r(s.plan??"",e.id,p)),children:JCe()}),!o&&!f&&_.jsxs("div",{className:Ak,children:[_.jsx(Me,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:jbe()}),_.jsx(Me,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:Lbe()}),_.jsx(Me,{size:"small",onClick:()=>c({approve:!1}),children:pke()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=di(f,"command","cmd","filePath","file_path","path")||"",m=typeof((d=s.toolInput)==null?void 0:d.reason)=="string"&&s.toolInput.reason||"",w=di(f,"description")||"",k=m||w||Mq(s.tool,f),v=`permission-heading-${e.id}`;return _.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${o?"readonly":""}`,role:"group","aria-labelledby":v,children:[_.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[_.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:_.jsx(ZS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),_.jsx("span",{id:v,className:"text-base font-semibold text-text",children:uye()})]}),_.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[_.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),p&&_.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!o&&_.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[_.jsx(Me,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:Ewe()}),_.jsx(Me,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:rye()})]})]})]})}const u=f=>a(p=>s.multiSelect?p.includes(f)?p.filter(m=>m!==f):[...p,f]:[f]);return _.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${o?"readonly":""}`,children:[s.header&&_.jsx("div",{className:sFn,children:s.header}),s.question&&_.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),_.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const p=i.includes(f.label);return _.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?u(f.label):c({answers:[f.label]}),children:[_.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&_.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!o&&_.jsx("div",{className:Ak,children:_.jsx(Me,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:MCe()})})]})}function jFn(e,n){return e.role==="user"?!0:e.parts.some(t=>qh(t,n))}function AFn(e){const n=e.text??"",t=n.startsWith("data:")?n:U3n(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",i=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:i,name:s}}async function UC(e){try{if(!navigator.clipboard)throw new Error(mL());await navigator.clipboard.writeText(e),sn(Cf(),"success")}catch(n){sn(n instanceof Error?n.message:String(n),"error")}}function TFn(e,n){const t=URL.createObjectURL(new Blob([n],{type:"text/markdown;charset=utf-8"})),r=document.createElement("a");r.href=t,r.download=e,document.body.append(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(t),1e3)}function RFn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const d=t>1,f=new Date(n),p=()=>UC(e);return _.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${d?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[d&&_.jsxs(_.Fragment,{children:[_.jsx(Rt,{size:"small",title:GN(),"aria-label":GN(),disabled:o||!s,onClick:()=>s&&a(s),children:_.jsx(C$,{size:14})}),_.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),_.jsx(Rt,{size:"small",title:UN(),"aria-label":UN(),disabled:o||!i,onClick:()=>i&&a(i),children:_.jsx(yo,{size:14})})]}),_.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100 transition-opacity duration-80 ease-standard",children:[_.jsx("time",{dateTime:f.toISOString(),className:"text-xs text-subtext tabular-nums me-2",children:f.toLocaleTimeString(E(),{hour:"numeric",minute:"2-digit"})}),_.jsx(Rt,{size:"small","aria-label":AS(),disabled:!e,onClick:p,children:_.jsx(Wf,{size:13})})]}),_.jsx(Rt,{size:"small",title:IN(),"aria-label":IN(),disabled:u,onClick:c,children:_.jsx(XS,{size:13})})]})}const MFn=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:d,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:k,skills:v,predictTextTail:y=!1,forkCount:x,forkIndex:b=0,forkPrevId:C,forkNextId:N,forkDisabled:z,branchDisabled:A,onFork:j,onSelectFork:M}){var Z,ee;d_();const[D,L]=T.useState(null),B=DFn(n);if(B)return _.jsx(LFn,{part:B});if(n.role==="user"){const $=n.parts.filter(oe=>oe.type==="text").map(oe=>oe.text??"").join(` +`),I=oe=>!!(v!=null&&v.some(ce=>ce.name===PC(oe))),F=n.parts.filter(oe=>oe.type==="image"&&oe.text).map(AFn),q=F.filter(oe=>!oe.isPdf),V=F.filter(oe=>oe.isPdf),ie=n.parts.filter(oe=>oe.type==="annotation"&&oe.text).map(oe=>({id:oe.id,text:oe.text??""}));if(D!==null){const oe=()=>{const ce=D.trim();!ce||z||(L(null),j(n.id,ce))};return _.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:_.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[_.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":Gwe(),value:D,autoFocus:!0,onChange:ce=>L(ce.target.value),onKeyDown:ce=>{ce.key==="Escape"?(ce.preventDefault(),L(null)):ce.key==="Enter"&&!ce.shiftKey&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),oe())}}),_.jsxs("div",{className:`${Ak} justify-end`,children:[_.jsx(Me,{size:"small",onClick:()=>L(null),children:txe()}),_.jsx(Me,{size:"small",variant:"primary",onClick:oe,disabled:z||!D.trim(),children:L3()})]})]})})}return _.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[ie.length>0&&_.jsx(HC,{annotations:ie,variant:"sent"}),_.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:align-baseline",children:[_.jsx(SPn,{text:$,isCommand:I}),q.length>0&&_.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:q.map((oe,ce)=>_.jsx("a",{href:oe.src,target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:oe.src,alt:Y0e()})},ce))}),V.length>0&&_.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:V.map((oe,ce)=>_.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:oe.src,target:"_blank",rel:"noreferrer",children:[_.jsx(fy,{size:15}),_.jsx("span",{children:oe.name})]},ce))})]}),x!==void 0&&_.jsx(RFn,{text:$,createdAt:n.createdAt,count:x,index:b,prevId:C,nextId:N,onSelect:M,pagerDisabled:A,onEdit:()=>L($),editDisabled:z})]})}const U=n.parts.find($=>$.type==="tool"&&Y5($)),H=n.parts.find(ug)??U,Q=cMn(n.parts.filter($=>$!==H&&!(U&&Y5($))),H),K=y&&!n.completedAt?"":_F(n);return _.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[_.jsx(OFn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:d,onOpenPlan:f,onOpenSubagent:p,predictTextTail:y}}),H&&_.jsx(Dq,{part:H,usageLimited:!!U,busy:m,recovering:w===((ee=(Z=H.state)==null?void 0:Z.input)==null?void 0:ee.turnId),onRecover:k}),K&&_.jsx("div",{className:"flex opacity-0 transition-opacity duration-80 ease-standard group-hover/turn:opacity-100 group-focus-within/turn:opacity-100",children:_.jsx(Rt,{size:"small",title:EN(),"aria-label":EN(),onClick:()=>void UC(K),children:_.jsx(Wf,{size:13})})})]})});function OFn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=lF(n,r),[a,o]=T.useState(!1),[,c]=T.useState(0);if(T.useEffect(()=>{if(!r||e.completedAt!=null||s.length===0)return;const p=window.setInterval(()=>c(m=>m+1),1e3);return()=>window.clearInterval(p)},[r,e.completedAt,s.length]),s.length===0)return _.jsx(_.Fragment,{children:Ov(i,t)});const u=e.completedAt??(r?Date.now():null),d=u===null?null:u-e.createdAt,f=d===null?null:d<6e4||d>=36e5?em(d):KNe({minutes:_n(Math.floor(d/6e4)),seconds:_n(Math.floor(d/1e3)%60)});return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"turn-work mb-4",children:[_.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 border-b border-border/50 pb-2 text-start text-base text-subtext cursor-pointer hover:text-text focus-visible:outline-2 focus-visible:outline-primary","aria-expanded":a,"data-work-toggle":!0,onClick:()=>o(p=>!p),children:[_.jsx("span",{children:f===null?PNe():eze({duration:f})}),_.jsx(yo,{size:16,className:`shrink-0 text-muted transition-transform duration-200 ease-standard motion-reduce:transition-none ${a?"rotate-90":""}`})]}),_.jsx("div",{className:`tool-group-disclosure ${a?"open":""}`,"aria-hidden":!a,inert:!a,children:_.jsx("div",{className:"tool-group-disclosure-inner",children:_.jsx("div",{className:"turn-work-content pt-4",children:Ov(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),_.jsx("div",{className:"turn-answer",children:Ov(i,t)})]})}function DFn(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===WI?n:null}function LFn({part:e}){var c;const n=e.state,t=di((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",i=typeof((c=n==null?void 0:n.input)==null?void 0:c.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` +`),o=r?tL():s&&i!==null?Cme({code:_n(i)}):null;return _.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:_.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[_.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[_.jsxs("span",{className:"sr-only",children:[aL()," "]}),_.jsx(Xf,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),_.jsx("span",{children:t})]}),a&&_.jsx("div",{className:`${FC} mt-2`,children:a.slice(0,2e4)}),o&&_.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function Ov(e,n){var x,b;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:d,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(C=>C.type!=="steer"&&qh(C,t)).at(-1),k=[];let v=[];const y=()=>{v.length!==0&&(k.push(_.jsx(NFn,{parts:v,pendingTail:v.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u},`tg-${v[0].id}`)),v=[])};for(const C of e)if(qh(C,t)){if(C.type==="tool"&&($Fn(C.tool)||(((x=C.children)==null?void 0:x.length)??0)>0)){y(),k.push(_.jsx(PFn,{part:C,pendingTail:m&&((b=C.state)==null?void 0:b.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}y(),C.type==="text"?k.push(_.jsx($c,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(w==null?void 0:w.id)},C.id)):C.type==="steer"?k.push(_.jsx("div",{dir:"auto",role:"note","aria-label":N7e(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:C.text},C.id)):C.type==="prompt"&&C.prompt&&k.push(_.jsx(zFn,{part:C,onRespond:d,onOpenFile:s,onOpenPlan:f},C.id))}return y(),k}function IFn(e){return If(e).label}function $Fn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function Lq(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function $b(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&$b(t.children,n);if(r)return r}return null}function BFn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var w,k,v,y;const o=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",d=u?_x(((v=e.state)==null?void 0:v.error)||((y=e.state)==null?void 0:y.output)||""):"",f=Ov(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?oF(o):null}),m=o.some(x=>x.type==="text"&&!!x.text)?"":Lq(e);return _.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&_.jsxs("span",{className:"sr-only",children:[SS()," "]}),d&&_.jsx("div",{className:FC,children:d.slice(0,2e4)}),f.length===0&&!m&&!d?_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?CS():xve()}):_.jsxs(_.Fragment,{children:[f,m&&_.jsx($c,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function PFn({part:e,pendingTail:n,onOpenSubagent:t}){var u,d,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=_x(((d=e.state)==null?void 0:d.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?qC(If(e)):If(e),a=Oq(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!Lq(e),c=_.jsxs(_.Fragment,{children:[r&&_.jsxs("span",{className:"sr-only",children:[SS()," "]}),r?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(N$,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):_.jsx(Ib,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),_.jsx("span",{className:`${wq} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?_.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:c}):_.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:mbe(),...ns(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[c,_.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:_.jsx(yo,{size:12})})]})}function FFn(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,i)=>{var a,o;for(const c of s){const u=`${i}/${c.id}`;c.type==="tool"&&((a=c.state)!=null&&a.status)&&n.set(u,{status:c.state.status,part:c}),(o=c.children)!=null&&o.length&&r(c.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function GC(e){const n=(t,r)=>{var s;for(const i of t){const a=i.prompt;if(i.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const o=a.toolInput??{},u=di(o,"reason","description")||Mq(a.tool,o);return{id:i.id,path:`${r}/${i.id}`,label:u}}if((s=i.children)!=null&&s.length){const o=n(i.children,`${r}/${i.id}`);if(o)return o}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function HFn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var w,k,v,y,x;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:i,states:a}=FFn(e),o=GC(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},t(b=>({text:o?gN({label:Ml(o.label)}):"",sequence:b.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,d=[...a].filter(([b,C])=>{var N;return((N=c.get(b))==null?void 0:N.status)!==C.status});if(r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==u){t(b=>({text:gN({label:Ml(o.label)}),sequence:b.sequence+1}));return}const f=(k=d.find(([,b])=>ug(b.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const b=dF((y=(v=f.state)==null?void 0:v.input)==null?void 0:y.recoveryAction);t(C=>({text:`${Ble()}${b?` ${b==="retry"?sle():Yce()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(b=>({text:Uce(),sequence:b.sequence+1}));return}const p=d.filter(([,b])=>b.status==="error");if(p.length>0){const b=p.slice(0,2).map(([,C])=>If(C.part).label).join(", ");t(C=>({text:p.length===1?Cle({labels:b}):Rle({count:_n(p.length),labels:b}),sequence:C.sequence+1}));return}const m=d.filter(([,b])=>b.status==="running");if(m.length>0){const b=(x=m.at(-1))==null?void 0:x[1].part;t(C=>({text:b?qC(If(b)).label:_le(),sequence:C.sequence+1}));return}d.some(([,b])=>b.status==="completed")&&t(b=>({text:vle(),sequence:b.sequence+1}))},[e]),n}const qFn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:d,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:y,onOpenPlan:x,onOpenSubagent:b,recoveringTurnId:C,onRecover:N,skills:z}){var $,I,F;d_();const A=(($=GC(n))==null?void 0:$.id)??null,j=T.useMemo(()=>n.filter(q=>jFn(q,A)),[n,A]),M=T.useMemo(()=>{const q=j.filter(V=>V.role==="user"&&!V.id.startsWith(bf));return aMn(a,n,q,V=>V.startsWith(bf))},[n,j,a]),D=T.useRef(new Set),[L,B]=T.useState(!1),U=T.useCallback(q=>j[q].id,[j]),H=T.useCallback(q=>{if(L)return j.map((ie,oe)=>oe);const V=new Set(mC(q));return j.forEach((ie,oe)=>{D.current.has(ie.id)&&V.add(oe)}),[...V].sort((ie,oe)=>ie-oe)},[j,L]),Q=aF({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:U,estimateSize:()=>400,overscan:1,initialRect:{width:((I=t.current)==null?void 0:I.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var q;return Math.max(0,j.length*400-(((q=t.current)==null?void 0:q.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:H});T.useLayoutEffect(()=>{const q=()=>Q.scrollToEnd();return r.current=q,i(),()=>{r.current=null}},[Q,r,i]),T.useEffect(()=>{const q=()=>{var oe;const V=window.getSelection();if(!V||V.isCollapsed||!V.rangeCount)return;const ie=V.getRangeAt(0);for(const ce of((oe=t.current)==null?void 0:oe.querySelectorAll("[data-message-id]"))??[])ie.intersectsNode(ce)&&ce.dataset.messageId&&D.current.add(ce.dataset.messageId)};return document.addEventListener("selectionchange",q),()=>document.removeEventListener("selectionchange",q)},[t]);const K=j.at(-1),Z=HFn(n),ee=d?cF(n):null;return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:_.jsx("span",{children:Z.text},Z.sequence)}),_.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":L,onClick:()=>B(q=>!q),children:V9e()}),_.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(q=>{var ne,G,ae,le,me,ve;const V=j[q.index],ie=V.parts.find(ug),oe=(G=(ne=ie==null?void 0:ie.state)==null?void 0:ne.input)==null?void 0:G.turnId,ce=ie?d||C!==null:!1;return _.jsx("div",{"data-index":q.index,"data-message-id":V.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:q.start},onClickCapture:Ee=>{!(Ee.target instanceof Element)||!Ee.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(V.id),onFocusCapture:()=>D.current.add(V.id),children:_.jsx(MFn,{message:V,forkCount:(ae=M.get(V.id))==null?void 0:ae.count,forkIndex:(le=M.get(V.id))==null?void 0:le.index,forkPrevId:(me=M.get(V.id))==null?void 0:me.prevId,forkNextId:(ve=M.get(V.id))==null?void 0:ve.nextId,forkDisabled:!o,branchDisabled:d,onFork:c,onSelectFork:u,activePermissionId:A,pendingTailToolId:(ee==null?void 0:ee.messageId)===V.id?ee.toolId:null,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:y,onOpenPlan:x,onOpenSubagent:b,busy:ce,recoveringTurnId:oe===C?C:null,onRecover:N,skills:z,predictTextTail:d&&V===K&&V.role==="assistant"})},V.id)})})]})}),UFn=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function H4(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const GFn=[{id:"archived",label:jN,railLabel:jN},{id:"active",label:qbe,railLabel:fL},{id:"all",label:Xbe,railLabel:iL}];function VFn({value:e,onChange:n,grouping:t,onGroupingChange:r}){const{open:s,setOpen:i,ref:a}=ra();return _.jsxs("div",{className:"rail-filter relative inline-flex",ref:a,children:[_.jsx(Rt,{size:"small",className:"rail-filter-btn text-subtext",active:e!=="active",title:FN(),"aria-label":FN(),onClick:()=>i(o=>!o),children:_.jsx(L$,{size:15,className:"text-subtext"})}),s&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-40 p-1 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:[_.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:Uin()}),["projects","list"].map(o=>_.jsxs(un,{size:"compact",className:"text-sm",onClick:()=>{r(o),i(!1)},children:[_.jsx("span",{children:o==="projects"?MS():Yin()}),t===o&&_.jsx(ti,{size:13})]},o)),_.jsx("div",{className:"my-1 border-t border-border"}),_.jsx("div",{className:"px-2 py-0.5 text-sm text-subtext",children:Iin()}),GFn.map(o=>_.jsxs(un,{size:"compact",className:"text-sm",onClick:()=>{n(o.id),i(!1)},children:[_.jsx("span",{children:o.label()}),e===o.id&&_.jsx(ti,{size:13})]},o.id))]})]})}const KFn=14,WFn=500,QFn=1200;function Iq({title:e,animate:n}){return n?_.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?_.jsx("span",{"aria-hidden":!0,children:t},r):_.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*KFn,WFn)}ms`},children:t},r))}):_.jsx(_.Fragment,{children:e})}function XFn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:d,setOpen:f,ref:p}=ra(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[w,k]=T.useState(!1),[v,y]=T.useState(""),x=T.useRef(null);function b(){var z;y(((z=e.title)==null?void 0:z.trim())||""),k(!0)}function C(){var A;const z=v.trim();k(!1),z&&z!==(((A=e.title)==null?void 0:A.trim())||"")&&o(z)}return T.useEffect(()=>{var z,A;w&&((z=x.current)==null||z.focus(),(A=x.current)==null||A.select())},[w]),_.jsxs("div",{ref:p,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] ps-2.5 pe-1.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${n?"active":""} ${t?"unread":""} ${d?"menu-open":""} ${w?"editing":""}`,title:`${Iu[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?J9e():""}`,onClick:()=>{w||(d?f(!1):a())},onKeyDown:z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),d?f(!1):a())},children:[e.parentSessionId&&!w&&_.jsx(JS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),w?_.jsx("input",{ref:x,className:"session-title-input","aria-label":GSe(),value:v,onChange:z=>y(z.target.value),onClick:z=>z.stopPropagation(),onBlur:C,onKeyDown:z=>{z.stopPropagation(),z.key==="Enter"?(z.preventDefault(),C()):z.key==="Escape"&&(z.preventDefault(),k(!1))}}):_.jsx("span",{className:"session-title",children:_.jsx(Iq,{title:m,animate:i!==void 0},i??"static")}),_.jsx("span",{className:"session-dot",children:r?_.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&_.jsx("span",{className:"unread-dot"})}),_.jsx("button",{className:"session-menu-btn",title:XN(),"aria-label":XN(),onClick:z=>{z.stopPropagation(),f(A=>!A)},children:_.jsx(ip,{size:14})}),d&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down session-menu",children:[_.jsx(un,{onClick:z=>{z.stopPropagation(),f(!1),b()},children:_.jsx("span",{children:cL()})}),_.jsx(un,{onClick:z=>{z.stopPropagation(),f(!1),c(!e.archived)},children:_.jsx("span",{children:e.archived?dNe():A0e()})}),_.jsx(un,{danger:!0,onClick:z=>{z.stopPropagation(),f(!1),u()},children:_.jsx("span",{children:oL()})})]})]})}const aM=[S$,D$,Xf,Bh],YFn=()=>[{title:v6e(),prompt:_6e()},{title:R6e(),prompt:C6e()},{title:V6e(),prompt:B6e()},{title:aCe(),prompt:J6e()}],q4=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],oM="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function ZFn(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:cb(n,t,e.serviceTier),reasoningLevel:FI(n,t,e.reasoningLevel)}}function cM({projectId:e,projectName:n,contentLoading:t=!1,contentError:r=null,onRetryContent:s,railHeader:i,railOpen:a,onShowRail:o,onNewProject:c,mainView:u,onSelectMainView:d,onOpenFile:f,onOpenRun:p,runExperimentName:m,onOpenExperiment:w,experimentName:k,onOpenPlan:v,onOpenSubagent:y,runtime:x,onOpenDemoWelcome:b,composerFocusNonce:C=0,demoRunningRunId:N=null,activeSessionId:z,onActiveSessionChange:A,preferredAgent:j,onPreferredAgentChange:M,preferredAutonomy:D,onPreferredAutonomyChange:L,embedded:B=!1,onOpenSideChat:U,children:H}){var Xr,lc,ci,kp,A_,uc,fd;const Q=pn({mutationFn:J=>P3n(...J)}),K=pn({mutationFn:J=>L3n(...J)}),Z=pn({mutationFn:J=>B3n(...J)}),ee=pn({mutationFn:J=>$3n(...J)}),$=pn({mutationFn:J=>A3n(...J)}),I=pn({mutationFn:J=>M3n(...J)}),F=pn({mutationFn:J=>O3n(...J)}),q=pn({mutationFn:J=>D3n(...J)}),V=pn({mutationFn:n5}),ie=Km(),{data:oe=[]}=dt({...Af(),enabled:!B}),{data:ce=[]}=dt({...wj(),enabled:!B}),[ne,G]=T.useState(()=>{try{return localStorage.getItem("sidebar-grouping")==="list"?"list":"projects"}catch{return"projects"}}),[ae,le]=T.useState(()=>{try{const J=JSON.parse(localStorage.getItem("sidebar-pinned-projects")??"[]");return Array.isArray(J)?J.filter(he=>typeof he=="string"):[]}catch{return[]}}),[me,ve]=T.useState("active"),[Ee,Fe]=T.useState(!1),We=T.useRef(null),[Oe,He]=T.useState(0),[ht,xt]=T.useState(null),[Kt,Ut]=T.useState({});T.useLayoutEffect(()=>{const J=We.current;if(!J||B)return;const he=()=>He(J.clientHeight),Se=new ResizeObserver(he);return Se.observe(J),he(),()=>Se.disconnect()},[a,B,u]);const Ht=new Map(ce.map(J=>[J.projectId,J.lastActivityAt])),$e=[...oe].sort((J,he)=>Number(ae.includes(he.id))-Number(ae.includes(J.id))||Math.max(Ht.get(he.id)??0,he.updatedAt)-Math.max(Ht.get(J.id)??0,J.updatedAt)),ot=ne==="list"||Ee?$e.length:Math.max(1,Math.ceil(Oe/36));let ct=$e.slice(0,ot);const ye=oe.find(J=>J.id===e);ye&&!ct.some(J=>J.id===e)&&(ct=[...ct.slice(0,ot-1),ye]);const Be=lD({queries:(ne==="projects"?ct:[]).map(J=>({...pi(J.id),enabled:!B}))}),Ke=ZK({queryKey:jt("listSidebarChatSessions",me),queryFn:({pageParam:J,signal:he})=>I5n(me,J,he),initialPageParam:null,getNextPageParam:J=>J.next??void 0,enabled:!B&&ne==="list"}),Ce=T.useMemo(()=>pi(e),[e]),{data:Ye=nM}=dt(Ce),lt=T.useCallback(J=>{ts(Ce.queryKey,he=>{if(!he)return;const Se=typeof J=="function"?J(he):J,xe=new Map(he.map(Le=>[Le.id,Le]));for(const Le of Se)xe.get(Le.id)!==Le&&_o(Ze,Ce.queryKey,Le.id),xe.delete(Le.id);for(const Le of xe.keys())_o(Ze,Ce.queryKey,Le);return Se})},[Ce]),je=z,Gt=T.useRef(A);Gt.current=A;const Mt=T.useRef({projectId:e});Mt.current.projectId!==e&&(Mt.current={projectId:e});const[Jt,rn]=T.useState(new Set),[nn,Nt]=T.useState(""),[wt,Bn]=T.useState(!1),[gr,Gr]=T.useState(!1),[en,Vn]=T.useState([]),ls=T.useRef(0),_t=T.useRef({projectId:e,activeId:je,mainView:u});(_t.current.projectId!==e||_t.current.activeId!==je||_t.current.mainView!==u)&&(_t.current={projectId:e,activeId:je,mainView:u});const[fn,yn]=T.useState([]),[Tn,Kn]=T.useState(null),dn=je??`${e}:new`,Dn=T.useRef(new Map),Wn=T.useRef(r4);Wn.current={draft:nn,attachments:fn,annotations:en};const zt=e===c0&&!B&&Ye.length>0&&Ye.every(J=>J.sideParentSessionId||ywn[J.id]===J.activeLeafId)?uj:null,Ot=T.useRef(null);zt!==null&&Ot.current===null&&je!==null&&(Ot.current=dn);const Fn=dn===Ot.current?zt:null;T.useLayoutEffect(()=>{const J=Dn.current.get(dn)??r4;return Wn.current=J,Nt(J.draft),yn(J.attachments),Vn(J.annotations),()=>{const he=gMn(Wn.current,Fn);he?Dn.current.set(dn,he):Dn.current.delete(dn)}},[dn,Fn]);const[rs,Wt]=T.useState(null),sr=T.useRef(Promise.resolve()),Qn=T.useRef(0),jr=T.useRef(0),[Es,Vr]=T.useState(null),vr=T.useRef(null),Qe=T.useRef(!1),mt=T.useRef(null),[mn,xn,Rn]=H5n(e,u==="chat"?je:null),{data:fr=eHn}=dt(r_()),[ir,Ln]=T.useState(j);T.useEffect(()=>Ln(j),[j]);const[us,Ns]=T.useState({}),[Ir,Kr]=T.useState(b0),[Yo,Xc]=T.useState(null),ia=T.useRef(!1),Zl=T.useRef(null),[bi,Ii]=T.useState(null),zs=T.useRef(!1),Sr=T.useRef(null),[Fs,yi]=T.useState(new Map),ri=T.useRef(new Map),xi=T.useRef(null),si=T.useRef(null),js=T.useRef(null),ss=T.useRef(!0),[Zo,aa]=T.useState(!0),br=T.useRef(null),[wi,oa]=T.useState(!1),qa=ra(),Ua=T.useCallback(J=>{var he;ls.current+=1,Vn(Se=>[...Se,{id:`annotation-${ls.current}`,...J}]),(he=br.current)==null||he.focus()},[]),ca=YPn(si,Ua);ZPn(en,B?HPn:FPn),T.useEffect(()=>{oa(!1),ca.dismiss()},[je,e,ca.dismiss]);const[ii,Ga]=T.useState(0),[la,Ws]=T.useState(!1),[ua,Yc]=T.useState(0),[cr,Cr]=T.useState(0),_s=T.useRef(!1);function Ar(J){if(!fs)return;if(!Si&&J.source==="command"&&ux(J.name)&&J.name!=="goal"){x_(J.name,nn,fs);return}const he=J.name.replace(/@u$/,"^").replace(/@p$/,"~"),Se=J.source==="command"?1:WR(he,br.current),xe=gPn(nn,fs,he,Se);Nt(xe.text),window.requestAnimationFrame(()=>{var Le,kt;(Le=br.current)==null||Le.focus(),(kt=br.current)==null||kt.setSelectionRange(xe.cursor,xe.cursor),Cr(xe.cursor)})}function _a(J){if(ds)return!1;const he=J.selectionStart;if(_s.current||he!==J.selectionEnd)return!1;const Se=nn.slice(0,he).replace(/[ \t]+$/,"").length,xe=M4(nn,Se);if(!xe||xe.end!==Se||!No(xe.query)||he>Se&&he-Se!==WR(xe.query,J))return!1;const Le=KR(nn,{...xe,end:he});return Nt(Le.text),Cr(Le.cursor),window.requestAnimationFrame(()=>J.setSelectionRange(Le.cursor,Le.cursor)),!0}function Zc(J){Kn(null);let xe=fn.reduce((Le,kt)=>Le+kt.size,0);for(const Le of J){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Le.type))continue;if(Le.size>31457280){Kn(sme({name:Ae(Le.name)}));continue}if(xe+Le.size>41943040){Kn(_me());continue}xe+=Le.size;const kt=_t.current,vt=dn,cn=new FileReader;cn.onload=()=>{const Pt={dataUrl:cn.result,mediaType:Le.type,name:Le.name,size:Le.size};if(_t.current.projectId===kt.projectId&&_t.current.activeId===kt.activeId){yn(Ci=>[...Ci,Pt]);return}const Pn=Dn.current.get(vt)??r4;Dn.current.set(vt,{...Pn,attachments:[...Pn.attachments,Pt]})},cn.readAsDataURL(Le)}}function v_(J){const he=Array.from(J.clipboardData.items).filter(Se=>Se.kind==="file"&&(Se.type.startsWith("image/")||Se.type==="application/pdf")).map(Se=>Se.getAsFile()).filter(Se=>Se!==null);he.length>0&&(J.preventDefault(),Zc(he))}const Dt=Ye.find(J=>J.id===je),Jo=ir??J7n(fr),Hs=Dt?{harness:Dt.harness,model:us.model!==void 0?us.model:Dt.model,serviceTier:us.serviceTier!==void 0?us.serviceTier:Dt.serviceTier,permissionMode:us.permissionMode??Dt.permissionMode,reasoningLevel:us.reasoningLevel??Dt.reasoningLevel}:Jo?{...Jo,...us}:null,{data:ki=JFn}=dt(g5n(Hs==null?void 0:Hs.harness,e)),ft=Hs?fr.find(J=>J.id===Hs.harness):void 0,Qt=ft==null?void 0:ft.options,fa=T.useMemo(()=>vPn(ki,Qt==null?void 0:Qt.planActivation),[ki,Qt==null?void 0:Qt.planActivation]),wo=XR(nn),Va=wo!==null,fs=M4(nn,cr),Ka=(fs==null?void 0:fs.query)??null,Jl=Ka===null?[]:fa.filter(J=>pPn(J,Ka)),ds=!Va&&Ka!==null&&(fs==null?void 0:fs.end)===cr&&Jl.length>0,ai=ds&&!la?Jl:[],ec=ai.length>0,ko=Math.min(ii,Math.max(0,ai.length-1));T.useEffect(()=>Ga(0),[Ka]);const gn=ZFn(Hs,ft),eu=uy(ft,gn==null?void 0:gn.model),Jc=J=>{if(!gn)return;const he={...gn,...J},Se={};J.model!==void 0&&J.model!==gn.model&&(Se.model=J.model),J.serviceTier!==void 0&&J.serviceTier!==gn.serviceTier&&(Se.serviceTier=J.serviceTier),J.permissionMode!==void 0&&J.permissionMode!==gn.permissionMode&&(Se.permissionMode=J.permissionMode),J.reasoningLevel!==void 0&&J.reasoningLevel!==gn.reasoningLevel&&(Se.reasoningLevel=J.reasoningLevel),Kr(xe=>({...xe,...Se})),Ln(he),M(he).catch(()=>{}),Dt?Ns(xe=>({...xe,...J})):J.harness&&J.harness!==gn.harness&&Ns({})},Wr=T.useCallback(J=>{const he=sr.current.catch(()=>{}).then(()=>{if(!Gn(Ce.queryKey))throw new DOMException("Workspace changed","AbortError");return J()});return sr.current=he.then(()=>{},()=>{}),he},[Ce]),$i=J=>{if(J==="plan"&&(ft==null?void 0:ft.id)==="claude-code"?(Kr(xe=>({...xe,permissionMode:J})),Ns(xe=>({...xe,permissionMode:J}))):(Ns(xe=>{const Le={...xe};return delete Le.permissionMode,Le}),Jc({permissionMode:J})),!Dt)return;const he=Dt.id,Se=++Qn.current;Wt(null),Wr(()=>Q.mutateAsync([he,J])).then(xe=>{lt(Le=>Le.map(kt=>kt.id===xe.id?xe:kt)),Qn.current===Se&&Ns(Le=>{const kt={...Le};return delete kt.permissionMode,kt})}).catch(()=>{Qn.current===Se&&(Ns(xe=>{const Le={...xe};return delete Le.permissionMode,Le}),Wt(MNe()))})},sd=J=>Jc({reasoningLevel:J}),wn=J=>{if(!Dt){L(J);return}const he=Dt.id,Se=Dt.autonomy,xe=++Qn.current,Le=kt=>lt(vt=>vt.map(cn=>cn.id===kt.id?kt:cn));Le({...Dt,autonomy:J}),Wt(null),Wr(()=>Z.mutateAsync([he,J])).then(kt=>{Le(kt),L(kt.autonomy)}).catch(()=>{lt(kt=>kt.map(vt=>vt.id===he&&vt.autonomy===J?{...vt,autonomy:Se}:vt)),Qn.current===xe&&Wt(ENe())})},da=((Xr=Dt==null?void 0:Dt.goal)==null?void 0:Xr.trim())||"",So=(gn==null?void 0:gn.harness)==="claude-code"?gn.permissionMode==="plan":(Qt==null?void 0:Qt.planActivation)==="command"?Es??(Dt==null?void 0:Dt.planMode)??!1:!1;T.useEffect(()=>{Es===null||(Dt==null?void 0:Dt.planMode)!==Es||(vr.current=null,Vr(null))},[Dt==null?void 0:Dt.planMode,Es]);async function Wa(J){if(Kr(xe=>({...xe,planMode:J})),vr.current=J,Vr(J),!Dt)return;const he=Dt.id,Se=++jr.current;Wt(null);try{const xe=await Wr(()=>K.mutateAsync([he,J]));lt(Le=>Le.map(kt=>kt.id===xe.id?xe:kt)),jr.current===Se&&(vr.current=null,Vr(null),Wt(null))}catch(xe){throw jr.current===Se&&(vr.current=null,Vr(null)),xe}}async function mp(){if((gn==null?void 0:gn.harness)==="claude-code"){$i("auto");return}if(Dt)try{await Wa(!1)}catch{Wt(Rge())}}async function id(){const J=!So;try{if((gn==null?void 0:gn.harness)==="claude-code")$i(J?"plan":"auto");else if((Qt==null?void 0:Qt.planActivation)==="command")await Wa(J);else throw new Error(S1())}catch{Wt(tz())}}function b_(J,he=""){var Se;switch(J){case"plan":return id(),!1;case"new":return B?Dt!=null&&Dt.sideParentSessionId&&(U==null||U(Dt.sideParentSessionId,"")):cc(),!1;case"resume":return oa(!0),!0;case"model":return Yc(xe=>xe+1),!0;case"compact":return od(),!1;case"goal":return tu(he),!1;case"side":return y_(he),!1;case"copy":{const xe=As.at(-1),Le=dr&&(xe==null?void 0:xe.role)==="assistant"&&!xe.completedAt,kt=_Mn(Le?As.slice(0,-1):As);return kt?UC(kt):sn(Qve(),"info"),!1}case"export":{const xe=((Se=Dt==null?void 0:Dt.title)==null?void 0:Se.trim())||xv(),Le=Dt?fMn(xe,As,{user:Jge(),assistant:Iu[Dt.harness]}):null;return Le?TFn(dMn(xe),Le):sn(nbe(),"info"),!1}}}function y_(J){B?sn(rin(),"info"):!Dt||!U?sn(Xsn(),"info"):U(Dt.id,J)}async function ad(J){Wt(null);const he=Mt.current;try{const Se=await $.mutateAsync([e,J]);if(Ze.invalidateQueries({queryKey:KI().queryKey}),Mt.current!==he)return;lt(xe=>[Se,...xe.filter(Le=>Le.id!==Se.id)]),ve("all"),A(Se.id,{projectId:Se.projectId})}catch(Se){if(Mt.current!==he)return;Wt(K1e({error:Ae(Se instanceof Error?Se.message:String(Se))}))}}async function tu(J){var vt;const he=J.trim();if(!he){const cn=(vt=Dt==null?void 0:Dt.goal)==null?void 0:vt.trim();sn(cn?d1e({goal:Ml(cn)}):E1e(),"info");return}const Se=_t.current,xe=()=>_t.current.activeId===Se.activeId;Wt(null);let Le=je;if(!Le){if(!(ft!=null&&ft.agentReady)||!gn){Wt(S1());return}try{Le=(await ac(gn,D4(Qt==null?void 0:Qt.planActivation,void 0,vr.current))).id}catch(cn){Wt(NN({error:Ae(cn instanceof Error?cn.message:String(cn))}));return}}const kt=/^(clear|none|off)$/i.test(he);try{const cn=await Wr(()=>ee.mutateAsync([Le,kt?null:he]));lt(Pt=>Pt.map(Pn=>Pn.id===cn.id?cn:Pn)),sn(kt?a1e():M1e(),"success")}catch(cn){if(!xe())return;Wt(NN({error:Ae(cn instanceof Error?cn.message:String(cn))}))}}async function od(){const J=je;if(!J){sn(Hve(),"info");return}if(dr){Wt(Gme());return}Wt(null),me==="archived"&&ve("active");const he=_t.current;try{const{message:Se}=await G3n(J);xn({type:"upsertMessage",sessionId:J,message:Se})}catch(Se){if(_t.current.activeId!==he.activeId)return;Wt(Zme({error:Ae(Se instanceof Error?Se.message:String(Se))}))}}function x_(J,he,Se){const xe=KR(he,Se);Nt(xe.text),Ws(!0),!b_(J)&&window.requestAnimationFrame(()=>{var Le,kt;(Le=br.current)==null||Le.focus(),(kt=br.current)==null||kt.setSelectionRange(xe.cursor,xe.cursor),Cr(xe.cursor)})}const ha=T.useCallback(async(J=!1)=>{const he=Mt.current;if(he.projectId!==e||!Gn(Ce.queryKey))return null;const Se=(Ze.getQueryData(Ce.queryKey)??[]).map(xe=>xe.id);try{const xe=await Ze.fetchQuery({...Ce,...J?{staleTime:0}:{}});if(Mt.current!==he||!Gn(Ce.queryKey))return null;const Le=xe.filter(vt=>!Ac.has(vt.id)),kt=new Set(Le.map(vt=>vt.id));for(const vt of Se)kt.has(vt)||Qs(vt);return ri.current=new Map(Le.map(vt=>[vt.id,vt.title])),Le}catch{return null}},[e]),tc=T.useCallback(async J=>{Mt.current.projectId!==e||!Gn(Ce.queryKey)||await Promise.all([Ze.fetchQuery({...Rc(J),staleTime:0}),ha(!0)]).catch(()=>{})},[e,ha]);T.useEffect(()=>{const J=X$();rn(e===c0?new Set([oy,cy].filter(Se=>!J.has(Se))):new Set),Bn(!1),Gr(!1),yi(new Map),ri.current=new Map,ha();const he=Mt.current;return()=>{Mt.current===he&&(Mt.current={projectId:e})}},[e,ha]),T.useEffect(()=>{Kr(b0),Sr.current=null},[je]),T.useEffect(()=>tm(J=>{switch(J.type){case"session":{if(J.session.projectId!==e||Ac.has(J.session.id))return;const he=ri.current.has(J.session.id),Se=ri.current.get(J.session.id)!==J.session.title;ri.current.set(J.session.id,J.session.title),he&&Se&&J.session.titleSource==="generated"&&(yi(xe=>{const Le=new Map(xe);return Le.set(J.session.id,(xe.get(J.session.id)??0)+1),Le}),window.setTimeout(()=>{yi(xe=>{if(!xe.has(J.session.id))return xe;const Le=new Map(xe);return Le.delete(J.session.id),Le})},QFn));break}case"sessionDeleted":Qs(J.sessionId);break}}),[e]),T.useEffect(()=>tm(J=>{J.type==="reconnected"&&ha(!0)}),[ha]);const el=je?mn.messagesBySession[je]??tM:tM,Co=je?mn.activeLeafBySession[je]??null:null;Zl.current=Co;const As=T.useMemo(()=>sMn(el,Co),[el,Co]),Bi=T.useRef({projectId:e,ids:mn.busySessions});T.useEffect(()=>{const J=Bi.current;Bi.current={projectId:e,ids:mn.busySessions},J.projectId===e&&rn(he=>uMn(he,J.ids,mn.busySessions,Ye,u==="chat"?je:null))},[e,mn.busySessions,Ye,je,u]);const dr=je?mn.busySessions.has(je):!1,gp=!dr&&!!(ft!=null&&ft.agentReady),tl=dr&&cF(As)!=null,vp=dr&&lMn(As),Pi=je?mn.queuedBySession[je]??[]:[],nu=Pi.some(J=>J.dispatchState==="retrying"),w_=Pi.findIndex(J=>J.dispatchState==="blocked"),nc=Pi.reduce((J,he)=>he.dispatchState!=="retrying"||typeof he.nextRetryAt!="number"?J:J===null?he.nextRetryAt:Math.min(J,he.nextRetryAt),null),[bp,Eo]=T.useState(()=>Date.now());T.useEffect(()=>{if(!nu||nc===null||(Eo(Date.now()),nc<=Date.now()))return;const J=window.setInterval(()=>{const he=Date.now();Eo(he),he>=nc&&window.clearInterval(J)},1e3);return()=>window.clearInterval(J)},[nu,nc]),T.useEffect(()=>{const J=Pi.reduce((he,Se)=>Se.planMode??he,void 0);J!==void 0?(Qe.current=!0,vr.current=J,Vr(J)):Qe.current&&(Qe.current=!1,vr.current=null,Vr(null))},[Pi]);const Qa=!!je&&Rn.isPending,pa=T.useMemo(()=>{const J=new Set;for(const he of mn.busySessions)(mn.messagesBySession[he]??[]).some(Se=>Se.parts.some(xe=>xe.type==="prompt"&&xe.prompt&&!xe.prompt.resolved&&xe.prompt.nativeId))&&J.add(he);return J},[mn.busySessions,mn.messagesBySession]),k_=je?pa.has(je):!1,ar=Dt,hs=ar?Fs.get(ar.id):void 0,qs=T.useMemo(()=>{var J;for(let he=As.length-1;he>=0;he--)for(const Se of As[he].parts)if(Se.type==="prompt"&&((J=Se.prompt)==null?void 0:J.kind)==="plan"&&!Se.prompt.resolved)return{promptId:Se.id,plan:Se.prompt.plan??"",synthesized:!!Se.prompt.synthesized};return null},[As]),Si=T.useMemo(()=>je?oMn(As,ar==null?void 0:ar.harness,mn.busySessions.has(je)):null,[As,ar==null?void 0:ar.harness,je,mn.busySessions]),Fi=Va&&!Si,No=J=>{if(Si||Va)return!1;const he=Nk(J),Se=fa.find(xe=>xe.name===PC(he??J));return!Se||Se.source!=="command"?!!Se:he&&O4(he)?he==="plan"||nn.trim().toLowerCase().startsWith(`/${J}`):nn.trim().toLowerCase()===`/${J}`},S_=T.useMemo(()=>fa.filter(J=>J.source!=="command"),[fa]),[Xa,C_]=T.useState(null),zo=Xa&&Xa.sessionId===je?Xa:null;T.useEffect(()=>{if(!Xa)return;const J=mn.busySessions.has(Xa.sessionId),he=Xa.sessionId===je&&qs&&qs.promptId!==Xa.promptId;(!J||he)&&C_(null)},[Xa,qs,mn.busySessions,je]);const ru=T.useMemo(()=>GC(As),[As]),rc=dr&&!!(ft!=null&&ft.supportsSteering)&&!!(ft!=null&&ft.agentReady)&&!qs&&!Si&&!ru&&fn.length===0&&en.length===0,ma=T.useMemo(()=>v&&je?(J,he,Se)=>v(J,je,he,Se):void 0,[v,je]),cd=T.useMemo(()=>y&&je?(J,he,Se)=>y(je,J,he,Se):void 0,[y,je]),sc=T.useMemo(()=>f&&((J,he,Se,xe,Le)=>f(J,je??void 0,he,Se,xe,Le)),[f,je]);T.useEffect(()=>{Qn.current+=1,jr.current+=1;const J=(je?mn.queuedBySession[je]??[]:[]).reduce((he,Se)=>Se.planMode??he,void 0);Qe.current=J!==void 0,vr.current=J??null,Vr(J??null),Ns({}),Wt(null)},[je]);const jo=u==="chat"&&(As.length>0||dr),nl=(gn==null?void 0:gn.harness)??null,su=(gn==null?void 0:gn.model)??null,Ya=Rn.data?null:Rn.error,E_=u==="chat"&&!B&&!jo&&!t&&!r&&!Qa&&!Ya,iu=dt({...G5n(e,nl??"claude-code",su,E()),enabled:E_&&nl!==null,subscribed:E_&&nl!==null}),Ts=(lc=iu.data)!=null&&lc.blank?YFn():((ci=iu.data)==null?void 0:ci.prompts)??null,Xn=nl!==null&&iu.isPending,au=e===c0?"demo":"project",yp=J=>{Nt(J),Ws(!1),window.requestAnimationFrame(()=>{const he=br.current;he&&(he.focus(),he.setSelectionRange(J.length,J.length),Cr(J.length))})};T.useEffect(()=>{Fn&&(Nt(J=>J||Fn),Ws(!1),Cr(Fn.length))},[Fn]),T.useEffect(()=>{if(C===0)return;const J=window.requestAnimationFrame(()=>{const he=br.current;he&&(he.focus(),he.setSelectionRange(he.value.length,he.value.length),he.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(J)},[C]);const rl=T.useId(),N_=e===c0&&nn===uj&&!wt,or=T.useCallback(J=>{const he=J.scrollHeight-J.scrollTop-J.clientHeight<60;ss.current=he,aa(he)},[]),ps=T.useCallback(()=>{var J;ss.current=!0,aa(!0),(J=js.current)==null||J.call(js)},[]);T.useEffect(()=>{const J=xi.current,he=si.current;if(!J||!he)return;const Se=new ResizeObserver(()=>{var xe;ss.current?(xe=js.current)==null||xe.call(js):aa(J.scrollHeight-J.scrollTop-J.clientHeight<60)});return Se.observe(J),Se.observe(he),()=>Se.disconnect()},[jo]);const ic=T.useCallback(J=>{J.currentTarget.blur(),ps()},[ps]);async function ou({queue:J=!1}={}){var hd,To,Sp,Cp,ol,_c;const he=nn.trim(),Se=Si?null:bPn(he,Qt==null?void 0:Qt.planActivation);if(Se&&Se.name!=="plan"){Nt(O4(Se.name)?"":Se.prompt),Ws(!1),b_(Se.name,Se.prompt);return}if(Lu({name:"first_action",surface:au,action:"typed_prompt"}),zs.current)return;const xe=!!Se,Le=!So,kt=D4(Qt==null?void 0:Qt.planActivation,xe?Le:void 0,vr.current),vt=xe&&(ft==null?void 0:ft.id)==="claude-code"?Le?"plan":"auto":void 0,cn=Se?Se.prompt:he,Pt=fn,Pn=en,Ci=Pn.map(Hn=>({text:Hn.text})),to=e,no=u;let ro=je;const so=()=>{const Hn=_t.current;return Gn(Ce.queryKey)&&Hn.projectId===to&&Hn.activeId===ro&&Hn.mainView===no},lu=()=>{so()&&(Nt(Hn=>Hn||he),yn(Hn=>Hn.length?Hn:Pt),Vn(Hn=>Hn.length?Hn:Pn))};if(xe&&!cn&&Pt.length===0&&Pn.length===0){Nt(""),Ws(!1);try{if((ft==null?void 0:ft.id)==="claude-code")$i(Le?"plan":"auto");else if((Qt==null?void 0:Qt.planActivation)==="command")await Wa(Le);else throw new Error(S1())}catch{Wt(tz()),lu()}return}const as=gn?{...gn,...vt?{permissionMode:vt}:{}}:null;vt&&$i(vt);let dd=null;const ms=vr.current;xe&&(Qt==null?void 0:Qt.planActivation)==="command"&&(dd=++jr.current,vr.current=Le,Vr(Le));const Yn=()=>{!so()||dd===null||jr.current!==dd||(vr.current=ms,Vr(ms))};if(!cn&&Pt.length===0&&Pn.length===0)return;if((cn||Pn.length>0)&&Si&&Pt.length===0){Nt(""),Vn([]),eo({promptId:Si,answers:[],note:cn||void 0,annotations:Ci}).then(Hn=>{Hn||lu()});return}const Sn=JSON.stringify({text:cn,images:Pt.map(Hn=>({mediaType:Hn.mediaType,name:Hn.name,dataUrl:Hn.dataUrl})),annotations:Ci,settings:as?{model:as.model,serviceTier:as.serviceTier,permissionMode:as.permissionMode,planMode:kt,reasoningLevel:as.reasoningLevel}:null}),qi=((hd=Sr.current)==null?void 0:hd.signature)===Sn?Sr.current.id:`ct_${crypto.randomUUID()}`;if(Sr.current={signature:Sn,id:qi},dr){if(!je||!(ft!=null&&ft.agentReady)){Yn();return}const Hn=je;Nt(""),yn([]),Vn([]),Kn(null);const ga=as?{model:as.model,serviceTier:as.serviceTier,permissionMode:as.permissionMode,planMode:(Qt==null?void 0:Qt.planActivation)==="command"?kt??(Dt==null?void 0:Dt.planMode):kt,reasoningLevel:as.reasoningLevel}:{};so()&&Ns({});const Ro=Pt.map(Er=>({mediaType:Er.mediaType,dataBase64:Er.dataUrl.slice(Er.dataUrl.indexOf(",")+1),name:Er.name}));try{(To=(await Wr(()=>r5(Hn,cn,ga,Ro.length?Ro:void 0,Ci,qi,rc&&!J&&!xe?"steer":void 0))).turn)!=null&&To.existing&&await tc(Hn),so()&&Kr(b0),((Sp=Sr.current)==null?void 0:Sp.id)===qi&&(Sr.current=null)}catch{Yn(),lu()}return}if(!(ft!=null&&ft.agentReady)){Yn();return}if(!as){Yn();return}let $r=je;try{Nt(Zn=>Zn===nn?"":Zn),yn(Zn=>Zn===Pt?[]:Zn),Vn(Zn=>Zn===Pn?[]:Zn),Kn(null),zs.current=!0;try{if(!$r){const io=await ac(as,kt);$r=io.id,ro=io.id}if(!Gn(Ce.queryKey))return;const Zn=Rc($r);await Ze.fetchQuery({...Zn,...((Cp=Ze.getQueryState(Zn.queryKey))==null?void 0:Cp.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{zs.current=!1}if(!Gn(Ce.queryKey))return;xn({type:"optimisticUser",sessionId:$r,text:cn||U0e(),attachments:Pt.map(Zn=>({url:Zn.dataUrl,mediaType:Zn.mediaType,name:Zn.name})),annotations:Pn}),xn({type:"busy",sessionId:$r,busy:!0}),so()&&ps(),so()&&me==="archived"&&ve("active");const Hn=as?{model:as.model,serviceTier:as.serviceTier,permissionMode:as.permissionMode,planMode:kt,reasoningLevel:as.reasoningLevel}:{};so()&&Ns({});const ga=Pt.map(Zn=>({mediaType:Zn.mediaType,dataBase64:Zn.dataUrl.slice(Zn.dataUrl.indexOf(",")+1),name:Zn.name})),Ro=$r;if(!Ro)throw new Error(B9e());(ol=(await Wr(()=>r5(Ro,cn,Hn,ga.length?ga:void 0,Ci,qi))).turn)!=null&&ol.existing&&await tc(Ro),so()&&Kr(b0),((_c=Sr.current)==null?void 0:_c.id)===qi&&(Sr.current=null)}catch(Hn){if(!Gn(Ce.queryKey)||(lu(),Yn(),!$r))return;const ga=Hn instanceof Error?Hn.message:String(Hn);if(!/session is busy/i.test(ga)&&await Ze.fetchQuery({...pi(e),staleTime:0}).then(Er=>{var Ui;return!!((Ui=Er.find(Zn=>Zn.id===$r))!=null&&Ui.busy)}).catch(()=>!1)){so()&&(Nt(Er=>Er===cn?"":Er),yn(Er=>Er===Pt?[]:Er),Vn(Er=>Er===Pn?[]:Er));return}xn({type:"busy",sessionId:$r,busy:!1}),xn({type:"localError",sessionId:$r,text:ove({error:Ae(ga)})})}}async function ac(J,he){const Se=_t.current,xe=Mt.current,Le=await I.mutateAsync([e,J.harness,{model:J.model,serviceTier:J.serviceTier,permissionMode:J.permissionMode,planMode:he,reasoningLevel:J.reasoningLevel,autonomy:D}]);return Mt.current===xe&&(lt(kt=>[Le,...kt.filter(vt=>vt.id!==Le.id)]),Ze.getQueryData(Ce.queryKey)||ha(!0)),Mt.current===xe&&_t.current===Se&&(Gt.current(Le.id,{replace:!0}),_t.current={...Se,activeId:Le.id}),Le}function sl(){const J=RPn(nn);Nt(J),window.requestAnimationFrame(()=>{var he,Se;(he=br.current)==null||he.focus(),(Se=br.current)==null||Se.setSelectionRange(J.length,J.length),Cr(J.length)})}async function Rs(){const J=wo;if(!J)return;if(Wt(null),dr){Wt(vme());return}const he=nn,Se=_t.current;let xe=je;const Le=()=>{const Pt=_t.current;return Pt.projectId===Se.projectId&&Pt.activeId===xe&&Pt.mainView===Se.mainView},kt=()=>{Le()&&Nt(Pt=>Pt||he)};Nt(""),Ws(!1);let vt=je;if(!vt){if(!(ft!=null&&ft.agentReady)||!gn){kt(),Wt(S1());return}try{const Pt=D4(Qt==null?void 0:Qt.planActivation,void 0,vr.current);vt=(await ac(gn,Pt)).id,xe=vt,Le()&&Ns({})}catch(Pt){kt();const Pn=Pt instanceof Error?Pt.message:String(Pt);Le()&&Wt(CN({error:Ae(Pn)}));return}}Le()&&me==="archived"&&ve("active");const cn=`${bf}shell-${Date.now()}`;xn({type:"localShell",sessionId:vt,id:cn,command:J}),Le()&&ps();try{const{message:Pt}=await V3n(vt,J);xn({type:"upsertMessage",sessionId:vt,message:Pt})}catch(Pt){const Pn=Pt instanceof Error?Pt.message:String(Pt);xn({type:"localShell",sessionId:vt,id:cn,command:J,error:CN({error:Ae(Pn)})})}}function Ms(){je&&X3n(je).catch(()=>{Wt(yEe())})}const oc=T.useCallback(async(J,he)=>{if(!(!je||ia.current)){ia.current=!0,Wt(null),Xc(J);try{const Se=mMn({model:Ir.model,serviceTier:Ir.serviceTier,permissionMode:Ir.permissionMode,planMode:Ir.planMode,reasoningLevel:Ir.reasoningLevel}),xe=je;(await K3n(xe,J,he,Se)).turn.existing&&await tc(xe),Kr(b0)}catch{Wt(R8e())}finally{ia.current=!1,Xc(null)}}},[je,Ir,tc]),il=T.useCallback((J,he)=>{if(!je||dr||!(ft!=null&&ft.agentReady))return;const Se=je;xn({type:"busy",sessionId:Se,busy:!0}),ps(),Wr(()=>W3n(Se,J,he)).catch(xe=>{xn({type:"busy",sessionId:Se,busy:!1});const Le=xe instanceof Error?xe.message:String(xe);xn({type:"localError",sessionId:Se,text:V8e({error:Ae(Le)})})})},[je,dr,ft==null?void 0:ft.agentReady,ps,Wr]),is=T.useCallback(J=>{if(!je||dr)return;const he=je,Se=Zl.current;xn({type:"activeLeaf",sessionId:he,leafId:J}),Wr(()=>Q3n(he,J)).catch(xe=>{xn({type:"activeLeaf",sessionId:he,leafId:Se});const Le=xe instanceof Error?xe.message:String(xe);xn({type:"localError",sessionId:he,text:NEe({error:Ae(Le)})})})},[je,dr,Wr]);function al(J){if(!je)return;const he=je;H3n(he,J).then(({removed:Se})=>{if(Se)return tc(he)}).catch(()=>Wt(B8e()))}async function ld(J){if(!je||bi)return;const he=je;Wt(null),Ii(J);try{await q3n(he,J),await tc(he)}catch{Wt(a9e())}finally{Ii(null)}}const Za=T.useRef(!1);T.useEffect(()=>{const J=he=>{Za.current=H4(he.target)};return document.addEventListener("pointerdown",J,!0),()=>document.removeEventListener("pointerdown",J,!0)},[]),T.useEffect(()=>{if(!dr||u!=="chat")return;function J(he){var xe;he.key!=="Escape"||he.defaultPrevented||(he.target===document.body?Za.current:H4(he.target))!==B||(he.preventDefault(),Ms(),(xe=br.current)==null||xe.focus())}return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[dr,je,u,B]);function Qs(J){iy(J),Dn.current.delete(J),Ot.current===J&&(Ot.current=null),_t.current.projectId===e&&_t.current.activeId===J&&_t.current.mainView==="chat"&&(Nt(""),yn([]),Vn([]),Gt.current(null,{replace:!0})),rn(he=>{if(!he.has(J))return he;const Se=new Set(he);return Se.delete(J),Se}),ri.current.delete(J)}function Ao(J,he){const Se=pi(J.projectId);_o(Ze,Se.queryKey,J.id),ts(Se.queryKey,xe=>xe==null?void 0:xe.map(Le=>Le.id===J.id?{...Le,...he}:Le))}function Ja(J,he){const Se=J.archived;Ao(J,{archived:he}),F.mutateAsync([J.id,he]).catch(()=>{Ao(J,{archived:Se})})}function Hi(J,he){const Se=J.title;Ao(J,{title:he}),q.mutateAsync([J.id,he]).catch(()=>{Ao(J,{title:Se})})}async function ud(J){var Se;const he=((Se=J.title)==null?void 0:Se.trim())||xv();if(window.confirm(vge({title:Ml(he)}))){try{await V.mutateAsync(J.id)}catch(xe){sn(Cge({title:Ml(he),error:Ae(xe instanceof Error?xe.message:String(xe))}),"error");return}Qs(J.id)}}const eo=T.useCallback(J=>{if(!je)return Promise.resolve(!1);const he=je;return xn({type:"busy",sessionId:he,busy:!0}),Wr(()=>Y3n(he,J)).then(()=>!0).catch(()=>!1).finally(()=>{Gn(Ce.queryKey)&&(Ze.fetchQuery({...Rc(he),staleTime:0}).catch(()=>{}),Ze.fetchQuery({...pi(e),staleTime:0}).catch(()=>{}))})},[je,e,Wr,Ce]),z_=/Mac|iPhone|iPad/.test(navigator.platform),xp=z_?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",wp=z_?"⌘ Enter":"Ctrl + Enter",_d=T.useCallback(()=>{ve("active"),A(null)},[A]),cc=T.useCallback(async()=>{try{const he=(await Ze.fetchQuery({...wj(),staleTime:0})).reduce((Se,xe)=>!Se||xe.lastActivityAt>Se.lastActivityAt?xe:Se,void 0);ve("active"),A(null,{projectId:(he==null?void 0:he.projectId)??e})}catch(J){sn(J instanceof Error?J.message:String(J),"error")}},[e,A]),j_=T.useCallback(J=>{ve("all"),A(J)},[A]);T.useEffect(()=>{if(B)return;const J=he=>{he.repeat||he.key!=="Enter"||!he.metaKey&&!he.ctrlKey||he.altKey||!he.shiftKey||H4(he.target)||(he.preventDefault(),cc())};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[cc,B]);const Y=[];if(ne==="projects"&&ct.forEach((J,he)=>{const Se=Be[he],Le=(J.id===e?Ye:Se.data??nM).filter(Pt=>!Pt.sideParentSessionId&&(UFn(me,Pt.archived)||Pt.id===je)).sort((Pt,Pn)=>Pn.updatedAt-Pt.updatedAt),kt=Kt[J.id]??6;let vt=Le.slice(0,kt);const cn=Le.find(Pt=>Pt.id===je);cn&&!vt.some(Pt=>Pt.id===je)&&(vt=[...vt.slice(0,kt-1),cn]),ne==="projects"&&Y.push({kind:"project",project:J}),vt.forEach(Pt=>Y.push({kind:"chat",project:J,session:Pt})),Le.length>kt&&Y.push({kind:"more",project:J}),!vt.length&&(ne==="projects"||Se.isPending||Se.error)&&Y.push({kind:"status",project:J,pending:Se.isPending,error:!!Se.error,retry:()=>{Se.refetch()}})}),ne==="list"){const J=((kp=Ke.data)==null?void 0:kp.pages.flatMap(xe=>xe.sessions))??[],he=Ye.find(xe=>xe.id===je);he&&!J.some(xe=>xe.id===he.id)&&J.push(he),J.filter(xe=>!Ac.has(xe.id)).sort((xe,Le)=>Le.updatedAt-xe.updatedAt).forEach(xe=>{const Le=oe.find(kt=>kt.id===xe.projectId);Le&&Y.push({kind:"chat",project:Le,session:xe})});const Se=ye??oe[0];Se&&(!Y.length||Ke.isFetchingNextPage||Ke.isError)&&Y.push({kind:"status",project:Se,pending:Ke.isPending||Ke.isFetchingNextPage,error:Ke.isError,retry:()=>{Ke.isFetchNextPageError?Ke.fetchNextPage():Ke.refetch()}})}const _e=ne==="list"||Ee,we=CT(Y,Oe,je),Te=we.lengthJ+P0(he),0),At=J=>J.kind==="chat"?J.session.id:`${J.kind}:${J.project.id}`,In=aF({count:Y.length,getScrollElement:()=>We.current,getItemKey:J=>At(Y[J]),estimateSize:J=>P0(Y[J]),overscan:5,rangeExtractor:J=>{const he=mC(J),Se=Y.findIndex(xe=>At(xe)===ht);return Se<0||he.includes(Se)?he:[...he,Se].sort((xe,Le)=>xe-Le)},enabled:_e&&a&&!B}),Qr=In.getVirtualItems(),Xs=((A_=Qr.at(-1))==null?void 0:A_.index)??-1;T.useEffect(()=>{ne==="list"&&a&&!B&&Xs>=Y.length-6&&Ke.hasNextPage&&!Ke.isFetching&&!Ke.isError&&Ke.fetchNextPage()},[ne,a,B,Xs,Y.length,Ke.hasNextPage,Ke.isFetching,Ke.isError,Ke.fetchNextPage]);const Us=_.jsxs("aside",{className:"session-rail w-75 shrink-0 flex flex-col mt-5 mac-titlebar:mt-8 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:pt-0 [&_.rail-body]:pb-0 [&_.rail-body]:ps-2 [&_.rail-body]:pe-1 border border-border rounded-lg overflow-visible shadow-elevated",children:[i,_.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[_.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":xp,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:cc,children:[_.jsx(Qf,{size:15}),D3()]}),_.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${u==="skills"?"active":""}`,onClick:()=>d("skills"),children:[_.jsx(k$,{size:15}),D2e()]}),uPn.map(J=>_.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${u!=="chat"&&u!=="skills"&&J.activeTabs.includes(u)?"active":""}`,"data-onboarding":J.id==="compute"?"nav-compute":void 0,onClick:()=>d(J.id),children:[J.icon,J.label()]},J.id))]}),_.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[_.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:ne==="projects"?MS():iL()}),_.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[c&&_.jsx(eg,{interactive:!0,content:nb(),className:"rounded-sm",children:_.jsx(Rt,{size:"small",className:"text-subtext","aria-label":nb(),onClick:c,children:_.jsx(M6n,{size:15,className:"text-subtext"})})}),_.jsx(VFn,{value:me,onChange:ve,grouping:ne,onGroupingChange:J=>{G(J);try{localStorage.setItem("sidebar-grouping",J)}catch{}Fe(!1),Ut({}),We.current&&(We.current.scrollTop=0)}})]})]}),_.jsxs("div",{className:"relative flex-1 min-h-0",children:[_.jsx("div",{ref:We,tabIndex:-1,className:`rail-body h-full overflow-x-hidden ${_e?"overflow-y-auto":"overflow-y-hidden"}`,children:_.jsxs("div",{className:"relative",style:{height:(_e?In.getTotalSize():nt)+(it?38:0)+(Ee?46:0)},children:[(_e?Qr.map(J=>({row:Y[J.index],top:J.start,index:J.index})):De.map((J,he)=>({row:J,top:0,index:he}))).map(({row:J,top:he,index:Se})=>{var kt;const xe=J.project,Le=J.kind==="chat"?J.session:null;return _.jsx("div",{"data-index":Se,onFocusCapture:()=>xt(At(J)),onBlurCapture:vt=>{vt.currentTarget.contains(vt.relatedTarget)||xt(null)},className:_e?"absolute top-0 start-0 w-full":"relative",style:{height:P0(J),transform:_e?`translateY(${he}px)`:void 0},children:J.kind==="project"?_.jsx("div",{className:"group h-9 flex items-end gap-1 rounded-md px-2.5 text-text",children:_.jsx(FRn,{project:xe,chatCount:(kt=ce.find(vt=>vt.projectId===xe.id))==null?void 0:kt.totalAgents,pinned:ae.includes(xe.id),onPin:()=>{const vt=ae.includes(xe.id)?ae.filter(cn=>cn!==xe.id):[...ae,xe.id];le(vt);try{localStorage.setItem("sidebar-pinned-projects",JSON.stringify(vt))}catch{}},onRemoved:()=>{xe.id===e&&ie({to:"/projects"})},onNewChat:()=>{xe.id===e?_d():ie({to:"/projects/$projectId/tasks/new",params:{projectId:xe.id}})}})}):Le?_.jsx("div",{className:ne==="projects"?"ms-5.5":void 0,children:_.jsx(XFn,{session:Le,active:Le.id===je&&u==="chat",unread:Jt.has(Le.id),busy:xe.id===e?mn.busySessions.has(Le.id):Le.busy,waiting:pa.has(Le.id),revealTitle:Fs.get(Le.id),onOpen:()=>{if(xe.id===e?A(Le.id):ie({to:"/projects/$projectId/tasks/$sessionId",params:{projectId:xe.id,sessionId:Le.id}}),xe.id===c0){T7n(Le.id);const vt=bwn[Le.id];vt&&(Lu({name:"demo_experiment_started",kind:"curated",experiment:vt}),Lu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:vt=>Hi(Le,vt),onSetArchived:vt=>Ja(Le,vt),onDelete:()=>void ud(Le)},Le.id)}):J.kind==="more"?_.jsx(Me,{variant:"ghost",size:"small",className:"ms-5.5 font-normal text-subtext",onClick:()=>{Fe(!0),Ut(vt=>({...vt,[xe.id]:(vt[xe.id]??6)+6}))},children:I3()}):J.kind==="status"&&_.jsx("div",{className:`flex h-full items-center px-2.5 text-sm text-subtext ${ne==="projects"?"ms-5.5":""}`,children:J.error?_.jsx(Me,{size:"small",onClick:J.retry,children:Ks()}):J.pending?_.jsx(Et,{}):me==="archived"?zve():Dve()})},At(J))}),it&&_.jsx("div",{className:"absolute start-0 flex h-9.5 w-full items-center pt-1",style:{top:_e?In.getTotalSize():nt},children:_.jsx(Me,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Fe(!0)},children:I3()})}),Ee&&_.jsx("div",{className:"absolute start-0 w-full pt-1",style:{top:In.getTotalSize()+(it?38:0)},children:_.jsx(Me,{variant:"ghost",size:"small",className:"text-subtext",onClick:()=>{Fe(!1),Ut({}),xt(null),We.current&&(We.current.scrollTop=0,We.current.focus())},children:zS()})})]})}),_e&&_.jsxs(_.Fragment,{children:[(In.scrollOffset??0)>0&&_.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 z-5 h-3 bg-linear-to-b from-background to-transparent"}),_.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-5 h-3 bg-linear-to-t from-background to-transparent"})]})]}),_.jsx(jB,{runtime:x})]}),oi="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",cu=!a&&!B&&_.jsx(Rt,{title:YN(),"aria-label":YN(),onClick:o,className:"mac-titlebar:ms-16",children:_.jsx(M$,{size:20})});return u!=="chat"?_.jsxs(_.Fragment,{children:[a&&Us,_.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!a&&_.jsx("div",{className:"flex h-12 shrink-0 items-center",children:cu}),_.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:r?_.jsxs("div",{role:"alert",className:"p-6 text-subtext",children:[r,_.jsx(Me,{onClick:s,children:Ks()})]}):t?_.jsxs(Ur,{className:"p-6",children:[_.jsx(Et,{}),qN()]}):H})]})]}):_.jsxs(_.Fragment,{children:[a&&Us,_.jsxs("section",{"data-side-chat":B||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${B?"":"mt-5"}`,children:[_.jsxs("div",{className:a||B?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[cu,_.jsxs("div",{className:oi,children:[_.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:ar&&_.jsxs(_.Fragment,{children:[(uc=ar.title)!=null&&uc.trim()?_.jsx(im,{variant:"header",className:"flex-initial",title:ar.title.trim(),children:_.jsx(Iq,{title:ar.title.trim(),animate:hs!==void 0},hs??"static")}):dr?_.jsx(Et,{}):null,_.jsx("span",{className:"min-w-0 truncate rounded-md border border-border bg-surface px-2.5 py-0.5 text-sm font-normal text-subtext",title:n,children:n})]})}),b&&_.jsx(Rt,{"data-tip":zN(),"aria-label":zN(),onClick:b,children:_.jsx(a6n,{size:15})})]})]}),r?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[_.jsx("p",{children:r}),_.jsx(Me,{onClick:s,children:Ks()})]}):Ya?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[_.jsx("p",{children:Ya.message}),_.jsx(Me,{onClick:()=>void Rn.refetch(),children:Ks()})]}):t||Qa?_.jsx("div",{className:"chat-loading flex-1 min-h-0 overflow-hidden [scrollbar-gutter:stable_both-edges]",role:"status","aria-label":qN(),"aria-busy":"true",children:_.jsxs("div",{"aria-hidden":"true",className:"mx-auto flex h-full w-full max-w-readable flex-col gap-6 px-4 pb-8 pt-4 motion-safe:animate-pulse",children:[_.jsx("div",{className:"ms-auto h-14 w-3/5 shrink-0 rounded-lg bg-surface"}),_.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-5/6","w-full","w-11/12","w-2/3","w-full","w-3/4","w-1/2"].map((J,he)=>_.jsx("div",{className:`h-3 rounded bg-surface ${J}`},he))}),_.jsx("div",{className:"ms-auto h-10 w-2/5 shrink-0 rounded-lg bg-surface"}),_.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:["w-full","w-11/12","w-3/4","w-5/6","w-1/2","w-full","w-5/6","w-11/12","w-2/3","w-3/4","w-1/3"].map((J,he)=>_.jsx("div",{className:`h-3 rounded bg-surface ${J}`},he))}),_.jsx("div",{className:"ms-auto h-16 w-1/2 shrink-0 rounded-lg bg-surface"})]})}):!jo&&(ar!=null&&ar.sideParentSessionId)?_.jsxs("div",{className:"chat-empty flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center text-subtext",children:[_.jsx(nm,{size:22}),_.jsx("p",{className:"m-0 text-balance",children:qsn()})]}):jo?_.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:xi,tabIndex:0,role:"region","aria-label":((fd=ar==null?void 0:ar.title)==null?void 0:fd.trim())||xv(),onScroll:J=>{or(J.currentTarget),ca.dismiss()},children:_.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:si,children:[_.jsx(tq,{projectId:e,sessionId:je,children:_.jsx(qFn,{scrollRef:xi,scrollToEndRef:js,stickToBottom:ss,onPinToBottom:ps,messages:As,allMessages:el,canFork:gp,onFork:il,onSelectFork:is,busy:dr,onOpenFile:sc,onOpenRun:p,onOpenSpawnedSession:j_,runExperimentName:m,onOpenExperiment:w,experimentName:k,onRespond:eo,onOpenPlan:ma,onOpenSubagent:cd,recoveringTurnId:Yo,onRecover:oc,skills:S_},je)}),dr&&k_&&_.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:d7e()}),dr&&!k_&&!tl&&!vp&&_.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:_.jsx("span",{className:"tool-running-shimmer",children:FEe()})})]})}):_.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[_.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:_.jsx(by,{})}),_.jsx("h2",{children:y7e()}),Xn&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:oM,"aria-hidden":"true",children:aM.map((J,he)=>_.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${q4[he].box}`,children:[_.jsxs("span",{className:`flex w-full items-center gap-2.5 ${q4[he].icon}`,children:[_.jsx(J,{size:17}),_.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),_.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},he))}),_.jsxs(Ur,{className:"mt-3",role:"status",children:[_.jsx(Et,{}),_.jsx("span",{children:dCe()})]})]}),Ts&&Ts.length>0&&_.jsx("div",{className:oM,role:"group","aria-label":yCe(),children:Ts.map((J,he)=>{const Se=aM[he],xe=q4[he];return _.jsxs("button",{type:"button",className:`flex min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background px-5 py-4 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${xe.box}`,onClick:()=>{Lu({name:"project_starter_clicked",slot:he+1}),Lu({name:"first_action",surface:au,action:"starter_click"}),yp(J.prompt)},children:[_.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[_.jsx(Se,{size:17,className:xe.icon}),J.title]}),_.jsx("span",{className:"w-full truncate text-sm text-subtext",children:J.prompt})]},he)})})]}),ca.action&&_.jsxs(Me,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:ca.action.x,top:ca.action.top,transform:"translateX(-50%)"},onMouseDown:J=>J.preventDefault(),onClick:ca.add,children:[_.jsx(R$,{size:14}),kye()]}),_.jsxs("div",{inert:t||!!r||Qa,className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[jo&&_.jsx(Rt,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${Zo?"opacity-0":"opacity-100"}`,title:ez(),"aria-label":ez(),inert:Zo,onClick:ic,children:dr&&!k_?_.jsx(ip,{size:18,className:"tool-running-shimmer-icon"}):_.jsx(qSn,{size:16})}),qs&&!(zo&&qs.promptId===zo.promptId)&&_.jsx(mBn,{synthesized:qs.synthesized,agentLabel:ar?Iu[ar.harness]:OEe(),showResumeModes:(ar==null?void 0:ar.harness)==="claude-code",onView:J=>ma==null?void 0:ma(qs.plan,qs.promptId,J),onApprove:J=>eo({promptId:qs.promptId,approve:!0,...J?{resumeMode:J}:{}}),onReject:()=>eo({promptId:qs.promptId,approve:!1}),onRevise:J=>{je&&C_({sessionId:je,promptId:qs.promptId}),eo({promptId:qs.promptId,approve:!1,note:J})}}),Pi.length>0&&_.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Pi.map((J,he)=>_.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:J.error?`${J.text} -${J.error}`:J.text,children:[J.dispatchState==="blocked"?f.jsx(ZS,{size:13,className:"shrink-0 text-accent-amber"}):f.jsx(USn,{size:13,className:"shrink-0 text-muted"}),f.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:J.text}),J.dispatchState!=="blocked"&&f.jsx("span",{className:"shrink-0 text-sm text-muted",children:J.dispatchState==="retrying"?VRn(J.nextRetryAt,bp):f8e()}),J.dispatchState==="blocked"?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>void ld(J.id),"aria-label":ZJ({text:J.text}),disabled:bi!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:bi===J.id?FL():Ks()}),f.jsx("button",{onClick:()=>al(J.id),"aria-label":GJ({text:J.text}),disabled:bi!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:wke()}),he===w_&&heal(J.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:f.jsx(ur,{size:11})})]},J.id))}),N_&&f.jsxs("div",{id:rl,role:"note",className:`composer-demo-hint ${lM}`,children:[f.jsx(Bh,{size:16,className:"shrink-0 text-primary"}),f.jsx("span",{className:"flex-1",dir:"auto",children:owe()}),f.jsx(At,{size:"small","aria-label":w1(),title:w1(),onClick:()=>{var J;Lr(!0),(J=vr.current)==null||J.focus()},children:f.jsx(ur,{size:14})})]}),N&&!mr&&p&&f.jsxs("div",{role:"note",className:`composer-demo-run-hint ${lM}`,children:[f.jsx(Bh,{size:16,className:"shrink-0 text-primary"}),f.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[f.jsx("span",{children:LN()}),f.jsxs(Oe,{size:"small",onClick:()=>p(N,"keepOpen"),children:[f.jsx(Ko,{size:14}),$3()]}),f.jsx("span",{children:DN()})]}),f.jsx(At,{size:"small","aria-label":w1(),title:w1(),onClick:()=>{var J;Gr(!0),(J=vr.current)==null||J.focus()},children:f.jsx(ur,{size:14})})]}),f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:N?`${LN()} ${$3()} ${DN()}`:""}),!B&&!Be&&c&&f.jsx(gRn,{projects:oe,activity:ce,projectId:e,projectName:n,onNewProject:c,onSelect:J=>{J!==e&&ie({to:"/projects/$projectId/tasks/new",params:{projectId:J}})}}),f.jsxs("div",{className:`composer-box relative flex flex-col border ${Fi?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[_t&&!_t.agentReady&&f.jsx("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:_t.catalogPending?f.jsxs("span",{children:[_t.name," — ",Ef()]}):f.jsxs(f.Fragment,{children:[f.jsxs("strong",{children:[_t.name," ",D4e()]})," ",_t.agentNote?s_(_t.agentNote):C8e()]})}),ec&&f.jsx(rPn,{skills:ai,activeIndex:ko,onPick:jr,onHover:Ga}),wi&&f.jsx(cPn,{activeSessionId:Be,onClose:()=>oa(!1),onResume:J=>{oa(!1),be("all"),A(J.id,{projectId:J.projectId})},onImport:J=>{oa(!1),ad(J)}}),Jt.length>0&&f.jsx(RPn,{annotations:Jt,onClear:()=>{Gn([]),window.requestAnimationFrame(()=>{var J;return(J=vr.current)==null?void 0:J.focus()})},onRemove:J=>{const he=Jt.filter(Se=>Se.id!==J);Gn(he),he.length===0&&window.requestAnimationFrame(()=>{var Se;return(Se=vr.current)==null?void 0:Se.focus()})}}),fn.length>0&&f.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:fn.map((J,he)=>{const Se=()=>yn(xe=>xe.filter((Le,yt)=>yt!==he));return J.mediaType==="application/pdf"?f.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:J.name,children:[f.jsx(_y,{size:22}),f.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:J.name??"document.pdf"}),f.jsx("button",{title:VN(),"aria-label":VN(),onClick:Se,children:f.jsx(ur,{size:11})})]},he):f.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[f.jsx("img",{src:J.dataUrl,alt:uL()}),f.jsx("button",{title:KN(),"aria-label":KN(),onClick:Se,children:f.jsx(ur,{size:11})})]},he)})}),Tn&&f.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Tn}),rs&&f.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:rs}),f.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Fi?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[f.jsx("textarea",{dir:"auto",ref:vr,"aria-describedby":N_?rl:void 0,className:"relative z-1 bg-transparent",value:cn,placeholder:Si?aNe():rc&&_t?dEe({harness:Ae(Iu[_t.id]),shortcut:Ae(wp)}):mn?_t!=null&&_t.agentReady?eve({harness:Ae(Iu[mn.harness])}):P1e({harness:Ae(Iu[mn.harness])}):I0e(),rows:2,onPaste:v_,onDragOver:J=>{J.dataTransfer.types.includes("Files")&&J.preventDefault()},onDrop:J=>{J.dataTransfer.files.length!==0&&(J.preventDefault(),Zc(Array.from(J.dataTransfer.files)))},onChange:J=>{const he=J.target.value,Se=J.target.selectionStart;Sr(Se);const xe=Se>0&&/\s/.test(he[Se-1])&&!Si&&!_s.current&&XR(he)===null?M4(he,Se-1):null,Le=xe&&Nk(xe.query),yt=xe?(he.slice(0,xe.start)+he.slice(xe.end)).trim():"";if(xe&&Le&&(Le==="plan"||!O4(Le)&&!yt)&&fa.some(gt=>gt.name===Le)){x_(Le,he,xe);return}Tt(he),Ws(!1)},onSelect:J=>Sr(J.currentTarget.selectionStart),onCompositionStart:()=>{_s.current=!0},onCompositionEnd:()=>{_s.current=!1},onKeyDown:J=>{if(ec){if(J.key==="ArrowDown"||J.key==="ArrowUp"){J.preventDefault();const he=J.key==="ArrowDown"?1:-1;Ga((ko+he+ai.length)%ai.length);return}if(J.key==="Tab"||J.key==="Enter"){J.preventDefault(),jr(ai[ko]);return}if(J.key==="Escape"){J.preventDefault(),Ws(!0);return}}if(J.key==="Backspace"&&_a(J.currentTarget)){J.preventDefault();return}if(J.key==="Enter"&&!J.shiftKey&&!J.nativeEvent.isComposing){if(J.preventDefault(),Fi){Rs();return}ou({queue:J.metaKey||J.ctrlKey})}}}),f.jsx(nPn,{text:cn,editingTokenEnd:fs==null?void 0:fs.end,isCommand:No,skills:fa,projectId:e,textareaRef:vr})]}),f.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[f.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:qa.ref,children:[f.jsx(At,{type:"button",className:"composer-bare",title:bw(),"aria-label":bw(),"aria-haspopup":"dialog","aria-expanded":qa.open,onClick:()=>qa.setOpen(J=>!J),children:f.jsx(wCn,{size:16})}),qa.open&&f.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[f.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:bw()}),f.jsx(lMn,{})]})]}),f.jsx("input",{ref:pt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:J=>{Zc(Array.from(J.target.files??[])),J.target.value=""}}),f.jsx(At,{type:"button",className:"composer-attach",title:AN(),"aria-label":AN(),onClick:()=>{var J;return(J=pt.current)==null?void 0:J.click()},children:f.jsx(eCn,{size:16})}),da&&f.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:ON({goal:Ml(da)}),"aria-label":ON({goal:Ml(da)}),onClick:()=>void tu("clear"),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(A$,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(ur,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{className:"truncate",children:z4e()})]}),So&&f.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:PN(),"aria-label":PN(),onClick:()=>void mp(),children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(j6n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(ur,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:K3e()})]}),Fi&&f.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:BN(),"aria-label":BN(),onClick:sl,children:[f.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[f.jsx(Xf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),f.jsx(ur,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),f.jsx("span",{children:aL()})]}),f.jsx("div",{className:"min-w-0 flex-1"}),f.jsxs("div",{className:"flex min-w-0 items-center",children:[f.jsx(T7n,{value:mn,onSelect:Jc,onOpenSettings:()=>d("harnesses"),permissionChoices:_t!=null&&_t.agentReady?(Qt==null?void 0:Qt.permissionModes)??[]:[],defaultPermissionId:(Qt==null?void 0:Qt.defaultPermissionMode)??null,onSelectPermission:$i,reasoningChoices:_t!=null&&_t.agentReady?eu.choices:[],defaultReasoningId:eu.defaultId,onSelectReasoning:sd,autonomy:(Mt==null?void 0:Mt.autonomy)??D,onSelectAutonomy:wn,lockHarness:!!Mt,openRequest:ua}),f.jsx(iPn,{usage:Mt==null?void 0:Mt.contextUsage})]}),fr&&!Si?f.jsx(At,{className:"send-btn",variant:"stop",title:ZN(),"aria-label":ZN(),onClick:Ms,children:f.jsx(ur,{size:16})}):f.jsx(At,{className:`send-btn ${N_&&(_t!=null&&_t.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Fi?QN():L3(),"aria-label":Fi?QN():L3(),onClick:()=>void(Fi?Rs():ou()),disabled:Fi?!wo||!Be&&!(_t!=null&&_t.agentReady):!(_t!=null&&_t.agentReady)||!cn.trim()&&fn.length===0&&Jt.length===0,children:f.jsx(z$,{size:16})})]})]})]})]})]})}const lM="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",AFn=[],TFn=[];function Ca({className:e,...n}){return f.jsx("div",{className:$s("relative flex min-h-0 flex-1 flex-col",e),...n})}function dh({className:e,...n}){return f.jsx("div",{className:$s("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function zc({className:e,...n}){return f.jsx("div",{className:$s("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const uM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function RFn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=ft(Rc(n)),d=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),_=T.useRef(null),p=T.useRef(null),m=T.useRef(!0);if(T.useLayoutEffect(()=>{m.current=!0;const v=_.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),T.useLayoutEffect(()=>{const v=_.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[d]),T.useEffect(()=>{const v=_.current,y=p.current;if(!v||!y)return;const x=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return x.observe(y),x.observe(v),()=>x.disconnect()},[d===null]),d===null)return f.jsx(Ca,{children:f.jsx("div",{className:uM,children:f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:gI()})})});let w=null;for(const v of d)if(w=Ib(v.parts,t),w)break;return f.jsx(Ca,{children:f.jsx("div",{className:uM,ref:_,onScroll:v=>{const y=v.currentTarget;m.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:f.jsx("div",{ref:p,children:w?f.jsx(tq,{projectId:e,sessionId:n,children:f.jsx(mFn,{spawn:w,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c})}):f.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Yhn()})})})})}function MFn({experiment:e}){var s;const n=ft($B(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return f.jsx(dh,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?f.jsxs(zc,{children:[Ipe()," ",Ae(r)]}):t?t.diff.trim()?f.jsxs(f.Fragment,{children:[t.truncated&&f.jsx(SP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),f.jsx(EP,{diff:t.diff,partial:t.truncated})]}):f.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Ype():Ape()}):f.jsx(zc,{children:Upe()})})}function $q({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:c}){return f.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":Eze(),children:[f.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:Mze()}),f.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:dL()})]}),r&&f.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[f.jsx(tg,{size:12}),f.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&f.jsx(rp,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:f.jsx(J6,{size:13})}),f.jsx("span",{className:"flex-1"}),f.jsx(At,{title:rz(),"aria-label":rz(),onClick:c,children:o?f.jsx(Ct,{}):f.jsx(lCn,{size:13})})]})}const OFn=/\.(md|mdx|markdown)$/i,DFn=/\.tex$/i,LFn=/\.html?$/i,IFn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,$Fn=/\.(csv|tsv|xlsx?|ods)$/i,BFn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,PFn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,FFn=/\.pdf$/i,HFn=/\.(docx?|log|rtf|txt)$/i;function qFn(e){return IFn.test(e)}function VC(e){return OFn.test(e)}function Bq(e){return DFn.test(e)}function UFn(e){return LFn.test(e)}function Wh({name:e}){const n=VC(e)?"markdown":qFn(e)?"image":$Fn.test(e)?"spreadsheet":BFn.test(e)?"code":PFn.test(e)?"archive":FFn.test(e)?"pdf":HFn.test(e)||Bq(e)?"document":"file";let t;return n==="markdown"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),f.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),f.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=f.jsxs(f.Fragment,{children:[f.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=f.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),f.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),f.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),f.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),f.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function Pq(e,n){const t=navigator.clipboard;if(!t){tn(mL(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>tn(Cf(),"success")).catch(r=>tn(r instanceof Error?r.message:String(r),"error"))}function Fq({name:e,onCommit:n,onCancel:t}){const[r,s]=T.useState(e),i=T.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return f.jsx(qr,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":yPe({path:Ae(e)}),onFocus:o=>{const c=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,c>0?c:e.length)},onChange:o=>s(o.target.value),onClick:o=>o.stopPropagation(),onDoubleClick:o=>o.stopPropagation(),onBlur:a,onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),o.currentTarget.blur()):o.key==="Escape"&&(o.preventDefault(),i.current=!0,t())}})}function Hq(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function qq({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=T.useRef(null),c=T.useRef(a);c.current=a;const[u,d]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const w=document.activeElement instanceof HTMLElement?document.activeElement:null;return d({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(w==null||w.focus())}},[e]),T.useEffect(()=>{const m=()=>c.current(),w=v=>{var y;(y=o.current)!=null&&y.contains(v.target instanceof Node?v.target:null)||c.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),c.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),c.current())};return document.addEventListener("pointerdown",w),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",w),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const _=m=>{c.current(),m()},p=(m,w,k=!1)=>f.jsx(on,{size:"compact",role:"menuitem",danger:k,onClick:()=>_(w),children:f.jsx("span",{children:m})});return ni.createPortal(f.jsxs("div",{ref:o,role:"menu","aria-label":aPe({path:Ae(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var y,x;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const w=[...((y=o.current)==null?void 0:y.querySelectorAll("button"))??[]],k=w.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:w[0]),v=m.key==="ArrowDown"?1:-1;(x=w[(k+v+w.length)%w.length])==null||x.focus()},children:[p(dPe(),n),t&&p(cL(),t),r&&p(JBe(),r),p(jde(),s),i&&p(oL(),i,!0)]}),document.body)}const Mk=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),_M=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function fM(){return{dirs:new Map,files:[]}}function Uq(e){const n=fM();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?f.jsx(qc,{size:13,className:_M}):f.jsx(yo,{size:13,className:_M}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&f.jsx(KC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:d})]})}function KC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const d=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),_=[...e.files].sort((p,m)=>p.localeCompare(m));return f.jsxs(f.Fragment,{children:[d.map(p=>{const m=n?`${n}/${p}`:p;return f.jsx(GFn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u},`d:${m}`)}),_.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&u)return f.jsxs("div",{className:Mk,style:{paddingInlineStart:8+t*14},children:[f.jsx(Wh,{name:p}),f.jsx(Fq,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=ns(k=>i(m,k));return f.jsxs("button",{type:"button",className:Mk,style:{paddingInlineStart:8+t*14},...w,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}w.onKeyDown(k)},title:SZ({name:Ae(m)}),children:[f.jsx(Wh,{name:p}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function VFn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,z;const c=t.branchName,u=ft({...PB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),d=ft({...vb(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),_=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,w=$B(t.id),k=YK({queryKey:w.queryKey})>0,v=(z=d.data)!=null&&z.exists&&d.data.branch===c?t.chatSessionId??void 0:void 0,y=()=>{u.refetch()},x=T.useMemo(()=>_?Uq(_.entries):null,[_]),b=r==="files"?m:k,C=T.useCallback(A=>{const j=new Set(s);j.has(A)?j.delete(A):j.add(A),a(j)},[s,a]);return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[f.jsx($q,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?cy(n.githubOwner,n.githubRepo,c):void 0,githubTitle:JD({branch:Ae(c)}),refreshing:b,onRefresh:()=>r==="files"?y():void Ze.invalidateQueries(w)}),r==="changes"?f.jsx(MFn,{experiment:t},t.id):f.jsxs(f.Fragment,{children:[(_==null?void 0:_.truncated)&&f.jsx(zc,{children:Vze()}),p&&x&&f.jsxs(zc,{children:[aje()," ",Ae(p)]}),f.jsx(dh,{children:x?x.dirs.size===0&&x.files.length===0?f.jsx(zc,{children:Jze()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(KC,{node:x,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,j)=>v?o(A,v,void 0,j):o(A,void 0,c,j)})}):f.jsx(zc,{children:p?ES({error:Ae(p)}):NS()})})]})]})}function WC({icon:e,title:n,description:t}){return f.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[f.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),f.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&f.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function KFn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,I,F;const c=n.id,d=(($=ft(pi(c)).data)==null?void 0:$.some(q=>q.id===e&&q.busy))??!1,_=ft({...vb(e??""),enabled:!!e,refetchInterval:d?5e3:!1}),p=_.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=ft({...PB(c,m),enabled:!e||_.isSuccess,refetchInterval:d?5e3:!1}),k=w.data,v=(I=_.error??w.error)==null?void 0:I.message,y=_.isFetching||w.isFetching,[x,b]=T.useState(null),[C,N]=T.useState(null),z=T.useCallback(()=>{e&&Ze.invalidateQueries(vb(e)),Ze.invalidateQueries({queryKey:Nt("getCodeTree",c),predicate:q=>!GD(q)})},[e,c]),A=T.useRef(d);T.useEffect(()=>{A.current&&!d&&z(),A.current=d},[d,z]);const j=T.useMemo(()=>k?Uq(k.entries):null,[k]),M=T.useCallback(q=>{const V=new Set(r);V.has(q)?V.delete(q):V.add(q),i(V)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,L=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?m2n({branch:Ae(D.baselineBranch)}):DS()),B=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,U=D?n2n({branch:Ae(`${L}${B>0?"*":""}`)}):l2n({branch:Ae(n.baselineBranch)}),H=D?D.branch:n.baselineBranch,Q=(q,V)=>D?a(q,e,void 0,V):a(q,void 0,n.baselineBranch,V),K=(k==null?void 0:k.root)==="worktree",Z=async(q,V)=>{try{await Awn(c,q,V,{sessionId:e}),z()}catch(ie){tn(ie instanceof Error?ie.message:String(ie),"error")}},ee=q=>{const V=(k==null?void 0:k.path)??n.repoPath;Pq(V,q)};return f.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[f.jsx($q,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:U,branchTitle:U,githubHref:n.githubEnabled&&H?cy(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?JD({branch:Ae(H)}):void 0,refreshing:y,onRefresh:z}),v&&(p||k)&&f.jsxs(zc,{children:[Y2n()," ",Ae(v)]}),!k||e&&!p?f.jsx(dh,{children:f.jsx(zc,{children:v?ES({error:Ae(v)}):NS()})}):D&&t==="changes"?f.jsx(dh,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:B===0||!D.diff?f.jsx("div",{className:"changes-note text-sm text-muted",children:I2n()}):f.jsxs(f.Fragment,{children:[D.diff.truncated&&f.jsx(SP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),f.jsx(EP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):f.jsxs(dh,{children:[k.truncated&&f.jsx(zc,{children:k2n()}),j?j.dirs.size===0&&j.files.length===0?f.jsx(WC,{icon:vo,title:U2n(),description:UVe()}):f.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:f.jsx(KC,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(q,V)=>{b(Hq(q,V))},onRename:(q,V)=>{N(null),Z(q,{action:"rename",newName:V})},onCancelRename:()=>N(null)})}):f.jsx(zc,{children:A2n()})]}),x&&f.jsx(qq,{target:x,onOpen:()=>Q(x.path,"keepOpen"),onRename:K&&o(x.path)?()=>N(x.path):void 0,onDuplicate:K?()=>void Z(x.path,{action:"duplicate"}):void 0,onCopyPath:()=>ee(x.path),onDelete:K?()=>{window.confirm(VBe({path:Ae(x.path)}))&&Z(x.path,{action:"delete"})}:void 0,onClose:()=>b(null)})]})}function Gq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const d=e.replace(/\r\n?/g,` -`),_=CB(d,o6(n));return d.endsWith(` -`)?_.slice(0,-1):_},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=T.useRef(null);T.useEffect(()=>{var d;r!==void 0&&(a?((d=o.current)==null||d.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=oB(i.length),u=T.useMemo(()=>i.map((d,_)=>f.jsxs("div",{ref:_+1===a?o:void 0,className:`file-view-line flex items-stretch ${_+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[f.jsx("span",{"data-line":_+1,className:`${aB} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),f.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${mb} ${iB}`,children:EB(d)?f.jsx("br",{}):d})]},_)),[i,c,a]);return f.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${mb}`,children:[i.length>0&&f.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}const $b=T.createContext(null);function WFn({url:e,name:n}){return f.jsx(rp,{size:"small",href:e,download:n,"aria-label":Zv({name:Ae(n)}),"data-tip":Zv({name:Ae(n)}),"data-tip-align":"end",children:f.jsx(eg,{size:13})})}const QFn=T.lazy(()=>tW(()=>import("./PdfPreview-CUNM1AGl.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:Kq})));function Vq(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function Kq({url:e,name:n}){return f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[ont()," ",f.jsxs("a",{href:e,download:n,children:[B3()," ",Ae(n)]})]})}function Ok({kind:e,url:n,name:t,download:r=!0}){const[s,i]=T.useState(!1),a=T.useContext($b);if(T.useEffect(()=>i(!1),[e,n]),s)return f.jsx(Kq,{url:n,name:t});let o;return e==="image"?o=f.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:f.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?o=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?o=f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:f.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):o=f.jsx(T.Suspense,{fallback:f.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:f.jsx(Ct,{})}),children:f.jsx(QFn,{url:n,name:t,download:r,onError:()=>i(!0)},n)}),f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&e!=="pdf"&&a&&ni.createPortal(f.jsx(WFn,{url:n,name:t}),a)]})}const XFn=e=>({queryKey:Nt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function Wq(e,n=!0){return ft({...XFn(e),enabled:n,subscribed:n}).data??null}function YFn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function ZFn(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),i=r===-1?"":t.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1),u=o.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of o.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const d=u.join("/");if(!d)return null;const _=new URLSearchParams(c);_.delete("path");const p=_.toString();return{path:d,url:`${zf(e,d)}${p?`&${p}`:""}${i}`}}function JFn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const Qq="orx:files-tree-width",Xq="orx:artifacts-collapsed:",Yq=180,Zq=320,eHn=8,tHn=280;function nHn(){try{const e=Number(localStorage.getItem(Qq));if(Number.isFinite(e)&&e>=Yq&&e<=Zq)return e}catch{}return tHn}function rHn(e){try{const n=localStorage.getItem(`${Xq}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function bm(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=bm(t.children??[],n);if(r)return r}}return null}function Jq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(YFn(i))return i;const a=ZFn(e,n,i);if(!a)return null;const o=bm(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),d=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${d}`};return f.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:f.jsx(uRn,{remarkPlugins:[XH,[YH,rq]],rehypePlugins:[CH],components:{a:({href:i,children:a,...o})=>{const c=!i||i.startsWith("#"),u=c?i:s(i);return u?f.jsx("a",{...o,href:u,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):f.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?f.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[f.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&f.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...sq},children:JH(JFn(t))})})}function sHn(e){return e.presentation==="text"&&VC(e.name)?"markdown":Vq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function iHn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=II,i=F6(e,n.path),a=ft({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const d=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&d.projectId===e&&d.path===n.path&&(d.modifiedAt!==n.modifiedAt||d.size!==n.size||d.version!==null&&d.version!==r)&&Ze.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((u=a.error)==null?void 0:u.message)??(c===null?Lde():null),wantsText:s}}function aHn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=sHn(n),i=Wq(zf(e,n.path)),{text:a,binary:o,truncated:c,error:u,wantsText:d}=iHn(e,n,s,i),[_,p]=T.useState(!1),[m,w]=T.useState(null),k=s==="markdown",v=n.path.split("/").slice(0,-1).join("/"),y=`${zf(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let x;return s==="image"||s==="audio"||s==="video"||s==="pdf"?x=f.jsx($b.Provider,{value:m,children:f.jsx(Ok,{kind:s,url:y,name:n.name})}):s==="download"||!d||o?x=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?wde():kpe()," ",f.jsx("a",{href:y,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?gL():qde()})]}):u?x=f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[mhe()," ",Ae(u)]}):a===null?x=f.jsxs(Ur,{children:[f.jsx(Ct,{})," ",sL()]}):k&&!_?x=f.jsx(Jq,{projectId:e,folder:v,markdown:a,entries:r}):x=f.jsx(Gq,{text:a,path:n.path}),f.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[f.jsxs("div",{className:"fpreview-head @container flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[f.jsx(Wh,{name:n.name}),f.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ae(n.path),children:n.name}),f.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[Xhe()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),f.jsx("div",{ref:w,className:"contents"}),(s==="text"||s==="download")&&f.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Dl(n.size)}),k&&f.jsx(At,{size:"small",active:_,"data-tip":_?Jv():Zd(),"data-tip-align":"end","aria-label":_?Jv():Zd(),onClick:()=>p(b=>!b),children:f.jsx(b5,{size:13})}),f.jsx(rp,{size:"small",href:y,target:"_blank",rel:"noopener noreferrer","data-tip":kN(),"data-tip-align":"end","aria-label":kN(),children:f.jsx(Rf,{size:13})}),f.jsx(At,{size:"small","data-tip":wN(),"data-tip-align":"end","aria-label":wN(),onClick:()=>{window.confirm(kS({path:Ae(n.path)}))&&t(n.path)},children:f.jsx(Yf,{size:13})})]}),f.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${k&&!_?"doc":""}`,children:[x,c&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:khe()})]})]})}function eU({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:d,onCancelRename:_}){return f.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var w;const m={paddingInlineStart:8+Math.min(n,eHn)*14};if(p.isDir){const k=!t.has(p.path);return f.jsxs("div",{className:"min-w-0 max-w-full",children:[f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[f.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":k?Qfe({name:Ae(p.name)}):pde({name:Ae(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:f.jsx(yo,{size:13,className:k?"open":""})}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),f.jsx(At,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":lhe(),"data-tip-align":"end","aria-label":cde({name:Ae(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(kS({path:Ae(p.path)}))&&o(p.path)},children:f.jsx(Yf,{size:12})})]}),k&&(((w=p.children)==null?void 0:w.length)??0)>0&&f.jsx(eU,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:d,onCancelRename:_})]},p.path)}return c===p.path?f.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[f.jsx(Wh,{name:p.name}),f.jsx(Fq,{name:p.name,onCommit:k=>d(p.path,k),onCancel:_})]},p.path):f.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:IX({path:Ae(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[f.jsx(Wh,{name:p.name}),f.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function oHn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=T.useState(null),[a,o]=T.useState(()=>rHn(e.id)),[c,u]=T.useState(nHn),[d,_]=T.useState(null),[p,m]=T.useState(null),w=T.useRef(null);T.useEffect(()=>{try{localStorage.setItem(`${Xq}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=z=>{var L;z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId);const A=(L=w.current)==null?void 0:L.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=B=>{const U=Math.round(B.clientX-((A==null?void 0:A.left)??0)),H=Math.min(Math.max(U,Yq),Zq);u(H);try{localStorage.setItem(Qq,String(H))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};T.useEffect(()=>{if(!s||!n)return;const z=bm(n.entries,s);(!z||z.isDir)&&i(null)},[s,n]);const v=z=>o(A=>{const j=new Set(A);return j.has(z)?j.delete(z):j.add(z),j}),y=z=>{(s===z||s!=null&&s.startsWith(z+"/"))&&i(null),D4n(e.id,z).catch(()=>{})},x=async(z,A)=>{try{await L4n(e.id,z,A),A.action==="rename"&&s===z&&i(null)}catch(j){tn(j instanceof Error?j.message:String(j),"error")}},b=z=>{n&&Pq(n.dir,z)};if(!n)return f.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:f.jsxs(Ur,{className:"p-5",children:[f.jsx(Ct,{})," ",qhe()]})});const C=z=>f.jsx(eU,{entries:z,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:y,renamingPath:p,onContextMenu:(A,j)=>{_(Hq(A,j))},onRename:(A,j)=>{m(null),x(A,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),N=s?bm(n.entries,s):null;return n.entries.length===0?f.jsx(WC,{icon:QS,title:rpe(),description:mpe()}):f.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[f.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:w,style:{width:c},children:[f.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:k}),f.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[C(n.entries),n.truncated&&f.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Ahe()})]})]}),N?f.jsx(aHn,{projectId:e.id,entry:N,onDelete:y,artifactEntries:n.entries},N.path):f.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[f.jsx(Q6n,{size:22,strokeWidth:1.5}),f.jsx("span",{children:Xde()})]}),d&&f.jsx(qq,{target:d,onOpen:()=>t(d.path),onRename:r(d.path)?()=>m(d.path):void 0,onDuplicate:()=>void x(d.path,{action:"duplicate"}),onCopyPath:()=>b(d.path),onDelete:()=>{window.confirm(kS({path:Ae(d.path)}))&&y(d.path)},onClose:()=>_(null)})]})}const tU=20*1024*1024,nU="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",rU="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",cHn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",lHn="text-sm font-normal text-text",uHn="mt-1 mb-0 text-sm leading-relaxed text-text";function sU(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const i=s.indexOf(",");n(i>=0?s.slice(i+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function _Hn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function iU({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=T.useState(!1),a=T.useRef(null);return f.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:o=>{o.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:o=>{var u;if(o.preventDefault(),i(!1),n)return;const c=(u=o.dataTransfer.files)==null?void 0:u[0];c&&r(c)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var c;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(c=a.current)==null||c.click())},children:[f.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const c=(u=o.target.files)==null?void 0:u[0];c&&r(c),o.target.value=""}}),n?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{}),f.jsx("span",{children:_un()})]}):f.jsxs(f.Fragment,{children:[f.jsx(ECn,{size:20,strokeWidth:1.5}),f.jsx("span",{children:t})]})]})}function aU({bytes:e,updatedAt:n}){return f.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Dl(e),n>0&&f.jsxs("span",{className:"text-muted",children:[" · ",Dc(n)]})]})}function fHn({skill:e,onError:n}){const t=vn({mutationFn:i3n}),r=t.isPending;return f.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[f.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[f.jsx("span",{className:lHn,children:e.name}),e.origin&&f.jsx(Zt,{size:"small",children:e.origin})]}),f.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(At,{size:"small","data-tip":e.origin?hcn():lln(),"data-tip-align":"end","aria-label":e.origin?zcn({name:Ae(e.name)}):aon({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?xcn({name:Ae(e.name)}):Jan({name:Ae(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:f.jsx(Yf,{size:13})})]})}function dHn({template:e,onError:n}){const t=vn({mutationFn:n3n}),r=t.isPending,s=e.supportFiles.length;return f.jsxs("div",{className:cHn,children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("span",{className:"text-base font-medium text-text",children:e.name}),f.jsxs("p",{className:uHn,children:[e.entry,s>0&&(s===1?ecn():Dcn({count:ln(s)}))]})]}),f.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),f.jsx(At,{"data-tip":mln(),"data-tip-align":"end","aria-label":yon({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(don({name:Ae(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:f.jsx(Yf,{size:13})})]})}function hHn(){var x;const e=vn({mutationFn:s3n}),n=ft(Z3n()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),c=T.useCallback(()=>{const b=r.current;i(!!b&&b.scrollTop>1),o(!!b&&b.scrollHeight-b.scrollTop-b.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const b=r.current;if(!b)return;const C=new ResizeObserver(c);return C.observe(b),()=>C.disconnect()},[t,c]);const u=n.isFetching,d=(x=n.error)==null?void 0:x.message,[_,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),y=T.useCallback(async b=>{if(!v.current){if(w(null),!_Hn(b.name)){w(Cun());return}if(b.size>tU){w(hI());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:b.name,contentBase64:await sU(b)})}catch(C){w(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return f.jsxs("section",{className:nU,children:[f.jsxs("div",{className:"flex items-baseline gap-2.5",children:[f.jsx("h3",{children:sun()}),f.jsxs(Oe,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[f.jsx(xo,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Ym()]})]}),f.jsx("p",{className:rU,children:Non()}),f.jsx(iU,{accept:".md,.markdown,.zip",busy:_,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Oon()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:Van()})]}),onFile:b=>void y(b)}),m&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),d&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Hcn()," ",d]}),t===void 0?d?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Ct,{})," ",Aln()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Uln()}):f.jsxs("div",{className:"relative mt-1",children:[f.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(b=>f.jsx(fHn,{skill:b,onError:w},b.name))}),s&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function pHn(){var d;const e=vn({mutationFn:t3n}),n=ft(Y3n()),t=n.data,r=(d=n.error)==null?void 0:d.message,[s,i]=T.useState(!1),[a,o]=T.useState(null),c=T.useRef(!1),u=T.useCallback(async _=>{if(c.current)return;o(null);const p=_.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(Run());return}if(_.size>tU){o(hI());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:_.name,contentBase64:await sU(_)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return f.jsxs("section",{className:nU,children:[f.jsx("h3",{children:kln()}),f.jsx("p",{className:rU,children:vun()}),f.jsx(iU,{accept:".tex,.zip",busy:s,prompt:f.jsxs(f.Fragment,{children:[f.jsx("span",{children:Fon()}),f.jsx("span",{className:"block ps-4 mt-1 text-text",children:vpn()})]}),onFile:_=>void u(_)}),a&&f.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&f.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Qcn()," ",r]}),t===void 0?r?null:f.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[f.jsx(Ct,{})," ",Iln()]}):t.length===0?f.jsx("div",{className:"pt-3 text-sm text-subtext",children:Yln()}):f.jsx("div",{className:"flex flex-col mt-1",children:t.map(_=>f.jsx(dHn,{template:_,onError:o},_.name))})]})}function mHn(){return f.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[f.jsx("h1",{children:nln()}),f.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:ocn()}),f.jsx(hHn,{}),f.jsx(pHn,{})]})}const gHn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function gc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return f.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?gHn:""}`,onClick:i,onDoubleClick:a,title:s?_pn({label:n}):n,"aria-label":s?spn({label:n}):n,children:[t,f.jsx("span",{className:"tab-label","data-label":n,children:f.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),f.jsx("span",{role:"button",className:"tab-close",title:dze(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:f.jsx(ur,{size:12})})]})}const dM=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function vHn({owner:e,repo:n,branch:t}){return!e||!n?f.jsx("span",{className:dM,children:f.jsx("code",{children:t})}):f.jsxs("a",{className:dM,href:cy(e,n,t),target:"_blank",rel:"noopener noreferrer",title:M3({name:Ae(t)}),children:[f.jsx("code",{children:t}),f.jsx(J6,{size:12})]})}const U4=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),hM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function pM(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function mM(e,n){return J0((e.endedAt??n)-e.createdAt)}function bHn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=SI(r),c=r.some(_=>_.status==="running"||_.status==="starting"),[u,d]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[c]),f.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:f.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[f.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[f.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[f.jsx("h1",{children:e.title||e.slug}),f.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),f.jsx(Pl,{status:a?Aa(a):"idle"})]}),f.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&f.jsxs(Oe,{...ns(_=>s(a.id,_)),children:[f.jsx(Ko,{size:15}),mIe()]}),f.jsxs(Oe,{...ns(i),children:[f.jsx(fy,{size:15}),xLe()]})]}),e.description&&f.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[f.jsx("h2",{children:HLe()}),f.jsx($c,{text:e.description})]}),f.jsxs("section",{className:U4,children:[f.jsx("h2",{children:a?hLe():UIe()}),a&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[f.jsx(Pl,{status:Aa(a)}),f.jsx(eC,{backend:a.backend}),f.jsxs("span",{title:IIe(),children:[f.jsx(jSn,{size:13}),pM(a.createdAt)]}),f.jsxs("span",{title:QLe(),children:[f.jsx(HSn,{size:13}),mM(a,u)]}),a.commitSha&&f.jsxs("span",{title:zLe(),children:[f.jsx(b6n,{size:14}),f.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&f.jsxs("span",{children:[nIe()," ",a.exitCode]})]}),a.command&&f.jsxs("code",{className:hM,children:["$ ",a.command]}),o&&f.jsx("p",{className:"experiment-overview-monitoring mt-4 text-accent-amber text-sm wrap-anywhere",children:o}),a.resultMarkdown&&f.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:f.jsx($c,{text:a.resultMarkdown})})]})]}),f.jsxs("section",{className:U4,children:[f.jsx("h2",{children:"Git"}),f.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[f.jsx(vHn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&f.jsxs("span",{children:[lIe()," ",f.jsx("code",{children:n.slug})]}),f.jsxs("span",{title:pM(e.createdAt),children:[DLe()," ",Dc(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&f.jsxs("code",{className:hM,children:["$ ",e.runCommand]})]}),r.length>0&&f.jsxs("section",{className:U4,children:[f.jsx("h2",{children:AIe()}),f.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((_,p)=>f.jsxs("button",{...ns(m=>s(_.id,m)),children:[f.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[kIe()," ",r.length-p]}),f.jsx(Pl,{status:Aa(_)}),f.jsx("span",{children:Dc(_.createdAt)}),f.jsx("span",{children:mM(_,u)}),f.jsx(Ko,{size:13})]},_.id))})]})]})})}function gM(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=py(t,!0);let i=!1,a=0,o=!1,c=!1;async function u(){if(o){c=!0;return}o=!0;try{for(;;){const _=await Swn(e,a);if(i)return;if(_.dataBase64&&r.write(gM(_.dataBase64)),a=_.nextOffset,_.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const d=e5n(e,_=>{if(i)return;const p=gM(_.dataBase64);!o&&_.offset===a?(r.write(p),a+=p.length):_.offset+p.length>a&&u()});return u(),()=>{i=!0,d(),s()}},[e]),f.jsx("div",{ref:n,className:"h-full w-full"})}function xHn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(d=>d.experimentId===e.id).sort((d,_)=>_.createdAt-d.createdAt);return t==="overview"?f.jsx(bHn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(d,_)=>o("terminal",d,_),onOpenCode:d=>c("files",d)}):f.jsx(wHn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function wHn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[c,u]=T.useState(!1),d=T.useRef(null),_=t?n.find(v=>v.id===t)??null:n[0]??null,p=(_==null?void 0:_.status)==="running"||(_==null?void 0:_.status)==="starting",m=!!(_&&p&&(_.cancelRequested||a===_.id)),w=v=>{const y=n.findIndex(x=>x.id===v);return y===-1?n.length:n.length-y};T.useEffect(()=>{if(!c)return;const v=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function k(){if(_){i(null),o(_.id);try{await zI(_.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return f.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[f.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[f.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),f.jsx("span",{className:"flex-1"}),s&&f.jsx("span",{className:"error",role:"alert",children:s}),p&&f.jsxs(Oe,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[f.jsx(E$,{size:13}),m?dje():hL()]}),n.length>0&&_&&f.jsxs("div",{className:"run-history relative shrink-0",ref:d,children:[f.jsxs(Oe,{title:iDe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[f.jsxs("span",{children:[sz()," ",w(_.id)]}),f.jsx(Pl,{status:m?"cancelling":Aa(_)}),f.jsx(qc,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&f.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(v=>f.jsxs(on,{className:"justify-start",active:v.id===(_==null?void 0:_.id),onClick:()=>{r(v.id),u(!1)},children:[f.jsxs("span",{className:"font-medium",children:[sz()," ",w(v.id)]}),f.jsx(Pl,{status:Aa(v)}),f.jsx("span",{className:"ms-auto text-xs text-muted",children:Dc(v.createdAt)})]},v.id))})]})]}),f.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:_?f.jsx(yHn,{runId:_.id},_.id):f.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?ho():VOe()})})]})}let Dk=!1;function vM(e){Dk=!0;try{return window.confirm(e)}finally{Dk=!1}}const Lk=e=>e.replace(/\r\n/g,` +${J.error}`:J.text,children:[J.dispatchState==="blocked"?_.jsx(ZS,{size:13,className:"shrink-0 text-accent-amber"}):_.jsx(f6n,{size:13,className:"shrink-0 text-muted"}),_.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:J.text}),J.dispatchState!=="blocked"&&_.jsx("span",{className:"shrink-0 text-sm text-muted",children:J.dispatchState==="retrying"?pMn(J.nextRetryAt,bp):f8e()}),J.dispatchState==="blocked"?_.jsxs(_.Fragment,{children:[_.jsx("button",{onClick:()=>void ld(J.id),"aria-label":ZJ({text:J.text}),disabled:bi!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:bi===J.id?FL():Ks()}),_.jsx("button",{onClick:()=>al(J.id),"aria-label":GJ({text:J.text}),disabled:bi!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:wke()}),he===w_&&heal(J.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:_.jsx(_r,{size:11})})]},J.id))}),N_&&_.jsxs("div",{id:rl,role:"note",className:`composer-demo-hint ${lM}`,children:[_.jsx(Bh,{size:16,className:"shrink-0 text-primary"}),_.jsx("span",{className:"flex-1",dir:"auto",children:owe()}),_.jsx(Rt,{size:"small","aria-label":k1(),title:k1(),onClick:()=>{var J;Bn(!0),(J=br.current)==null||J.focus()},children:_.jsx(_r,{size:14})})]}),N&&!gr&&p&&_.jsxs("div",{role:"note",className:`composer-demo-run-hint ${lM}`,children:[_.jsx(Bh,{size:16,className:"shrink-0 text-primary"}),_.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[_.jsx("span",{children:LN()}),_.jsxs(Me,{size:"small",onClick:()=>p(N,"keepOpen"),children:[_.jsx(Ko,{size:14}),$3()]}),_.jsx("span",{children:DN()})]}),_.jsx(Rt,{size:"small","aria-label":k1(),title:k1(),onClick:()=>{var J;Gr(!0),(J=br.current)==null||J.focus()},children:_.jsx(_r,{size:14})})]}),_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:N?`${LN()} ${$3()} ${DN()}`:""}),!B&&!je&&c&&_.jsx(PRn,{projects:oe,activity:ce,projectId:e,projectName:n,onNewProject:c,onSelect:J=>{J!==e&&ie({to:"/projects/$projectId/tasks/new",params:{projectId:J}})}}),_.jsxs("div",{className:`composer-box relative flex flex-col border ${Fi?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[ft&&!ft.agentReady&&_.jsx("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:ft.catalogPending?_.jsxs("span",{children:[ft.name," — ",Ef()]}):_.jsxs(_.Fragment,{children:[_.jsxs("strong",{children:[ft.name," ",D4e()]})," ",ft.agentNote?s_(ft.agentNote):C8e()]})}),ec&&_.jsx(EPn,{skills:ai,activeIndex:ko,onPick:Ar,onHover:Ga}),wi&&_.jsx(TPn,{activeSessionId:je,onClose:()=>oa(!1),onResume:J=>{oa(!1),ve("all"),A(J.id,{projectId:J.projectId})},onImport:J=>{oa(!1),ad(J)}}),en.length>0&&_.jsx(tFn,{annotations:en,onClear:()=>{Vn([]),window.requestAnimationFrame(()=>{var J;return(J=br.current)==null?void 0:J.focus()})},onRemove:J=>{const he=en.filter(Se=>Se.id!==J);Vn(he),he.length===0&&window.requestAnimationFrame(()=>{var Se;return(Se=br.current)==null?void 0:Se.focus()})}}),fn.length>0&&_.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:fn.map((J,he)=>{const Se=()=>yn(xe=>xe.filter((Le,kt)=>kt!==he));return J.mediaType==="application/pdf"?_.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:J.name,children:[_.jsx(fy,{size:22}),_.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:J.name??"document.pdf"}),_.jsx("button",{title:VN(),"aria-label":VN(),onClick:Se,children:_.jsx(_r,{size:11})})]},he):_.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[_.jsx("img",{src:J.dataUrl,alt:uL()}),_.jsx("button",{title:KN(),"aria-label":KN(),onClick:Se,children:_.jsx(_r,{size:11})})]},he)})}),Tn&&_.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Tn}),rs&&_.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:rs}),_.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Fi?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[_.jsx("textarea",{dir:"auto",ref:br,"aria-describedby":N_?rl:void 0,className:"relative z-1 bg-transparent",value:nn,placeholder:Si?aNe():rc&&ft?dEe({harness:Ae(Iu[ft.id]),shortcut:Ae(wp)}):gn?ft!=null&&ft.agentReady?eve({harness:Ae(Iu[gn.harness])}):P1e({harness:Ae(Iu[gn.harness])}):I0e(),rows:2,onPaste:v_,onDragOver:J=>{J.dataTransfer.types.includes("Files")&&J.preventDefault()},onDrop:J=>{J.dataTransfer.files.length!==0&&(J.preventDefault(),Zc(Array.from(J.dataTransfer.files)))},onChange:J=>{const he=J.target.value,Se=J.target.selectionStart;Cr(Se);const xe=Se>0&&/\s/.test(he[Se-1])&&!Si&&!_s.current&&XR(he)===null?M4(he,Se-1):null,Le=xe&&Nk(xe.query),kt=xe?(he.slice(0,xe.start)+he.slice(xe.end)).trim():"";if(xe&&Le&&(Le==="plan"||!O4(Le)&&!kt)&&fa.some(vt=>vt.name===Le)){x_(Le,he,xe);return}Nt(he),Ws(!1)},onSelect:J=>Cr(J.currentTarget.selectionStart),onCompositionStart:()=>{_s.current=!0},onCompositionEnd:()=>{_s.current=!1},onKeyDown:J=>{if(ec){if(J.key==="ArrowDown"||J.key==="ArrowUp"){J.preventDefault();const he=J.key==="ArrowDown"?1:-1;Ga((ko+he+ai.length)%ai.length);return}if(J.key==="Tab"||J.key==="Enter"){J.preventDefault(),Ar(ai[ko]);return}if(J.key==="Escape"){J.preventDefault(),Ws(!0);return}}if(J.key==="Backspace"&&_a(J.currentTarget)){J.preventDefault();return}if(J.key==="Enter"&&!J.shiftKey&&!J.nativeEvent.isComposing){if(J.preventDefault(),Fi){Rs();return}ou({queue:J.metaKey||J.ctrlKey})}}}),_.jsx(CPn,{text:nn,editingTokenEnd:fs==null?void 0:fs.end,isCommand:No,skills:fa,projectId:e,textareaRef:br})]}),_.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[_.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:qa.ref,children:[_.jsx(Rt,{type:"button",className:"composer-bare",title:yw(),"aria-label":yw(),"aria-haspopup":"dialog","aria-expanded":qa.open,onClick:()=>qa.setOpen(J=>!J),children:_.jsx(UCn,{size:16})}),qa.open&&_.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[_.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:yw()}),_.jsx(RMn,{})]})]}),_.jsx("input",{ref:mt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:J=>{Zc(Array.from(J.target.files??[])),J.target.value=""}}),_.jsx(Rt,{type:"button",className:"composer-attach",title:AN(),"aria-label":AN(),onClick:()=>{var J;return(J=mt.current)==null?void 0:J.click()},children:_.jsx(wCn,{size:16})}),da&&_.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:ON({goal:Ml(da)}),"aria-label":ON({goal:Ml(da)}),onClick:()=>void tu("clear"),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(A$,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),_.jsx("span",{className:"truncate",children:z4e()})]}),So&&_.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:PN(),"aria-label":PN(),onClick:()=>void mp(),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Y6n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),_.jsx("span",{children:K3e()})]}),Fi&&_.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:BN(),"aria-label":BN(),onClick:sl,children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Xf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),_.jsx("span",{children:aL()})]}),_.jsx("div",{className:"min-w-0 flex-1"}),_.jsxs("div",{className:"flex min-w-0 items-center",children:[_.jsx(e8n,{value:gn,onSelect:Jc,onOpenSettings:()=>d("harnesses"),permissionChoices:ft!=null&&ft.agentReady?(Qt==null?void 0:Qt.permissionModes)??[]:[],defaultPermissionId:(Qt==null?void 0:Qt.defaultPermissionMode)??null,onSelectPermission:$i,reasoningChoices:ft!=null&&ft.agentReady?eu.choices:[],defaultReasoningId:eu.defaultId,onSelectReasoning:sd,autonomy:(Dt==null?void 0:Dt.autonomy)??D,onSelectAutonomy:wn,lockHarness:!!Dt,openRequest:ua}),_.jsx(zPn,{usage:Dt==null?void 0:Dt.contextUsage})]}),dr&&!Si?_.jsx(Rt,{className:"send-btn",variant:"stop",title:ZN(),"aria-label":ZN(),onClick:Ms,children:_.jsx(_r,{size:16})}):_.jsx(Rt,{className:`send-btn ${N_&&(ft!=null&&ft.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Fi?QN():L3(),"aria-label":Fi?QN():L3(),onClick:()=>void(Fi?Rs():ou()),disabled:Fi?!wo||!je&&!(ft!=null&&ft.agentReady):!(ft!=null&&ft.agentReady)||!nn.trim()&&fn.length===0&&en.length===0,children:_.jsx(z$,{size:16})})]})]})]})]})]})}const lM="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",JFn=[],eHn=[];function Ca({className:e,...n}){return _.jsx("div",{className:$s("relative flex min-h-0 flex-1 flex-col",e),...n})}function dh({className:e,...n}){return _.jsx("div",{className:$s("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function zc({className:e,...n}){return _.jsx("div",{className:$s("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const uM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function tHn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=dt(Rc(n)),d=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),f=T.useRef(null),p=T.useRef(null),m=T.useRef(!0);if(T.useLayoutEffect(()=>{m.current=!0;const v=f.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),T.useLayoutEffect(()=>{const v=f.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[d]),T.useEffect(()=>{const v=f.current,y=p.current;if(!v||!y)return;const x=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return x.observe(y),x.observe(v),()=>x.disconnect()},[d===null]),d===null)return _.jsx(Ca,{children:_.jsx("div",{className:uM,children:_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:gI()})})});let w=null;for(const v of d)if(w=$b(v.parts,t),w)break;return _.jsx(Ca,{children:_.jsx("div",{className:uM,ref:f,onScroll:v=>{const y=v.currentTarget;m.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:_.jsx("div",{ref:p,children:w?_.jsx(tq,{projectId:e,sessionId:n,children:_.jsx(BFn,{spawn:w,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c})}):_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:vpn()})})})})}function nHn({experiment:e}){var s;const n=dt($B(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return _.jsx(dh,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?_.jsxs(zc,{children:[Ipe()," ",Ae(r)]}):t?t.diff.trim()?_.jsxs(_.Fragment,{children:[t.truncated&&_.jsx(SP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),_.jsx(EP,{diff:t.diff,partial:t.truncated})]}):_.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Ype():Ape()}):_.jsx(zc,{children:Upe()})})}function $q({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:c}){return _.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&_.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":Eze(),children:[_.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:Mze()}),_.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:dL()})]}),r&&_.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[_.jsx(ng,{size:12}),_.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&_.jsx(rp,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:_.jsx(J6,{size:13})}),_.jsx("span",{className:"flex-1"}),_.jsx(Rt,{title:rz(),"aria-label":rz(),onClick:c,children:o?_.jsx(Et,{}):_.jsx(TCn,{size:13})})]})}const rHn=/\.(md|mdx|markdown)$/i,sHn=/\.tex$/i,iHn=/\.html?$/i,aHn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,oHn=/\.(csv|tsv|xlsx?|ods)$/i,cHn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,lHn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,uHn=/\.pdf$/i,_Hn=/\.(docx?|log|rtf|txt)$/i;function fHn(e){return aHn.test(e)}function VC(e){return rHn.test(e)}function Bq(e){return sHn.test(e)}function dHn(e){return iHn.test(e)}function Wh({name:e}){const n=VC(e)?"markdown":fHn(e)?"image":oHn.test(e)?"spreadsheet":cHn.test(e)?"code":lHn.test(e)?"archive":uHn.test(e)?"pdf":_Hn.test(e)||Bq(e)?"document":"file";let t;return n==="markdown"?t=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),_.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=_.jsxs(_.Fragment,{children:[_.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),_.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),_.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=_.jsxs(_.Fragment,{children:[_.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),_.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=_.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),_.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),_.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),_.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),_.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function Pq(e,n){const t=navigator.clipboard;if(!t){sn(mL(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>sn(Cf(),"success")).catch(r=>sn(r instanceof Error?r.message:String(r),"error"))}function Fq({name:e,onCommit:n,onCancel:t}){const[r,s]=T.useState(e),i=T.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return _.jsx(qr,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":yPe({path:Ae(e)}),onFocus:o=>{const c=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,c>0?c:e.length)},onChange:o=>s(o.target.value),onClick:o=>o.stopPropagation(),onDoubleClick:o=>o.stopPropagation(),onBlur:a,onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),o.currentTarget.blur()):o.key==="Escape"&&(o.preventDefault(),i.current=!0,t())}})}function Hq(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function qq({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=T.useRef(null),c=T.useRef(a);c.current=a;const[u,d]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var k;const m=o.current;if(!m)return;const w=document.activeElement instanceof HTMLElement?document.activeElement:null;return d({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(w==null||w.focus())}},[e]),T.useEffect(()=>{const m=()=>c.current(),w=v=>{var y;(y=o.current)!=null&&y.contains(v.target instanceof Node?v.target:null)||c.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),c.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),c.current())};return document.addEventListener("pointerdown",w),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",w),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const f=m=>{c.current(),m()},p=(m,w,k=!1)=>_.jsx(un,{size:"compact",role:"menuitem",danger:k,onClick:()=>f(w),children:_.jsx("span",{children:m})});return ni.createPortal(_.jsxs("div",{ref:o,role:"menu","aria-label":aPe({path:Ae(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var y,x;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const w=[...((y=o.current)==null?void 0:y.querySelectorAll("button"))??[]],k=w.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:w[0]),v=m.key==="ArrowDown"?1:-1;(x=w[(k+v+w.length)%w.length])==null||x.focus()},children:[p(dPe(),n),t&&p(cL(),t),r&&p(JBe(),r),p(jde(),s),i&&p(oL(),i,!0)]}),document.body)}const Mk=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),_M=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function fM(){return{dirs:new Map,files:[]}}function Uq(e){const n=fM();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?_.jsx(qc,{size:13,className:_M}):_.jsx(yo,{size:13,className:_M}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&_.jsx(KC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:d})]})}function KC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const d=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return _.jsxs(_.Fragment,{children:[d.map(p=>{const m=n?`${n}/${p}`:p;return _.jsx(hHn,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u},`d:${m}`)}),f.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&u)return _.jsxs("div",{className:Mk,style:{paddingInlineStart:8+t*14},children:[_.jsx(Wh,{name:p}),_.jsx(Fq,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=ns(k=>i(m,k));return _.jsxs("button",{type:"button",className:Mk,style:{paddingInlineStart:8+t*14},...w,onContextMenu:k=>{o&&(k.preventDefault(),o(k,m))},onKeyDown:k=>{if(o&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),o(k,m);return}w.onKeyDown(k)},title:SZ({name:Ae(m)}),children:[_.jsx(Wh,{name:p}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function pHn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,z;const c=t.branchName,u=dt({...PB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),d=dt({...bb(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),f=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,w=$B(t.id),k=YK({queryKey:w.queryKey})>0,v=(z=d.data)!=null&&z.exists&&d.data.branch===c?t.chatSessionId??void 0:void 0,y=()=>{u.refetch()},x=T.useMemo(()=>f?Uq(f.entries):null,[f]),b=r==="files"?m:k,C=T.useCallback(A=>{const j=new Set(s);j.has(A)?j.delete(A):j.add(A),a(j)},[s,a]);return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[_.jsx($q,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?ly(n.githubOwner,n.githubRepo,c):void 0,githubTitle:JD({branch:Ae(c)}),refreshing:b,onRefresh:()=>r==="files"?y():void Ze.invalidateQueries(w)}),r==="changes"?_.jsx(nHn,{experiment:t},t.id):_.jsxs(_.Fragment,{children:[(f==null?void 0:f.truncated)&&_.jsx(zc,{children:Vze()}),p&&x&&_.jsxs(zc,{children:[aje()," ",Ae(p)]}),_.jsx(dh,{children:x?x.dirs.size===0&&x.files.length===0?_.jsx(zc,{children:Jze()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(KC,{node:x,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,j)=>v?o(A,v,void 0,j):o(A,void 0,c,j)})}):_.jsx(zc,{children:p?ES({error:Ae(p)}):NS()})})]})]})}function WC({icon:e,title:n,description:t}){return _.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[_.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),_.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&_.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function mHn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,I,F;const c=n.id,d=(($=dt(pi(c)).data)==null?void 0:$.some(q=>q.id===e&&q.busy))??!1,f=dt({...bb(e??""),enabled:!!e,refetchInterval:d?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=dt({...PB(c,m),enabled:!e||f.isSuccess,refetchInterval:d?5e3:!1}),k=w.data,v=(I=f.error??w.error)==null?void 0:I.message,y=f.isFetching||w.isFetching,[x,b]=T.useState(null),[C,N]=T.useState(null),z=T.useCallback(()=>{e&&Ze.invalidateQueries(bb(e)),Ze.invalidateQueries({queryKey:jt("getCodeTree",c),predicate:q=>!GD(q)})},[e,c]),A=T.useRef(d);T.useEffect(()=>{A.current&&!d&&z(),A.current=d},[d,z]);const j=T.useMemo(()=>k?Uq(k.entries):null,[k]),M=T.useCallback(q=>{const V=new Set(r);V.has(q)?V.delete(q):V.add(q),i(V)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,L=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?I2n({branch:Ae(D.baselineBranch)}):DS()),B=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,U=D?k2n({branch:Ae(`${L}${B>0?"*":""}`)}):A2n({branch:Ae(n.baselineBranch)}),H=D?D.branch:n.baselineBranch,Q=(q,V)=>D?a(q,e,void 0,V):a(q,void 0,n.baselineBranch,V),K=(k==null?void 0:k.root)==="worktree",Z=async(q,V)=>{try{await Zwn(c,q,V,{sessionId:e}),z()}catch(ie){sn(ie instanceof Error?ie.message:String(ie),"error")}},ee=q=>{const V=(k==null?void 0:k.path)??n.repoPath;Pq(V,q)};return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[_.jsx($q,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:U,branchTitle:U,githubHref:n.githubEnabled&&H?ly(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?JD({branch:Ae(H)}):void 0,refreshing:y,onRefresh:z}),v&&(p||k)&&_.jsxs(zc,{children:[vwn()," ",Ae(v)]}),!k||e&&!p?_.jsx(dh,{children:_.jsx(zc,{children:v?ES({error:Ae(v)}):NS()})}):D&&t==="changes"?_.jsx(dh,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:B===0||!D.diff?_.jsx("div",{className:"changes-note text-sm text-muted",children:swn()}):_.jsxs(_.Fragment,{children:[D.diff.truncated&&_.jsx(SP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),_.jsx(EP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):_.jsxs(dh,{children:[k.truncated&&_.jsx(zc,{children:U2n()}),j?j.dirs.size===0&&j.files.length===0?_.jsx(WC,{icon:vo,title:_wn(),description:UVe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(KC,{node:j,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(q,V)=>{b(Hq(q,V))},onRename:(q,V)=>{N(null),Z(q,{action:"rename",newName:V})},onCancelRename:()=>N(null)})}):_.jsx(zc,{children:Y2n()})]}),x&&_.jsx(qq,{target:x,onOpen:()=>Q(x.path,"keepOpen"),onRename:K&&o(x.path)?()=>N(x.path):void 0,onDuplicate:K?()=>void Z(x.path,{action:"duplicate"}):void 0,onCopyPath:()=>ee(x.path),onDelete:K?()=>{window.confirm(VBe({path:Ae(x.path)}))&&Z(x.path,{action:"delete"})}:void 0,onClose:()=>b(null)})]})}function Gq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const d=e.replace(/\r\n?/g,` +`),f=CB(d,o6(n));return d.endsWith(` +`)?f.slice(0,-1):f},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=T.useRef(null);T.useEffect(()=>{var d;r!==void 0&&(a?((d=o.current)==null||d.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=oB(i.length),u=T.useMemo(()=>i.map((d,f)=>_.jsxs("div",{ref:f+1===a?o:void 0,className:`file-view-line flex items-stretch ${f+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[_.jsx("span",{"data-line":f+1,className:`${aB} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),_.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${gb} ${iB}`,children:EB(d)?_.jsx("br",{}):d})]},f)),[i,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${gb}`,children:[i.length>0&&_.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}const Bb=T.createContext(null);function gHn({url:e,name:n}){return _.jsx(rp,{size:"small",href:e,download:n,"aria-label":Jv({name:Ae(n)}),"data-tip":Jv({name:Ae(n)}),"data-tip-align":"end",children:_.jsx(tg,{size:13})})}const vHn=T.lazy(()=>tW(()=>import("./PdfPreview-DTe4mY-0.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:Kq})));function Vq(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function Kq({url:e,name:n}){return _.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[ont()," ",_.jsxs("a",{href:e,download:n,children:[B3()," ",Ae(n)]})]})}function Ok({kind:e,url:n,name:t,download:r=!0}){const[s,i]=T.useState(!1),a=T.useContext(Bb);if(T.useEffect(()=>i(!1),[e,n]),s)return _.jsx(Kq,{url:n,name:t});let o;return e==="image"?o=_.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:_.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?o=_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:_.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?o=_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:_.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):o=_.jsx(T.Suspense,{fallback:_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:_.jsx(Et,{})}),children:_.jsx(vHn,{url:n,name:t,download:r,onError:()=>i(!0)},n)}),_.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&e!=="pdf"&&a&&ni.createPortal(_.jsx(gHn,{url:n,name:t}),a)]})}const bHn=e=>({queryKey:jt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function Wq(e,n=!0){return dt({...bHn(e),enabled:n,subscribed:n}).data??null}function yHn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function xHn(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),i=r===-1?"":t.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1),u=o.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of o.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const d=u.join("/");if(!d)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:d,url:`${zf(e,d)}${p?`&${p}`:""}${i}`}}function wHn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const Qq="orx:files-tree-width",Xq="orx:artifacts-collapsed:",Yq=180,Zq=320,kHn=8,SHn=280;function CHn(){try{const e=Number(localStorage.getItem(Qq));if(Number.isFinite(e)&&e>=Yq&&e<=Zq)return e}catch{}return SHn}function EHn(e){try{const n=localStorage.getItem(`${Xq}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function ym(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=ym(t.children??[],n);if(r)return r}}return null}function Jq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(yHn(i))return i;const a=xHn(e,n,i);if(!a)return null;const o=ym(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),d=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${d}`};return _.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:_.jsx(MRn,{remarkPlugins:[XH,[YH,rq]],rehypePlugins:[CH],components:{a:({href:i,children:a,...o})=>{const c=!i||i.startsWith("#"),u=c?i:s(i);return u?_.jsx("a",{...o,href:u,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):_.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?_.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[_.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&_.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...sq},children:JH(wHn(t))})})}function NHn(e){return e.presentation==="text"&&VC(e.name)?"markdown":Vq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function zHn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=II,i=F6(e,n.path),a=dt({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const d=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&d.projectId===e&&d.path===n.path&&(d.modifiedAt!==n.modifiedAt||d.size!==n.size||d.version!==null&&d.version!==r)&&Ze.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((u=a.error)==null?void 0:u.message)??(c===null?Lde():null),wantsText:s}}function jHn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=NHn(n),i=Wq(zf(e,n.path)),{text:a,binary:o,truncated:c,error:u,wantsText:d}=zHn(e,n,s,i),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=s==="markdown",v=n.path.split("/").slice(0,-1).join("/"),y=`${zf(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let x;return s==="image"||s==="audio"||s==="video"||s==="pdf"?x=_.jsx(Bb.Provider,{value:m,children:_.jsx(Ok,{kind:s,url:y,name:n.name})}):s==="download"||!d||o?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?wde():kpe()," ",_.jsx("a",{href:y,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?gL():qde()})]}):u?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[mhe()," ",Ae(u)]}):a===null?x=_.jsxs(Ur,{children:[_.jsx(Et,{})," ",sL()]}):k&&!f?x=_.jsx(Jq,{projectId:e,folder:v,markdown:a,entries:r}):x=_.jsx(Gq,{text:a,path:n.path}),_.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[_.jsxs("div",{className:"fpreview-head @container flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[_.jsx(Wh,{name:n.name}),_.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ae(n.path),children:n.name}),_.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[Xhe()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),_.jsx("div",{ref:w,className:"contents"}),(s==="text"||s==="download")&&_.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Dl(n.size)}),k&&_.jsx(Rt,{size:"small",active:f,"data-tip":f?eb():Zd(),"data-tip-align":"end","aria-label":f?eb():Zd(),onClick:()=>p(b=>!b),children:_.jsx(b5,{size:13})}),_.jsx(rp,{size:"small",href:y,target:"_blank",rel:"noopener noreferrer","data-tip":kN(),"data-tip-align":"end","aria-label":kN(),children:_.jsx(Rf,{size:13})}),_.jsx(Rt,{size:"small","data-tip":wN(),"data-tip-align":"end","aria-label":wN(),onClick:()=>{window.confirm(kS({path:Ae(n.path)}))&&t(n.path)},children:_.jsx(Yf,{size:13})})]}),_.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${k&&!f?"doc":""}`,children:[x,c&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:khe()})]})]})}function eU({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:d,onCancelRename:f}){return _.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var w;const m={paddingInlineStart:8+Math.min(n,kHn)*14};if(p.isDir){const k=!t.has(p.path);return _.jsxs("div",{className:"min-w-0 max-w-full",children:[_.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[_.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":k?Qfe({name:Ae(p.name)}):pde({name:Ae(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:_.jsx(yo,{size:13,className:k?"open":""})}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),_.jsx(Rt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":lhe(),"data-tip-align":"end","aria-label":cde({name:Ae(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(kS({path:Ae(p.path)}))&&o(p.path)},children:_.jsx(Yf,{size:12})})]}),k&&(((w=p.children)==null?void 0:w.length)??0)>0&&_.jsx(eU,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:d,onCancelRename:f})]},p.path)}return c===p.path?_.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[_.jsx(Wh,{name:p.name}),_.jsx(Fq,{name:p.name,onCommit:k=>d(p.path,k),onCancel:f})]},p.path):_.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:IX({path:Ae(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),i(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),i(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),i(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),i(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),i(p.path),a(p.path))},children:[_.jsx(Wh,{name:p.name}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function AHn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=T.useState(null),[a,o]=T.useState(()=>EHn(e.id)),[c,u]=T.useState(CHn),[d,f]=T.useState(null),[p,m]=T.useState(null),w=T.useRef(null);T.useEffect(()=>{try{localStorage.setItem(`${Xq}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=z=>{var L;z.preventDefault(),z.currentTarget.setPointerCapture(z.pointerId);const A=(L=w.current)==null?void 0:L.getBoundingClientRect(),j=document.body.style.userSelect;document.body.style.userSelect="none";const M=B=>{const U=Math.round(B.clientX-((A==null?void 0:A.left)??0)),H=Math.min(Math.max(U,Yq),Zq);u(H);try{localStorage.setItem(Qq,String(H))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=j};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};T.useEffect(()=>{if(!s||!n)return;const z=ym(n.entries,s);(!z||z.isDir)&&i(null)},[s,n]);const v=z=>o(A=>{const j=new Set(A);return j.has(z)?j.delete(z):j.add(z),j}),y=z=>{(s===z||s!=null&&s.startsWith(z+"/"))&&i(null),r3n(e.id,z).catch(()=>{})},x=async(z,A)=>{try{await s3n(e.id,z,A),A.action==="rename"&&s===z&&i(null)}catch(j){sn(j instanceof Error?j.message:String(j),"error")}},b=z=>{n&&Pq(n.dir,z)};if(!n)return _.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:_.jsxs(Ur,{className:"p-5",children:[_.jsx(Et,{})," ",qhe()]})});const C=z=>_.jsx(eU,{entries:z,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:y,renamingPath:p,onContextMenu:(A,j)=>{f(Hq(A,j))},onRename:(A,j)=>{m(null),x(A,{action:"rename",newName:j})},onCancelRename:()=>m(null)}),N=s?ym(n.entries,s):null;return n.entries.length===0?_.jsx(WC,{icon:QS,title:rpe(),description:mpe()}):_.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[_.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:w,style:{width:c},children:[_.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:k}),_.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[C(n.entries),n.truncated&&_.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Ahe()})]})]}),N?_.jsx(jHn,{projectId:e.id,entry:N,onDelete:y,artifactEntries:n.entries},N.path):_.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[_.jsx(gCn,{size:22,strokeWidth:1.5}),_.jsx("span",{children:Xde()})]}),d&&_.jsx(qq,{target:d,onOpen:()=>t(d.path),onRename:r(d.path)?()=>m(d.path):void 0,onDuplicate:()=>void x(d.path,{action:"duplicate"}),onCopyPath:()=>b(d.path),onDelete:()=>{window.confirm(kS({path:Ae(d.path)}))&&y(d.path)},onClose:()=>f(null)})]})}const tU=20*1024*1024,nU="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",rU="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",THn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",RHn="text-sm font-normal text-text",MHn="mt-1 mb-0 text-sm leading-relaxed text-text";function sU(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const i=s.indexOf(",");n(i>=0?s.slice(i+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function OHn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function iU({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=T.useState(!1),a=T.useRef(null);return _.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:o=>{o.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:o=>{var u;if(o.preventDefault(),i(!1),n)return;const c=(u=o.dataTransfer.files)==null?void 0:u[0];c&&r(c)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var c;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(c=a.current)==null||c.click())},children:[_.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const c=(u=o.target.files)==null?void 0:u[0];c&&r(c),o.target.value=""}}),n?_.jsxs(_.Fragment,{children:[_.jsx(Et,{}),_.jsx("span",{children:Run()})]}):_.jsxs(_.Fragment,{children:[_.jsx(WCn,{size:20,strokeWidth:1.5}),_.jsx("span",{children:t})]})]})}function aU({bytes:e,updatedAt:n}){return _.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Dl(e),n>0&&_.jsxs("span",{className:"text-muted",children:[" · ",Dc(n)]})]})}function DHn({skill:e,onError:n}){const t=pn({mutationFn:N3n}),r=t.isPending;return _.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[_.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[_.jsx("span",{className:RHn,children:e.name}),e.origin&&_.jsx(Zt,{size:"small",children:e.origin})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(Rt,{size:"small","data-tip":e.origin?Dcn():Aln(),"data-tip-align":"end","aria-label":e.origin?Qcn({name:Ae(e.name)}):Non({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?Hcn({name:Ae(e.name)}):yon({name:Ae(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:_.jsx(Yf,{size:13})})]})}function LHn({template:e,onError:n}){const t=pn({mutationFn:S3n}),r=t.isPending,s=e.supportFiles.length;return _.jsxs("div",{className:THn,children:[_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsx("span",{className:"text-base font-medium text-text",children:e.name}),_.jsxs("p",{className:MHn,children:[e.entry,s>0&&(s===1?xcn():nln({count:_n(s)}))]})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(Rt,{"data-tip":Iln(),"data-tip-align":"end","aria-label":Fon({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(Oon({name:Ae(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:_.jsx(Yf,{size:13})})]})}function IHn(){var x;const e=pn({mutationFn:E3n}),n=dt(y5n()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),c=T.useCallback(()=>{const b=r.current;i(!!b&&b.scrollTop>1),o(!!b&&b.scrollHeight-b.scrollTop-b.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const b=r.current;if(!b)return;const C=new ResizeObserver(c);return C.observe(b),()=>C.disconnect()},[t,c]);const u=n.isFetching,d=(x=n.error)==null?void 0:x.message,[f,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),y=T.useCallback(async b=>{if(!v.current){if(w(null),!OHn(b.name)){w(Vun());return}if(b.size>tU){w(hI());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:b.name,contentBase64:await sU(b)})}catch(C){w(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return _.jsxs("section",{className:nU,children:[_.jsxs("div",{className:"flex items-baseline gap-2.5",children:[_.jsx("h3",{children:Cun()}),_.jsxs(Me,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[_.jsx(xo,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Zm()]})]}),_.jsx("p",{className:rU,children:Won()}),_.jsx(iU,{accept:".md,.markdown,.zip",busy:f,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:tcn()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:don()})]}),onFile:b=>void y(b)}),m&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),d&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[lln()," ",d]}),t===void 0?d?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(Et,{})," ",Yln()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:_un()}):_.jsxs("div",{className:"relative mt-1",children:[_.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(b=>_.jsx(DHn,{skill:b,onError:w},b.name))}),s&&_.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&_.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function $Hn(){var d;const e=pn({mutationFn:k3n}),n=dt(b5n()),t=n.data,r=(d=n.error)==null?void 0:d.message,[s,i]=T.useState(!1),[a,o]=T.useState(null),c=T.useRef(!1),u=T.useCallback(async f=>{if(c.current)return;o(null);const p=f.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(Jun());return}if(f.size>tU){o(hI());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:f.name,contentBase64:await sU(f)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return _.jsxs("section",{className:nU,children:[_.jsx("h3",{children:Uln()}),_.jsx("p",{className:rU,children:Bun()}),_.jsx(iU,{accept:".tex,.zip",busy:s,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:ccn()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:Bpn()})]}),onFile:f=>void u(f)}),a&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[mln()," ",r]}),t===void 0?r?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(Et,{})," ",sun()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:vun()}):_.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>_.jsx(LHn,{template:f,onError:o},f.name))})]})}function BHn(){return _.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[_.jsx("h1",{children:kln()}),_.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:zcn()}),_.jsx(IHn,{}),_.jsx($Hn,{})]})}const PHn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function gc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return _.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?PHn:""}`,onClick:i,onDoubleClick:a,title:s?Rpn({label:n}):n,"aria-label":s?Cpn({label:n}):n,children:[t,_.jsx("span",{className:"tab-label","data-label":n,children:_.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),_.jsx("span",{role:"button",className:"tab-close",title:dze(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:_.jsx(_r,{size:12})})]})}const dM=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function FHn({owner:e,repo:n,branch:t}){return!e||!n?_.jsx("span",{className:dM,children:_.jsx("code",{children:t})}):_.jsxs("a",{className:dM,href:ly(e,n,t),target:"_blank",rel:"noopener noreferrer",title:M3({name:Ae(t)}),children:[_.jsx("code",{children:t}),_.jsx(J6,{size:12})]})}const U4=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),hM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function pM(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function mM(e,n){return em((e.endedAt??n)-e.createdAt)}function HHn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=SI(r),c=r.some(f=>f.status==="running"||f.status==="starting"),[u,d]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;d(Date.now());const f=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(f)},[c]),_.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:_.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[_.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[_.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[_.jsx("h1",{children:e.title||e.slug}),_.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),_.jsx(Pl,{status:a?Aa(a):"idle"})]}),_.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&_.jsxs(Me,{...ns(f=>s(a.id,f)),children:[_.jsx(Ko,{size:15}),mIe()]}),_.jsxs(Me,{...ns(i),children:[_.jsx(dy,{size:15}),xLe()]})]}),e.description&&_.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[_.jsx("h2",{children:HLe()}),_.jsx($c,{text:e.description})]}),_.jsxs("section",{className:U4,children:[_.jsx("h2",{children:a?hLe():UIe()}),a&&_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[_.jsx(Pl,{status:Aa(a)}),_.jsx(eC,{backend:a.backend}),_.jsxs("span",{title:IIe(),children:[_.jsx(YSn,{size:13}),pM(a.createdAt)]}),_.jsxs("span",{title:QLe(),children:[_.jsx(u6n,{size:13}),mM(a,u)]}),a.commitSha&&_.jsxs("span",{title:zLe(),children:[_.jsx(F6n,{size:14}),_.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&_.jsxs("span",{children:[nIe()," ",a.exitCode]})]}),a.command&&_.jsxs("code",{className:hM,children:["$ ",a.command]}),o&&_.jsx("p",{className:"experiment-overview-monitoring mt-4 text-accent-amber text-sm wrap-anywhere",children:o}),a.resultMarkdown&&_.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:_.jsx($c,{text:a.resultMarkdown})})]})]}),_.jsxs("section",{className:U4,children:[_.jsx("h2",{children:"Git"}),_.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[_.jsx(FHn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&_.jsxs("span",{children:[lIe()," ",_.jsx("code",{children:n.slug})]}),_.jsxs("span",{title:pM(e.createdAt),children:[DLe()," ",Dc(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&_.jsxs("code",{className:hM,children:["$ ",e.runCommand]})]}),r.length>0&&_.jsxs("section",{className:U4,children:[_.jsx("h2",{children:AIe()}),_.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((f,p)=>_.jsxs("button",{...ns(m=>s(f.id,m)),children:[_.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[kIe()," ",r.length-p]}),_.jsx(Pl,{status:Aa(f)}),_.jsx("span",{children:Dc(f.createdAt)}),_.jsx("span",{children:mM(f,u)}),_.jsx(Ko,{size:13})]},f.id))})]})]})})}function gM(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=my(t,!0);let i=!1,a=0,o=!1,c=!1;async function u(){if(o){c=!0;return}o=!0;try{for(;;){const f=await Vwn(e,a);if(i)return;if(f.dataBase64&&r.write(gM(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const d=w5n(e,f=>{if(i)return;const p=gM(f.dataBase64);!o&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{i=!0,d(),s()}},[e]),_.jsx("div",{ref:n,className:"h-full w-full"})}function UHn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(d=>d.experimentId===e.id).sort((d,f)=>f.createdAt-d.createdAt);return t==="overview"?_.jsx(HHn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(d,f)=>o("terminal",d,f),onOpenCode:d=>c("files",d)}):_.jsx(GHn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function GHn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[c,u]=T.useState(!1),d=T.useRef(null),f=t?n.find(v=>v.id===t)??null:n[0]??null,p=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",m=!!(f&&p&&(f.cancelRequested||a===f.id)),w=v=>{const y=n.findIndex(x=>x.id===v);return y===-1?n.length:n.length-y};T.useEffect(()=>{if(!c)return;const v=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function k(){if(f){i(null),o(f.id);try{await zI(f.id)}catch(v){o(null),i(v instanceof Error?v.message:String(v))}}}return _.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[_.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[_.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),_.jsx("span",{className:"flex-1"}),s&&_.jsx("span",{className:"error",role:"alert",children:s}),p&&_.jsxs(Me,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[_.jsx(E$,{size:13}),m?dje():hL()]}),n.length>0&&f&&_.jsxs("div",{className:"run-history relative shrink-0",ref:d,children:[_.jsxs(Me,{title:iDe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[_.jsxs("span",{children:[sz()," ",w(f.id)]}),_.jsx(Pl,{status:m?"cancelling":Aa(f)}),_.jsx(qc,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&_.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(v=>_.jsxs(un,{className:"justify-start",active:v.id===(f==null?void 0:f.id),onClick:()=>{r(v.id),u(!1)},children:[_.jsxs("span",{className:"font-medium",children:[sz()," ",w(v.id)]}),_.jsx(Pl,{status:Aa(v)}),_.jsx("span",{className:"ms-auto text-xs text-muted",children:Dc(v.createdAt)})]},v.id))})]})]}),_.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?_.jsx(qHn,{runId:f.id},f.id):_.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?ho():VOe()})})]})}let Dk=!1;function vM(e){Dk=!0;try{return window.confirm(e)}finally{Dk=!1}}const Lk=e=>e.replace(/\r\n/g,` `),bM=(e,n,t)=>{const r=Lk(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},Cl=e=>e.draft!==e.baseline,kHn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),SHn=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function CHn(e,n,t){return!Cl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class EHn{constructor(){li(this,"buffer",null);li(this,"listeners",new Set);li(this,"saving",!1);li(this,"saveError",null);li(this,"revision",0);li(this,"saveRevision",0);li(this,"getSnapshot",()=>this.buffer);li(this,"getRevision",()=>this.revision);li(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));li(this,"set",n=>{this.buffer=n,this.notify()});li(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});li(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});li(this,"setSaveError",n=>{this.saveError=n,this.notify()})}notify(){this.revision++;for(const n of this.listeners)n()}get needsProtection(){return this.saving||this.buffer!==null&&(Cl(this.buffer)||this.buffer.conflict!==null)}}function NHn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Z,ee,$;const c=ft({...j8n(),enabled:r,subscribed:r}),u=((Z=c.data)==null?void 0:Z.engine)??(c.isPending?void 0:null),d=((ee=c.data)==null?void 0:ee.hint)??null,_=(($=c.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[w,k]=T.useState(null),[v,y]=T.useState(null),[x,b]=T.useState(!1),[C,N]=T.useState(null),[z,A]=T.useState(null),[j,M]=T.useState(!1),[D,L]=T.useState(0),B=T.useCallback(I=>{M(I),I&&L(F=>F+1)},[]),U=T.useRef(o);U.current=o;const H=T.useRef(!1),Q=T.useRef(null),K=T.useCallback(()=>{if(H.current)return;Q.current=n,H.current=!0,m(!0);const I=U.current;A(null),y(null),N(null),Mwn(e,n,{sessionId:t}).then(F=>{var V,ie;const q=F.pdfPath;if(F.ok&&q){k(oe=>({path:q,version:((oe==null?void 0:oe.version)??0)+1,source:I})),b(F.hadErrors),N(F.note),F.hadErrors&&y(((V=F.log)==null?void 0:V.trim())||null),B(!0);return}k(null),b(!1),N(F.note),M(!1),y(((ie=F.log)==null?void 0:ie.trim())||yJe())}).catch(F=>{k(null),b(!1),N(null),M(!1),A(F instanceof Error?F.message:String(F))}).finally(()=>{H.current=!1,m(!1)})},[e,n,t,B]);return T.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&K()},[r,s,a,u,n,K]),{engine:u,installHint:d,installCommand:_,compiling:p,compiled:w,stale:w!==null&&w.source!==o,log:v,builtWithErrors:x,note:C,error:z,showPdf:j,setShowPdf:B,viewNonce:D,compile:()=>{i==null||i(),K()},dismiss:()=>{A(null),y(null)}}}const zHn=3e4,jHn=3e4,AHn=5*6e4;function THn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var ce,ne,G,ae;const u=T.useMemo(()=>T8n(e,n,{sessionId:t}),[e,n,t]),d=ft({...u,enabled:r,subscribed:r}),_=((ce=d.data)==null?void 0:ce.hasToken)??!1,p=((ne=d.data)==null?void 0:ne.hasSession)??!1,m=((G=d.data)==null?void 0:G.link)??null,w=!d.isPending,[k,v]=T.useState(null),[y,x]=T.useState(0),[b,C]=T.useState(!1),[N,z]=T.useState(null),[A,j]=T.useState(null),[M,D]=T.useState(!1),L=T.useCallback(le=>{Un(u.queryKey)&&Ze.setQueryData(u.queryKey,ge=>ge&&{...ge,hasSession:le})},[u]),B=T.useCallback(le=>{Un(u.queryKey)&&Ze.setQueryData(u.queryKey,le)},[u]);T.useEffect(()=>{z(null),x(0),I.current=!1,j(null),D(!1),K.current=!1},[r,e,n,t]),T.useEffect(()=>{D(!1)},[a]);const U=T.useRef(!1),H=T.useRef(c);H.current=c;const Q=T.useRef(o);Q.current=o;const K=T.useRef(!1),Z=T.useCallback(le=>!_||!m||U.current||Q.current?!1:(U.current=!0,C(!0),j(null),qwn(e,n,{sessionId:t,resolve:le}).then(ge=>{K.current=!1,z(ge),ge.pulled.includes(n)&&(Q.current?D(!0):H.current(ge.pulled))}).catch(ge=>{K.current=!0,z(null),j(ge instanceof Error?ge.message:String(ge))}).finally(()=>{U.current=!1,C(!1)}),!0),[e,n,t,_,m]),ee=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!w||!_||!m||o||$)return;const le=`${n}:${m.projectId}:${a}`;ee.current!==le&&Z()&&(ee.current=le)},[r,s,w,_,m,n,a,o,b,Z,$]);const I=T.useRef(!1);!b&&N&&N.conflicts.length===0&&!A&&(I.current=!0);const F=r&&w&&!!m&&_&&p&&I.current,q=T.useRef(null),V=T.useRef(Promise.resolve()),ie=T.useRef(!1);ie.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const oe=T.useRef(!1);return T.useEffect(()=>{if(!F)return;let le=!1;const ge=()=>{const Ee=oe.current;oe.current=!1,!(!Ee&&ie.current)&&(V.current=V.current.then(()=>{if(!le)return $wn(e,n,{sessionId:t,retry:Ee}).then(Fe=>{var Ye;le||((q.current===null||((Ye=Fe.status)==null?void 0:Ye.state)==="stopped")&&v(Fe.status),q.current=Fe.key)}).catch(Fe=>{le||v({state:"stopped",error:Fe instanceof Error?Fe.message:String(Fe),needsSession:!1,note:null})})}))};ge();const be=setInterval(ge,jHn);return()=>{le=!0,clearInterval(be),q.current=null,v(null),V.current=V.current.then(()=>Bwn(e,n,{sessionId:t})).catch(()=>{})}},[F,y,e,n,t]),T.useEffect(()=>a5n(le=>{if(le.key===q.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(Q.current?D(!0):H.current(le.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!w||!_||!m||o||$)return;const le=setInterval(()=>{U.current||K.current||Ze.fetchQuery({...R8n(e,n,{sessionId:t}),staleTime:0}).then(ge=>{ge.remoteChanged&&Z()}).catch(ge=>{K.current=!0,j(ge instanceof Error?ge.message:String(ge))})},zHn);return()=>clearInterval(le)},[r,s,w,_,m,o,e,n,t,Z,$]),T.useEffect(()=>{if(!r||!s||!w||!_||!m||!$)return;const le=setInterval(Z,AHn);return()=>clearInterval(le)},[r,s,w,_,m,$,Z]),{hasToken:_,hasSession:p,live:k,retryLive:()=>{oe.current=!0,x(le=>le+1)},link:m,loaded:w,syncing:b,last:N,error:A??((ae=d.error)==null?void 0:ae.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:Gwn(e,n,{sessionId:t}),saveToken:async le=>{const ge=await TI(le);ee.current=null,K.current=!1,j(null),Un(u.queryKey)&&Ze.setQueryData(u.queryKey,be=>be&&{...be,hasToken:ge.hasToken})},saveSession:async le=>{const ge=await RI(le,{host:m==null?void 0:m.host});L(ge.hasSession),oe.current=!0,x(be=>be+1)},importSession:async()=>{const le=await Iwn({host:m==null?void 0:m.host});return L(le.hasSession),oe.current=!0,x(ge=>ge+1),le.source},linkProject:async le=>{z(null),v(null),I.current=!1,ee.current=null,B(await Fwn(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{B(await Hwn(e,n,{sessionId:t})),ee.current=null,K.current=!1,z(null),j(null)},sync:le=>{K.current=!1,Z(le)&&(ee.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const yM=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],RHn=4e6,MHn=200,xM=16e6,OHn=e=>new Promise(n=>{const t=new FileReader;t.onload=()=>n(typeof t.result=="string"?t.result:null),t.onerror=()=>n(null),t.readAsDataURL(e)}),wM=e=>e.startsWith("//")?`https:${e}`:e;async function DHn(e,n){var s;let t=RHn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:c}of e){if(r.has(o)){const w=r.get(o);w&&i.setAttribute(a,w);continue}if(n.aborted)return;if(r.size>=MHn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const d=u.headers.get("content-type")??"",_=Number(u.headers.get("content-length"));if(!c.some(w=>d.startsWith(w))||!(Number.isFinite(_)&&_>0&&_<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await OHn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function LHn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(yM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:d}of yM){if(!o.matches(c))continue;const _=o.getAttribute(u);if(!_)continue;const p=n(_);p&&(p===_?o.setAttribute(u,wM(_)):s.push({element:o,attribute:u,url:p,typePrefixes:d}))}await DHn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!hC(c)||(o.setAttribute("href",wM(c)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const i=((a=r.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(i)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function IHn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${xM-1}`}}).catch(()=>null),i=s!=null&&s.ok?await s.text().catch(()=>null):null;if(i===null)return{text:e,partial:!0};const a=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:i,partial:Number.isFinite(a)&&a>xM}}function $Hn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=T.useState(null);return T.useEffect(()=>{let o=!1;const c=new AbortController;return a(null),IHn(e,n,t,c.signal).then(async({text:u,partial:d})=>({source:await LHn(u,s,c.signal),partial:d})).then(u=>{o||a(u)}),()=>{o=!0,c.abort()}},[e,n,t,s]),i===null?f.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[f.jsx(Ct,{})," ",vL()]}):f.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:ZHe()}),f.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:iqe({name:Ae(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function BHn({overleaf:e}){var _;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=ra(n),i=T.useId(),[a,o]=T.useState({top:0,left:0,maxHeight:0}),c=((_=e.last)==null?void 0:_.conflicts.length)??0,u=e.hasToken&&!!e.error,d=u?U3():c?p1t():!e.hasToken||!e.link?Axt():e.syncing?LL():e.blocked?DL():RL();return T.useEffect(()=>{c&&r(!0)},[c,r]),T.useEffect(()=>{u&&tn(U3(),"error",{id:i,duration:5e3})},[u,e.error,i]),T.useLayoutEffect(()=>{if(!t||!n.current||!s.current)return;const p=n.current.getBoundingClientRect(),m=Math.min(384,window.innerWidth-16),w=Math.min(p.bottom+6,window.innerHeight-80);o({top:w,left:Math.max(8,Math.min(p.right-m,window.innerWidth-m-8)),maxHeight:window.innerHeight-w-8}),(s.current.querySelector("input")??s.current).focus();const k=()=>r(!1),v=y=>{var x;y.target instanceof Node&&!((x=s.current)!=null&&x.contains(y.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),f.jsxs(f.Fragment,{children:[f.jsx(At,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":d,"data-tip-align":"end","aria-label":gJ({status:d}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?f.jsx(Ct,{}):f.jsx(VSn,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&ni.createPortal(f.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":nI(),tabIndex:-1,className:"fixed z-100 w-96 max-w-[calc(100vw-1rem)] overflow-auto rounded-lg border border-border bg-background p-4 text-text shadow-popover",style:a,onBlur:p=>{var m;p.relatedTarget instanceof Node&&!p.currentTarget.contains(p.relatedTarget)&&!((m=n.current)!=null&&m.contains(p.relatedTarget))&&r(!1)},children:[f.jsx("div",{className:"absolute end-3 top-3",children:f.jsx(At,{size:"small","aria-label":bHe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:f.jsx(ur,{size:13})})}),f.jsx(UHn,{overleaf:e})]}),document.body)]})}const J1=e=>Ml(new Intl.ListFormat(E()).format(e.map(Ae)));function PHn(e){if(e.error)return tvt();if(e.syncing)return LL();if(e.blocked)return DL();const n=e.last;return n?n.pulled.length&&n.pushed.length?qyt({pulled:J1(n.pulled),pushed:J1(n.pushed)}):n.pulled.length?Lyt({paths:J1(n.pulled)}):n.pushed.length?Xyt({paths:J1(n.pushed)}):n.conflicts.length?nbt():RL():wyt()}function FHn({href:e}){return f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:OL()})}function HHn(e){return e.state==="live"?wvt():e.state==="connecting"?pvt():e.error??Lvt()}function kM({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),d=p=>{s||(i(!0),u(null),p().then(()=>o(!1)).catch(m=>{u(m instanceof Error?m.message:String(m)),o(!0)}).finally(()=>i(!1)))},_=a?qxt():n?rxt():D1t();return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("p",{className:"text-sm text-subtext",children:_}),a&&f.jsx(qr,{className:"basis-full min-w-0","aria-label":q3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:q3(),autoComplete:"off"}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&f.jsx(Ct,{}),a?f.jsx(Oe,{type:"button",disabled:s||!t.trim(),onClick:()=>d(()=>e.saveSession(t.trim())),children:s?Ba():c1t()}):f.jsx(Oe,{type:"button",disabled:s,onClick:()=>d(e.importSession),children:H1t()}),f.jsx(Oe,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?ML():jyt()})]}),c&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function qHn({overleaf:e}){if(!e.hasSession)return f.jsx(kM,{overleaf:e});const n=e.live;if(!n)return f.jsx("p",{className:"text-sm text-subtext",children:qvt()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[f.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),f.jsx("span",{className:"min-w-0 break-words",children:HHn(n)})]}),n.note&&f.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&f.jsx("div",{children:f.jsx(Oe,{onClick:e.retryLive,children:jvt()})}),t&&f.jsx(kM,{overleaf:e,replacing:!0})]})}function UHn({overleaf:e}){var p,m,w;const[n,t]=T.useState(""),[r,s]=T.useState(!1),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=()=>{t(""),a(null),c(!0)},d=!e.hasToken||o;async function _(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{d?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(y){a(y instanceof Error?y.message:String(y))}finally{s(!1)}}}if(e.link&&!d){const k=((p=e.last)==null?void 0:p.conflicts)??[];return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[f.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&f.jsx(Ct,{}),e.error?U3():PHn(e)]}),e.error&&f.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),f.jsx(qHn,{overleaf:e}),f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(Oe,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?uxt():((m=e.live)==null?void 0:m.state)==="live"?n2t():void 0,onClick:()=>e.sync(),children:e.error?Ks():Qbt()}),f.jsxs($h,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Lbt()," ",f.jsx(Rf,{size:12})]})]}),k.map(v=>f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsxs("p",{className:"break-words text-accent-red",children:[f.jsx("code",{className:"font-mono",children:v})," ",wbt()]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsx(Oe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:jbt()}),f.jsx(Oe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:pyt()})]})]},v)),((w=e.last)==null?void 0:w.note)&&f.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),f.jsxs("details",{className:"border-t border-border pt-3",children:[f.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:f.jsx("span",{className:"ms-2",children:$S()})}),f.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[f.jsx(Oe,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:Pz()}),f.jsx($h,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:OL()}),f.jsx(Oe,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:nyt()})]})]})]})}return f.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:_,children:[f.jsx("div",{className:"pe-8 text-sm text-subtext",children:d?p2t():w2t()}),f.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[f.jsx(qr,{className:"basis-full min-w-0","aria-label":d?$z():Bz(),"aria-invalid":!!i,type:d?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:d?$z():"https://www.overleaf.com/project/…",autoComplete:"off"}),f.jsx(Oe,{type:"submit",disabled:r||!n.trim(),children:r?d?Ba():Da():d?kxt():cvt()}),f.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:d?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:d?w1t():Bz()})]}),(i||e.error)&&f.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),f.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[f.jsx(FHn,{href:e.uploadUrl}),o?f.jsx(Oe,{variant:"ghost",type:"button",onClick:()=>c(!1),children:ML()}):e.hasToken&&f.jsx(Oe,{variant:"ghost",type:"button",onClick:u,children:Pz()})]})]})}function GHn({command:e}){const[n,t]=T.useState("idle"),r=T.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const i=r.current;if(i){const a=document.createRange();a.selectNodeContents(i);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(a)}t("select"),setTimeout(()=>t("idle"),4e3)}};return f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("code",{ref:r,className:"font-mono text-xs text-text bg-panel border border-border-variant rounded-xs py-1 px-2",children:e}),f.jsx(At,{"data-tip":n==="copied"?Cf():n==="select"?$Ge():dFe(),"aria-label":MFe(),onClick:()=>void s(),children:n==="copied"?f.jsx(ti,{size:13}):f.jsx(Wf,{size:13})})]})}function SM(e){const[n,t]=T.useState(!1),[r,s]=T.useState(null);return{busy:n,error:r,trigger:async()=>{t(!0),s(null);try{await e()}catch(a){s(a instanceof Error?a.message:String(a))}finally{t(!1)}}}}function VHn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:d,onLineScrollRequestHandled:_,onEdit:p,artifactVersion:m,artifactEntries:w=[],bufferSession:k,remote:v=!1,restored:y=!1,onRestoreActivated:x,showSource:b=!1,onShowSourceChange:C}){var Vr,gr;const N=HB(e,n,t??"repo",r,s),z=ft({...N,enabled:!k.saving}),A=z.data??null,j=((Vr=z.error)==null?void 0:Vr.message)??null,M=Qe=>{ts(N.queryKey,pt=>(typeof Qe=="function"?Qe(pt??null):Qe)??void 0)},[D,L]=T.useState(0),B=t==="artifacts",U=t==="abs",H=VC(n),Q=Bq(n),K=UFn(n),Z=H||K,[ee,$]=T.useState(!1),I=!y||ee,F=()=>{$(!0),x==null||x()};T.useSyncExternalStore(k.subscribe,k.getRevision);const q=k.getSnapshot(),V=k.set,ie=k.saving,oe=k.setSaving,ce=k.saveRevision,ne=k.saveError,G=k.setSaveError,ae=T.useRef(null),le=T.useRef(null),[ge,be]=T.useState(!1),[Ee,Fe]=T.useState(null),Ye=T.useRef(c),Me=(A==null?void 0:A.file)??null,Ue=q&&Cl(q)?q.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,dt=Ue.split("/").slice(0,-1).join("/"),wt=(A==null?void 0:A.source)==="artifact",Ft=T.useCallback(Qe=>{var pt;return((pt=Q5(dt,Qe,U))==null?void 0:pt.path)??null},[U,dt]),Ht=T.useCallback(Qe=>U?jI(Qe):wt?zf(e,Qe):J3(e,Qe,{sessionId:r,ref:s}),[wt,s,U,e,r]),qt=T.useCallback(Qe=>{if(hC(Qe))return Qe;const pt=Q5(dt,Qe,U);return pt?hRn(Ht(pt.path),pt):null},[U,dt,Ht]),$e=Vq(Me==null?void 0:Me.presentation),ot=(A==null?void 0:A.source)==="artifact"&&!B,Ce=B&&(A==null?void 0:A.source)==="checkout",me=!s&&(A==null?void 0:A.source)==="checkout"&&Me!=null&&!Me.notFound,ze=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",He=me&&Me!=null&&!Me.binary&&!Me.truncated&&!$e&&!ze,We=He&&Me.version===void 0,ct=q!==null&&Cl(q),St=!We&&(He&&typeof Me.version=="string"||ct),Be=(q==null?void 0:q.draft)??Lk((Me==null?void 0:Me.content)??""),un=(q==null?void 0:q.baseline)??Lk((Me==null?void 0:Me.content)??""),Vt=St&&q!==null&&Cl(q),_n=q!==null&&!ct&&typeof(Me==null?void 0:Me.version)=="string"&&q.version!==Me.version,Gt=z.isFetching||_n?void 0:d,cn=async Qe=>{const pt=k.getSnapshot();if(!St||!pt||!Cl(pt))return!0;if(k.saving)return!1;if(pt.conflict&&Qe===void 0)return G(pt.conflict.exists?iz():cz()),!1;const pn=pt.draft,xn=SHn(pt);oe(!0),G(null);try{await Ze.cancelQueries(N);const Rn=await jwn(e,Ue,xn,{sessionId:r,expectedVersion:Qe??pt.version});return k.getSnapshot()?(k.saved(pn,Rn.version),M(sr=>sr&&sr.source==="checkout"?{source:"checkout",file:{...sr.file,content:xn,version:Rn.version}}:sr),!0):!1}catch(Rn){if(Rn instanceof Y3){const _r=k.getSnapshot();return!_r||!Cl(_r)||V({..._r,conflict:{currentVersion:Rn.currentVersion,exists:Rn.exists}}),!1}return G(Rn instanceof Error?Rn.message:String(Rn)),!1}finally{oe(!1)}},Tt=Q&&me&&!ze,$t=NHn({projectId:e,filePath:Ue,sessionId:r,enabled:Tt,autoRun:I,onManualAction:F,ready:Me!=null&&!Me.notFound,source:St?Be:(Me==null?void 0:Me.content)??""}),Lr=THn({projectId:e,filePath:Ue,sessionId:r,enabled:Tt,autoRun:I,onManualAction:F,savedSource:un,dirty:Vt,onPulled:T.useCallback(Qe=>{Qe.includes(Ue)&&L(pt=>pt+1)},[Ue])}),mr=Q&&$t.showPdf&&$t.compiled!=null,Gr=We&&ct,Jt=(St||Gr)&&!(Z&&!b)&&!mr,Gn=Me!==null&&!Me.notFound&&!Me.binary&&!$e&&!mr,ls=Gn&&!Jt&&(!K||b),ut=async()=>{if(Me)try{if(Me.truncated&&!Jt){const Qe=fetch(Ht(Ue)).then(async pt=>{if(!pt.ok)throw new Error;return new Blob([await pt.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":Qe})])}else await navigator.clipboard.writeText(Jt?Be:Me.content);be(!0),window.setTimeout(()=>be(!1),1500)}catch{tn(EFe(),"error")}},fn=Qe=>{if(!Qe.metaKey&&!Qe.ctrlKey||Qe.altKey||Qe.shiftKey||Qe.key.toLowerCase()!=="a"||!(Qe.target instanceof Node)||!Qe.currentTarget.contains(Qe.target))return;const pt=le.current;if(!pt)return;Qe.preventDefault();const pn=document.createRange();pn.selectNodeContents(pt);const xn=window.getSelection();xn==null||xn.removeAllRanges(),xn==null||xn.addRange(pn)},yn=$t.compiled?`${J3(e,$t.compiled.path,{sessionId:r})}&v=${$t.compiled.version}`:null,Tn=yn?`${yn}&view=${$t.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,Vn=$t.compiled?$t.compiled.path.split("/").pop()??$t.compiled.path:null,dn=async()=>{Vt&&!await cn()||Q&&$t.engine&&$t.compile()},Dn=async()=>{Vt&&(I?await dn():await cn())},Kn=SM(()=>Twn(e,Ue,{sessionId:r})),Et=SM(()=>AI(e,Ue,{sessionId:r})),Rt=v?vUe():Me!=null&&Me.notFound?_z():s?_Ue({branch:Ae(s)}):me?null:CUe(),Pn=T.useCallback(()=>{k.saving||L(Qe=>Qe+1)},[k]),rs=()=>{V(null),G(null),Pn()},Wt=Wq(Ht(Ue),!s&&!ie);T.useEffect(()=>{if(!j||s)return;const Qe=window.setInterval(()=>{document.visibilityState!=="hidden"&&Pn()},2e3);return()=>window.clearInterval(Qe)},[j,s,Pn]);const rr=`${Ht(Ue)}&v=${encodeURIComponent(Wt??m??"")}&reload=${D}`;T.useEffect(()=>{var xn,Rn;if(!A||k.saving)return;const Qe=A,pt=k.getSnapshot();if(pt&&Cl(pt)){const _r=Qe.source==="checkout"?Qe.file:null,sr=_r!==null&&_r.path===pt.path&&(!r||_r.root==="worktree"),Ln=CHn(pt,sr&&typeof _r.version=="string"?_r.version:null,sr&&!_r.notFound);Ln&&(Ln.currentVersion!==((xn=pt.conflict)==null?void 0:xn.currentVersion)||Ln.exists!==((Rn=pt.conflict)==null?void 0:Rn.exists))?V({...pt,conflict:Ln}):!Ln&&pt.conflict&&V({...pt,conflict:null})}(!pt||!Cl(pt)&&(pt.version!==Qe.file.version||pt.path!==Qe.file.path))&&Qe.source==="checkout"&&!Qe.file.notFound&&!Qe.file.binary&&!Qe.file.truncated&&typeof Qe.file.version=="string"&&(V(bM(Qe.file.path,Qe.file.content,Qe.file.version)),G(null))},[A,k,r,ie,ce,q]);const Wn=JSON.stringify(N.queryKey),zr=T.useRef({sourceKey:Wn,nonce:D,artifactVersion:m,diskVersion:Wt});T.useEffect(()=>{const Qe=zr.current;zr.current={sourceKey:Wn,nonce:D,artifactVersion:m,diskVersion:Wt},Qe.sourceKey===Wn&&(Qe.nonce!==D||Qe.diskVersion!==null&&Qe.diskVersion!==Wt||Qe.artifactVersion!=null&&Qe.artifactVersion!==m)&&M8n(e,n,t??"repo",r,s)},[Wn,D,m,Wt,e,n,t,r,s]),T.useLayoutEffect(()=>{const Qe=ae.current,pt=Ye.current;!Qe||!Me||!pt||(Qe.scrollTop=pt.top,Qe.scrollLeft=pt.left)},[Me]);const Es=Qe=>{if(Qe.source==="absolute")return $qe();if(B)return Sqe({root:r?C1():S1()});if(s)return Tqe({branch:Ae(s)});if(r&&Qe.source==="checkout"&&Qe.file.root==="clone")return IVe();const pt=Qe.source==="checkout"?Qe.file.root:Qe.checkoutRoot;return Gqe({root:pt==="worktree"?C1():S1()})};return f.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:fn,children:[f.jsxs("div",{className:"file-view-header @container flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-text shrink-0",children:[f.jsx(Wh,{name:Ue}),f.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ae(Ue),children:Ue.split("/").pop()||Ue}),a&&f.jsxs("span",{className:"file-view-branch inline-flex items-center gap-1 min-w-0 text-xs text-muted border border-border-variant rounded-sm py-px px-1.5 max-w-65 overflow-hidden text-ellipsis whitespace-nowrap [&_svg]:flex-none",title:UX({branch:Ae(a)}),children:[f.jsx(tg,{size:11}),a]}),Jt&&(ie||Vt||ne)&&f.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${ne?"text-accent-red":"text-muted"}`,title:ne??(ie?Ba():kVe()),children:ie?f.jsxs(f.Fragment,{children:[f.jsx(Ct,{})," ",TGe()]}):ne?SGe():bL()}),f.jsx("div",{ref:Fe,className:"contents"}),Q&&$t.compiled&&f.jsx(At,{size:"small",active:!$t.showPdf,"data-tip":$t.stale&&$t.showPdf?VUe():$t.showPdf?Zd():pz(),"data-tip-align":"end","aria-label":$t.showPdf?Zd():pz(),onClick:()=>$t.setShowPdf(!$t.showPdf),children:$t.showPdf?f.jsx(b5,{size:13}):f.jsx(_y,{size:13,className:$t.stale?"text-accent-amber":void 0})}),Q&&yn&&Vn&&f.jsx(rp,{size:"small","data-tip":$t.stale?RHe({name:Ae(Vn)}):Zv({name:Ae(Vn)}),"data-tip-align":"end","aria-label":Zv({name:Ae(Vn)}),href:yn,download:Vn,children:f.jsx(eg,{size:13,className:$t.stale?"text-accent-amber":void 0})}),Tt&&f.jsx(BHn,{overleaf:Lr}),Q&&me&&f.jsx(At,{size:"small","data-tip":$t.compiled?dz():az(),"data-tip-align":"end","aria-label":$t.compiled?dz():az(),disabled:$t.compiling||!$t.engine,onClick:()=>void dn(),children:$t.compiling?f.jsx(Ct,{}):f.jsx(n6n,{size:13})}),Z&&f.jsx(At,{size:"small",active:b,"data-tip":b?Jv():Zd(),"data-tip-align":"end","aria-label":b?Jv():Zd(),onClick:()=>C==null?void 0:C(!b),children:f.jsx(b5,{size:13})}),Gn&&f.jsx(At,{size:"small","data-tip":ge?Cf():oz(),"data-tip-align":"end","aria-label":ge?Cf():oz(),onClick:()=>void ut(),children:ge?f.jsx(ti,{size:13}):f.jsx(Wf,{size:13})}),Me!=null&&f.jsxs(f.Fragment,{children:[f.jsx(At,{size:"small","data-tip":Rt??Kn.error??fz(),"data-tip-align":"end","aria-label":fz(),"aria-description":Rt??void 0,disabled:Kn.busy||Rt!=null,onClick:()=>void Kn.trigger(),children:Kn.busy?f.jsx(Ct,{}):f.jsx(Rf,{size:13})}),f.jsx(At,{size:"small","data-tip":Rt??Et.error??hz(),"data-tip-align":"end","aria-label":hz(),"aria-description":Rt??void 0,disabled:Et.busy||Rt!=null,onClick:()=>void Et.trigger(),children:Et.busy?f.jsx(Ct,{}):f.jsx(vo,{size:13})})]})]}),!j&&Ce&&(A==null?void 0:A.source)==="checkout"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:Zqe({root:A.file.root==="worktree"?C1():S1()})}),We&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-amber",children:AVe()}),j&&Me!==null&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-red",children:[uz()," ",Ae(j)]}),(q==null?void 0:q.conflict)&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[f.jsx("span",{className:"flex-1 min-w-0",role:"status",children:q.conflict.exists?iz():cz()}),((gr=q==null?void 0:q.conflict)==null?void 0:gr.exists)&&q.conflict.currentVersion&&f.jsx(Oe,{disabled:ie,onPointerDown:Qe=>Qe.preventDefault(),onClick:()=>{var Qe;return void cn(((Qe=q.conflict)==null?void 0:Qe.currentVersion)??void 0)},children:BUe()}),f.jsx(Oe,{disabled:ie,onPointerDown:Qe=>Qe.preventDefault(),onClick:rs,children:_Ge()})]}),($t.error||$t.log)&&f.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:`flex-1 min-w-0 text-sm ${$t.builtWithErrors?"text-subtext":"text-accent-red"}`,children:$t.error??($t.builtWithErrors?aFe():KPe())}),f.jsx(At,{"data-tip":iHe(),"data-tip-align":"end","aria-label":fHe(),onClick:$t.dismiss,children:f.jsx(ur,{size:13})})]}),$t.log&&f.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:$t.log})]}),Tt&&Lr.staleOnDisk&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[f.jsx("span",{className:"flex-1 min-w-0",children:RUe()}),f.jsx(Oe,{onClick:()=>{Lr.reloaded(),L(Qe=>Qe+1)},children:VFe()})]}),Q&&me&&$t.engine===null&&$t.installHint&&f.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[$t.installHint,$t.installCommand&&f.jsx(GHn,{command:$t.installCommand})]}),$t.note&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:$t.note}),mr&&$t.stale&&f.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:rVe()}),f.jsxs("div",{ref:ae,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:ls?0:void 0,onScroll:Qe=>{const pt={top:Math.max(0,Qe.currentTarget.scrollTop),left:Math.max(0,Qe.currentTarget.scrollLeft)};Ye.current=pt,u==null||u(pt)},children:[!Jt&&!j&&!B&&(A==null?void 0:A.source)==="checkout"&&!A.file.notFound&&!s&&r&&A.file.root==="clone"&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:uVe()}),!Jt&&!j&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&ot&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:NPe({root:A.checkoutRoot==="worktree"?C1():S1()})}),j&&Me===null?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[uz()," ",Ae(j)]}):Me===null?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:vL()}):Jt?f.jsx(NB,{value:Be,onChange:Qe=>{const pt=k.getSnapshot()??(Me&&typeof Me.version=="string"?bM(Me.path,Me.content,Me.version):null);pt&&V(kHn(pt,Qe)),p==null||p(),ne&&G(null)},onSave:()=>void Dn(),onBlur:()=>{Dk||Dn()},readOnly:Gr,path:n,highlightLine:i,scrollRequest:Gt,onScrollRequestHandled:_,scrollPosition:Ye.current,onScrollPositionChange:Qe=>{Ye.current=Qe,u==null||u(Qe)}}):Me.notFound?f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Es(A):_z()}):$e?f.jsx($b.Provider,{value:Ee,children:f.jsx(Ok,{kind:$e,url:rr,name:n.split("/").pop()??n})}):Me.binary?f.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[OPe()," ",f.jsx("a",{href:rr,download:n.split("/").pop()??n,children:gL()})]}):mr&&Tn&&Vn?f.jsx($b.Provider,{value:Ee,children:f.jsx(Ok,{kind:"pdf",url:Tn,name:Vn,download:!1},Tn)}):H&&!b?f.jsx("div",{ref:le,className:"file-view-md max-w-readable pt-4.5 px-5 pb-8 [&_.md]:text-base [&_.md_h1]:text-2xl [&_.md_h1]:mt-4.5 [&_.md_h1]:mx-0 [&_.md_h1]:mb-2 [&_.md_h2]:text-xl [&_.md_h2]:mt-4 [&_.md_h2]:mx-0 [&_.md_h2]:mb-2 [&_.md_h3]:text-lg",children:wt?f.jsx(Jq,{projectId:e,folder:dt,markdown:Me.content,entries:w}):f.jsx($c,{text:Me.content,resolveFilePath:Ft,resolveImageSrc:qt,onOpenFile:o&&((Qe,pt,pn,xn,Rn)=>o(Qe,r,s,Rn))})}):K&&!b?f.jsx($Hn,{html:Me.content,truncated:Me.truncated,url:rr,name:Ue,resolveSrc:qt}):f.jsxs(f.Fragment,{children:[f.jsx("div",{ref:le,children:f.jsx(Gq,{text:Me.content,path:n,highlightLine:i,scrollRequest:Gt,onScrollRequestHandled:_})}),Me.truncated&&f.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:GHe()})]})]})]})}function KHn({onCollapse:e}){return f.jsx("div",{className:"rail-brand px-3 py-3 border-b border-border shrink-0",children:f.jsxs("div",{className:"flex items-center gap-2 px-1",children:[f.jsx("span",{className:"w-5 h-5",children:f.jsx(vy,{})}),f.jsx("span",{className:"flex-1 text-base font-medium",children:"OpenResearch"}),e&&f.jsx(At,{size:"small","data-tip":gz(),"aria-label":gz(),onClick:e,children:f.jsx(M$,{size:18})})]})})}function G4(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function ev(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function WHn(e){const t=(e.trim().split(/[?#]/)[0].split("/").filter(Boolean).pop()??"").replace(/\.(pdf|md)$/i,"");return/^\d{4}\.\d{4,5}(v\d+)?$/.test(t)?t:null}function QHn(e){const n=e==null?void 0:e.trim().match(/github\.com[/:]([^/]+)\/([^/?#]+)/i);return n?{owner:n[1],repo:n[2].replace(/\.git$/,"")}:null}function XHn(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function YHn({onCreated:e,onCancel:n,remote:t=!1}){var Vn,dn,Dn,Kn;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,d]=T.useState(""),[_,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(!1),[y,x]=T.useState(null),[b,C]=T.useState(!1),[N,z]=T.useState(!1),[A,j]=T.useState(""),[M,D]=T.useState(null),[L,B]=T.useState(!1),U=T.useRef(0),H=T.useRef(0),Q=T.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),K=r==="paper"?QHn(M==null?void 0:M.repoUrl):null,Z=i.trim()?`~/OpenResearch/${ev(i,48)}`:"",ee=`~/OpenResearch/${ev(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!_?Z:r==="paper"&&M&&!_?ee:u,I=G4($.trim(),200),F=ft({...O0(I),enabled:!!I&&I===$.trim()}),q=I===$.trim()?F.data??null:null,V=I===$.trim()?((Vn=F.error)==null?void 0:Vn.message)??null:null,ie=!!$.trim()&&(I!==$.trim()||F.isFetching),oe=K??(r==="folder"&&(q!=null&&q.githubOwner)&&q.githubRepo?{owner:q.githubOwner,repo:q.githubRepo}:null),ce=ft(x5n()),ne=((dn=ce.data)==null?void 0:dn.login)??(ce.isPending?void 0:null),G=ft(PS()),ae=T.useRef(!1);T.useEffect(()=>{ae.current||!G.data||(ae.current=!0,z(G.data.githubForNewProjects))},[G.data]);const le=G4(i.trim(),150),ge=ft({...w5n(le),enabled:le===i.trim()}),be=le===i.trim()?((Dn=ge.data)==null?void 0:Dn.repo)??ev(i,48):ev(i,48),Ee=le!==i.trim()||ge.isFetching,Fe=ft({...kj((oe==null?void 0:oe.owner)??"",(oe==null?void 0:oe.repo)??""),enabled:!!oe,subscribed:!!oe}),Ye=!!oe&&Fe.isFetching,Me=oe&&((Kn=Fe.data)!=null&&Kn.canPush)?`github.com/${oe.owner}/${oe.repo}`:null,Ue=G4(A.trim(),350),dt=WHn(Ue),wt=r==="paper"&&!M&&Ue===A.trim(),Ft=ft({...ZI(Ue),enabled:wt&&!dt&&Ue.length>=3,subscribed:wt&&!dt&&Ue.length>=3}),Ht=ft({...d5(dt??""),enabled:wt&&!!dt,subscribed:wt&&!!dt}),qt=wt&&!dt?Ft.data??[]:[],$e=wt&&Ft.isSuccess?Ue:"",ot=L||r==="paper"&&!M&&(Ue!==A.trim()||(dt?Ht.isFetching:Ft.isFetching));T.useEffect(()=>{var Et;!wt||!dt||!Ht.data||(D(Ht.data),o||a(((Et=Ht.data.title)==null?void 0:Et.trim())||Ht.data.paperId))},[wt,dt,Ht.data,o]),T.useEffect(()=>{const Et=dt?Ht.error:Ft.error;wt&&Et&&x(Et.message)},[wt,dt,Ht.error,Ft.error]);const Ce=vn({mutationFn:_wn});async function me(Et){var Pn;const Rt=++U.current;B(!0),x(null);try{const rs=await Ze.fetchQuery(d5(Et));if(Rt!==U.current)return;D(rs),o||a(((Pn=rs.title)==null?void 0:Pn.trim())||rs.paperId)}catch(rs){Rt===U.current&&x(rs instanceof Error?rs.message:String(rs))}finally{Rt===U.current&&B(!1)}}function ze(){U.current+=1,H.current+=1,D(null),j(""),B(!1),w(!1),d(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function He(Et){if(Et===r)return;U.current+=1,H.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:_};const Rt=Q.current[Et];s(Et),x(null),B(!1),w(!1),a(Rt.name),c(Rt.nameTouched),d(Rt.path),p(Rt.pathTouched)}async function We(){if(m)return;const Et=++H.current;w(!0),x(null);try{const Rt=await uwn();if(Et!==H.current||!Rt)return;if(p(!0),d(Rt),Ze.invalidateQueries(O0(Rt)),r==="folder"&&!o){const Pn=Rt.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Pn&&a(Pn)}}catch(Rt){Et===H.current&&x(Rt instanceof Error?Rt.message:String(Rt))}finally{Et===H.current&&w(!1)}}async function ct(Et){if(Et.preventDefault(),!!ut){v(!0),x(null);try{const Rt=await Ze.fetchQuery({...O0($.trim()),staleTime:0});if(Rt.exists&&Rt.directory===!1)throw new Error(yw());if(r==="blank"&&Rt.exists)throw new Error(jz());if(r==="paper"&&Rt.empty===!1)throw new Error(Mz());N&&oe&&await Ze.fetchQuery({...kj(oe.owner,oe.repo),staleTime:0}).catch(()=>null);const Pn=await Ce.mutateAsync({name:i.trim(),path:$.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:E(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(Pn.project,Pn.githubPublicationError)}catch(Rt){x(Rt instanceof Error?Rt.message:String(Rt))}finally{v(!1)}}}const St=i.trim(),Be=r==="paper"&&M&&!M.repoUrl?M.paperId:null,un=r==="folder"&&(q==null?void 0:q.gitState)==="ready"?q.resolvedPath??null:null,Vt=St!==""&&(Be!==null||un!==null);T.useEffect(()=>{if(!Vt)return;const Et=window.setTimeout(()=>{vwn({name:St,paperId:Be??void 0,path:un??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(Et)},[Vt,St,Be,un]);const _n=(q==null?void 0:q.gitVersion)===null,Gt=r==="folder"&&!!$.trim()&&q!==null&&q.exists===!1,cn=r==="blank"&&(q==null?void 0:q.exists)===!0,Tt=!!$.trim()&&(q==null?void 0:q.exists)===!0&&q.directory===!1,$t=r==="paper"&&!!(M!=null&&M.repoUrl)&&(q==null?void 0:q.empty)===!1,Lr=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(q==null?void 0:q.empty)===!1,mr=r==="folder"&&((q==null?void 0:q.gitState)==="detached"||(q==null?void 0:q.gitState)==="invalid"),Gr=_&&!$.trim()||Tt||$t||Lr,Jt=_&&!$.trim()||Tt||cn,Gn=_&&!$.trim()?Rz():Tt?yw():cn?jz():null,ls=_&&!$.trim()?Rz():Tt?yw():$t?Mz():Lr?Vit():null,ut=!!(i.trim()&&$.trim())&&!k&&!m&&!ie&&q!==null&&!V&&!_n&&!Gt&&!cn&&!Tt&&!$t&&!Lr&&!mr&&(r!=="paper"||!!M)&&(!N||typeof ne=="string"&&!Ee&&!Ye),fn=Me??`github.com/${ne??"you"}/${be}`,yn=ne===void 0||Ee||Ye,Tn=r==="paper"&&!M&&A.trim().length>=3&&$e===A.trim()&&!ot&&qt.length===0&&!y;return f.jsxs("form",{className:"form [&_.form-seg]:self-start [&_.form-seg]:mb-0.5 [&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3 [&_.repo-hint]:font-normal [&_.repo-hint]:text-sm [&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal [&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center [&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full [&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5 [&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background [&_.folder-picker-control]:border [&_.folder-picker-control]:border-border [&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer [&_.folder-picker-control]:text-start [&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard [&_.folder-picker-control:hover:not(:disabled)]:border-muted [&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle [&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text [&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1 [&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden [&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap [&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none [&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none [&_.folder-picker-chevron]:text-muted [&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext [&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm [&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4] [&_.project-location-field]:flex [&_.project-location-field]:flex-col [&_.project-location-field]:gap-2 [&_.project-location-label]:text-text [&_.project-location-label]:text-base [&_.project-location-label]:font-medium [&_.project-field-label]:text-text [&_.project-field-label]:text-base [&_.project-field-label]:font-medium [&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65 [&_.paper-destination]:flex [&_.paper-destination]:items-center [&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3 [&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md [&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1 [&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden [&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm [&_.paper-destination_code]:font-normal [&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap [&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px] [&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant [&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface [&_.project-path-notice]:text-subtext [&_.project-path-notice]:text-sm [&_.project-path-notice]:leading-[1.4] [&_.project-path-notice.error]:border-danger-notice-border [&_.paper-results]:flex [&_.paper-results]:flex-col [&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md [&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto [&_.paper-results_button]:flex [&_.paper-results_button]:flex-col [&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5 [&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent [&_.paper-results_button]:border-0 [&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant [&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit] [&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer [&_.paper-results_button:last-child]:border-b-0 [&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm [&_.paper-results_.title]:font-medium [&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted [&_.paper-pick_.id]:text-xs [&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center [&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3 [&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md [&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0 [&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium flex flex-col [&_label]:flex [&_label]:flex-col [&_label]:gap-1 [&_label]:text-sm [&_label]:text-text [&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2 [&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end [&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start [&_.new-project-actions]:mt-2.5 [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap new-project-form gap-4.5 [&_>_label]:gap-2",onSubmit:ct,children:[f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default form-seg",children:[f.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>He("blank"),children:sot()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>He("folder"),children:Got()}),f.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),f.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>He("paper"),children:ict()})]}),r==="paper"&&!M&&f.jsxs("label",{className:"!font-normal",children:[Vct(),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:Et=>{x(null),j(Et.target.value)},placeholder:_lt()}),!Tn&&f.jsx("span",{className:"repo-hint",children:ot?But():Cut()}),Tn&&f.jsx("span",{className:"project-path-notice block",children:Cct()}),qt.length>0&&f.jsx("div",{className:"paper-results",children:qt.map(Et=>f.jsxs("button",{type:"button",onClick:()=>void me(Et.paperId),children:[f.jsx(sm,{children:Et.title}),f.jsx("span",{className:"id",children:Et.paperId})]},Et.paperId))})]}),M&&r==="paper"&&f.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[f.jsxs("div",{className:"meta",children:[f.jsx(sm,{className:"block",children:M.title||M.paperId}),M.repoUrl&&f.jsx("div",{className:"id",children:XHn(M.repoUrl)})]}),f.jsx(Oe,{size:"small",type:"button","aria-label":Cot(),onClick:ze,children:vot()})]}),!M.repoUrl&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-1 rounded-md border border-border-variant bg-background px-[9px] py-1 text-sm font-normal text-subtext",children:[f.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[f.jsx(VS,{size:16})," ",Rct()]}),f.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Bct()})]})]}),(r!=="paper"||M)&&f.jsxs(f.Fragment,{children:[r==="blank"&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:F3()}),f.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:Et=>{c(!0),a(Et.target.value)},placeholder:Tz()})]}),r==="paper"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?bat():xw()}),f.jsx("input",{className:"text-sm font-normal",value:$,onChange:Et=>{p(!0),d(Et.target.value)},"aria-describedby":Gr?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ie&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Az()}),Gr&&f.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:ls})]}):r==="folder"&&!t?f.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?Jit({path:Ae(u)}):Nz(),disabled:m,title:u||void 0,onClick:()=>void We(),children:[f.jsx(vo,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),f.jsx("span",{className:u?"text-sm":"placeholder",children:m?fat():u||Nz()}),f.jsx(yo,{className:"folder-picker-chevron",size:15})]}):r==="folder"?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:xw()}),f.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:Et=>{p(!0),d(Et.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?f.jsxs("label",{className:"project-location-field",children:[f.jsx("span",{className:"project-location-label !font-medium",children:xw()}),f.jsx("input",{className:"text-sm font-normal",value:$,onChange:Et=>{p(!0),d(Et.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Jt?"blank-destination-description":void 0,spellCheck:!1}),ie&&f.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Az()}),Jt&&f.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Gn})]}):null,r!=="blank"&&$&&f.jsxs("label",{className:"!font-normal",children:[f.jsx("span",{className:"project-field-label !font-medium",children:F3()}),f.jsx("input",{className:"text-sm font-normal",value:i,onChange:Et=>{c(!0),a(Et.target.value)},placeholder:Tz()})]}),_n&&f.jsx("div",{className:"project-path-notice error",children:fct()}),!_n&&r==="folder"&&u.trim()&&!ie&&(q==null?void 0:q.exists)===!1&&f.jsx("div",{className:"project-path-notice error",children:Clt()}),!_n&&r==="folder"&&u.trim()&&!ie&&Tt&&f.jsx("div",{className:"project-path-notice error",children:Blt()}),!_n&&r==="folder"&&!ie&&(q==null?void 0:q.gitState)==="detached"&&f.jsx("div",{className:"project-path-notice error",children:Rot()}),!_n&&r==="folder"&&!ie&&(q==null?void 0:q.gitState)==="invalid"&&f.jsx("div",{className:"project-path-notice error",children:Rlt()}),V&&f.jsx("div",{className:"project-path-notice error",role:"alert",children:V})]}),y&&f.jsx("div",{className:"error",role:"alert",children:y}),(r!=="paper"||M)&&$&&(r!=="blank"||i.trim())&&f.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[f.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${N&&ne===null?" text-accent-red":" text-text"}`,"aria-expanded":b,"aria-controls":"new-project-advanced-settings",onClick:()=>C(Et=>!Et),children:[N?ne===null?Rit():Bit():zL(),f.jsx(qc,{className:b?"rotate-180":"",size:16})]}),b&&f.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[f.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[f.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:Et=>z(Et.target.checked),disabled:k}),f.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:vlt()})]}),f.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[f.jsx("span",{children:yn?Vlt({repository:Ae(fn)}):Me?aut({repository:Ae(fn)}):Jlt({repository:Ae(fn)})}),f.jsx("span",{children:Zot()}),ne===null&&f.jsx("span",{children:Rut({command:Ae("gh auth login")})})]})]})]}),f.jsxs("div",{className:"actions new-project-actions",children:[n&&f.jsx(Oe,{type:"button",onClick:n,children:_ot()}),f.jsx(Oe,{variant:"primary",className:"ms-auto",disabled:!ut,children:k?Bat():r==="paper"?M!=null&&M.repoUrl?Eat():zz():r==="folder"?Vut():zz()})]})]})}function ZHn({onClose:e,onCreated:n,remote:t=!1}){const r=T.useRef(null),s=T.useRef(e);return s.current=e,T.useEffect(()=>{const i=r.current;if(!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...i.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(i.querySelector("[data-initial-focus]")??o()[0]??i).focus();const c=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),s.current();return}if(u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&!u.altKey&&u.shiftKey){u.preventDefault(),u.stopPropagation();return}if(u.key!=="Tab")return;const d=o();if(d.length===0){u.preventDefault(),i.focus();return}const _=d[0],p=d[d.length-1];u.shiftKey&&document.activeElement===_?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),_.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),a==null||a.focus()}},[]),f.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-start justify-center p-5 [--new-project-modal-top:clamp(4rem,20vh,24rem)] pt-[var(--new-project-modal-top)] overflow-y-auto z-100",onClick:i=>{i.target===i.currentTarget&&e()},children:f.jsxs("div",{ref:r,className:"modal w-120 max-w-full max-h-[calc(100vh_-_var(--new-project-modal-top)_-_1.25rem)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl [&_h2]:font-medium",role:"dialog","aria-modal":"true","aria-labelledby":"new-project-dialog-title",tabIndex:-1,children:[f.jsx("h2",{id:"new-project-dialog-title",children:tb()}),f.jsx(YHn,{onCancel:e,onCreated:n,remote:t})]})})}function JHn(e){const n=new Map,t=new Map(e.map(c=>[c.id,c]));for(const c of e){if(!c.parentExperimentId)continue;const u=n.get(c.parentExperimentId)??[];u.push(c),n.set(c.parentExperimentId,u)}const r=new Map,s=new Map;function i(c){const u=r.get(c);if(u!==void 0)return u;const d=(n.get(c)??[]).some(_=>_.archived||i(_.id));return r.set(c,d),d}function a(c){const u=s.get(c);if(u!==void 0)return u;const d=(n.get(c)??[]).some(_=>!_.archived||a(_.id));return s.set(c,d),d}const o=new Map;for(const c of e){let u=!1,d=!1,_=c.parentExperimentId?t.get(c.parentExperimentId):void 0;for(;_;)_.archived?d=!0:u=!0,_=_.parentExperimentId?t.get(_.parentExperimentId):void 0;o.set(c.id,{archiveOnly:!c.archived,archiveAbove:!c.archived&&u,archiveDown:!c.archived&&a(c.id),restoreOnly:c.archived,restoreAbove:!c.archived&&d,restoreDown:i(c.id)})}return o}function oU({id:e,name:n,actions:t,onArchive:r,compact:s=!1}){const i=T.useRef(null),a=ra(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const _=i.current.getBoundingClientRect(),p=Object.values(t).filter(Boolean).length*32+12,m=window.innerHeight-_.bottom>=p;c({top:m?_.bottom+4:Math.max(4,_.top-p),left:Math.max(4,Math.min(_.right-176,window.innerWidth-180))})}a.setOpen(_=>!_)},d=(_,p)=>{a.setOpen(!1),r(e,_,p)};return f.jsxs("div",{className:"nodrag ms-auto shrink-0",children:[s?f.jsx(At,{type:"button",ref:i,size:"small",className:"node-action","aria-label":oj({name:n}),"aria-expanded":a.open,onClick:u,children:f.jsx(ip,{size:15,"aria-hidden":"true"})}):f.jsx("button",{type:"button",className:"btn inline-flex h-7 items-center justify-center rounded-sm border border-border bg-background px-2.5 text-sm text-text hover:bg-surface",ref:i,"aria-label":oj({name:n}),"aria-expanded":a.open,onClick:u,children:omn()}),a.open&&ni.createPortal(f.jsxs("div",{ref:a.ref,className:"option-menu fixed z-70 min-w-44 rounded-lg border border-border bg-background p-1.5 shadow-menu",style:o,children:[t.archiveAbove&&f.jsx(on,{onClick:()=>d("ancestors",!0),children:K0n()}),t.archiveOnly&&f.jsx(on,{onClick:()=>d("only",!0),children:ymn()}),t.archiveDown&&f.jsx(on,{onClick:()=>d("descendants",!0),children:emn()}),t.restoreOnly&&f.jsx(on,{onClick:()=>d("only",!1),children:bI()}),t.restoreAbove&&f.jsx(on,{onClick:()=>d("ancestors",!1),children:ygn()}),t.restoreDown&&f.jsx(on,{onClick:()=>d("descendants",!1),children:Ogn()})]}),document.body)]})}function eqn({runs:e,experiments:n,archiveActions:t,emptyHint:r,onOpen:s,onOpenLogs:i,onOpenCode:a,onArchive:o,onCancel:c}){const[u,d]=T.useState(new Set),[_,p]=T.useState(null),m=new Map;for(const v of e){const y=m.get(v.experimentId);y?y.push(v):m.set(v.experimentId,[v])}for(const v of m.values())v.sort((y,x)=>x.createdAt-y.createdAt);const w=[...n].sort((v,y)=>{var C,N,z,A;const x=((N=(C=m.get(v.id))==null?void 0:C[0])==null?void 0:N.createdAt)??v.createdAt;return(((A=(z=m.get(y.id))==null?void 0:z[0])==null?void 0:A.createdAt)??y.createdAt)-x});if(w.length===0)return f.jsx(WC,{icon:Bh,title:r??_$e(),description:r?void 0:YIe()});async function k(v){p(null),d(y=>new Set(y).add(v));try{await c(v)}catch(y){d(x=>{const b=new Set(x);return b.delete(v),b}),p(y instanceof Error?y.message:String(y))}}return f.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[_&&f.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[EBe()," ",_]}),f.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":dBe(),children:w.map(v=>{const y=m.get(v.id)??[],x=y[0]??null,b=y.find(A=>A.status==="running"||A.status==="starting"),C=b??x,N=!!(b&&(b.cancelRequested||u.has(b.id))),z=b?N?"cancelling":Aa(b):x?Aa(x):"idle";return f.jsxs("div",{className:"experiment-table-group grid grid-cols-[minmax(0,_1fr)_auto] [grid-template-areas:'name_meta'_'actions_actions'] gap-x-8 items-center py-4 px-5 gap-y-[7px] border-b border-b-divider-subtle bg-background cursor-pointer [&:hover]:bg-canvas [&:last-child]:border-b-0 [@container((max-width:_560px))]:grid-cols-[minmax(0,_1fr)_auto] [@container((max-width:_560px))]:gap-x-3.5 [@container((max-width:_560px))]:gap-y-[9px] [@container((max-width:_400px))]:grid-cols-[minmax(0,_1fr)] [@container((max-width:_400px))]:[grid-template-areas:'name'_'meta'_'actions']",role:"listitem",onClick:()=>s(v,"preview"),onDoubleClick:()=>s(v,"keepOpen"),onAuxClick:A=>{A.button===1&&(A.preventDefault(),s(v,"keepOpen"))},children:[f.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[f.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...ns(A=>s(v,A),{stopPropagation:!0}),children:v.title||v.slug}),v.archived&&f.jsx("span",{className:"text-muted text-xs",children:vI()}),f.jsxs("span",{className:"experiment-table-subtitle flex items-center min-w-0 gap-1.5 mt-1 overflow-hidden text-subtext text-sm [&_>_svg]:shrink-0 [&_code]:min-w-0 [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:v.branchName,children:[f.jsx(tg,{size:14,"aria-hidden":"true"}),f.jsx("code",{children:v.branchName})]})]}),f.jsxs("div",{className:"experiment-table-meta [grid-area:meta] self-start flex items-center justify-end gap-4.5 whitespace-nowrap [@container((max-width:_560px))]:flex-col [@container((max-width:_560px))]:items-end [@container((max-width:_560px))]:gap-1.5 [@container((max-width:_400px))]:!flex-row [@container((max-width:_400px))]:!items-center [@container((max-width:_400px))]:flex-wrap [@container((max-width:_400px))]:justify-start [@container((max-width:_400px))]:gap-3",children:[f.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:f.jsx(Pl,{status:z})}),f.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:f.jsx("span",{children:y.length===1?C$e():B$e({count:ln(y.length)})})}),f.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:f.jsx("span",{children:x?Dc(x.createdAt):v$e()})})]}),f.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":AX({name:v.title||v.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[f.jsxs(Oe,{size:"small",disabled:!C,title:C?R$e():s$e(),...ns(A=>{C&&i(v.id,C.id,A)},{stopPropagation:!0}),children:[f.jsx(Ko,{size:15}),$3()]}),f.jsxs(Oe,{size:"small",title:ZD({branch:Ae(v.branchName)}),...ns(A=>a(v.id,A),{stopPropagation:!0}),children:[f.jsx(fy,{size:15}),aBe()]}),b&&f.jsxs(Oe,{size:"small",variant:"danger",disabled:N,title:N?V$e():J$e(),onClick:()=>void k(b.id),children:[f.jsx(E$,{size:15}),N?MAe():hL()]}),f.jsx(oU,{id:v.id,name:v.title||v.slug,actions:t.get(v.id),onArchive:o})]})]},v.id)})})]})}function tqn({onClose:e,onCreateProject:n}){const[t,r]=T.useState(!1),[s,i]=T.useState(null),a=T.useRef(null),o=T.useCallback(c=>{t||(r(!0),i(null),c().catch(()=>i(b0n())).finally(()=>r(!1)))},[t]);return T.useEffect(()=>{const c=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),T.useEffect(()=>{const c=a.current;if(!c)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,d=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(d()[0]??c).focus();const _=p=>{if(p.key!=="Tab")return;const m=d();if(m.length===0){p.preventDefault(),c.focus();return}const w=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===w?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),w.focus())};return document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("keydown",_,!0),u==null||u.focus()}},[]),ni.createPortal(f.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:f.jsxs("div",{ref:a,className:"relative w-110 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"demo-welcome-title",tabIndex:-1,children:[f.jsx(At,{className:"absolute end-3.5 top-3.5","aria-label":sb(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:f.jsx(ur,{size:16})}),f.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[f.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:f.jsx(vy,{})}),f.jsxs("div",{children:[f.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Gpn()}),f.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:M0n()})]})]}),f.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[f.jsxs("p",{dir:"auto",children:[E0n()," ",f.jsx("a",{dir:"ltr",href:"https://github.com/karpathy/nanochat",target:"_blank",rel:"noreferrer",className:"font-medium text-primary underline decoration-border-strong underline-offset-3 hover:decoration-primary",children:i0n()}),Cpn()]}),f.jsx("p",{dir:"auto",children:Zpn()})]}),s&&f.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),f.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[f.jsx(Oe,{onClick:()=>o(n),disabled:t,children:$pn()}),f.jsx(Oe,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?Ba():f0n()})]})]})}),document.body)}function Cs(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function fx(){for(var e=0,n=arguments.length,t={},r;e=0&&(r=t.slice(s+1),t=t.slice(0,s)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}Ov.prototype=fx.prototype={constructor:Ov,on:function(e,n){var t=this._,r=rqn(e+"",t),s,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var t=new Array(s),r=0,s,i;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),EM.hasOwnProperty(n)?{space:EM[n],local:e}:e}function iqn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===Ik&&n.documentElement.namespaceURI===Ik?n.createElement(e):n.createElementNS(t,e)}}function aqn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cU(e){var n=dx(e);return(n.local?aqn:iqn)(n)}function oqn(){}function QC(e){return e==null?oqn:function(){return this.querySelector(e)}}function cqn(e){typeof e!="function"&&(e=QC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=b&&(b=x+1);!(N=v[b])&&++b=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Mqn(e){e||(e=Oqn);function n(_,p){return _&&p?e(_.__data__,p.__data__):!_-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function Dqn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Lqn(){return Array.from(this)}function Iqn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?Wqn:typeof n=="function"?Xqn:Qqn)(e,n,t??"")):Qh(this.node(),e)}function Qh(e,n){return e.style.getPropertyValue(n)||dU(e).getComputedStyle(e,null).getPropertyValue(n)}function Zqn(e){return function(){delete this[e]}}function Jqn(e,n){return function(){this[e]=n}}function eUn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function tUn(e,n){return arguments.length>1?this.each((n==null?Zqn:typeof n=="function"?eUn:Jqn)(e,n)):this.node()[e]}function hU(e){return e.trim().split(/^|\s+/)}function XC(e){return e.classList||new pU(e)}function pU(e){this._node=e,this._names=hU(e.getAttribute("class")||"")}pU.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function mU(e,n){for(var t=XC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function jUn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function $k(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}$k.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function BUn(e){return!e.ctrlKey&&!e.button}function PUn(){return this.parentNode}function FUn(e,n){return n??{x:e.x,y:e.y}}function HUn(){return navigator.maxTouchPoints||"ontouchstart"in this}function wU(){var e=BUn,n=PUn,t=FUn,r=HUn,s={},i=fx("start","drag","end"),a=0,o,c,u,d,_=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",y,$Un).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(d||!e.call(this,C,N))){var z=b(this,n.call(this,C,N),C,N,"mouse");z&&(Na(C.view).on("mousemove.drag",w,ym).on("mouseup.drag",k,ym),yU(C.view),V4(C),u=!1,o=C.clientX,c=C.clientY,z("start",C))}}function w(C){if(hh(C),!u){var N=C.clientX-o,z=C.clientY-c;u=N*N+z*z>_}s.mouse("drag",C)}function k(C){Na(C.view).on("mousemove.drag mouseup.drag",null),xU(C.view,u),hh(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var z=C.changedTouches,A=n.call(this,C,N),j=z.length,M,D;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?nv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?nv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=UUn.exec(e))?new na(n[1],n[2],n[3],1):(n=GUn.exec(e))?new na(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=VUn.exec(e))?nv(n[1],n[2],n[3],n[4]):(n=KUn.exec(e))?nv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=WUn.exec(e))?MM(n[1],n[2]/100,n[3]/100,1):(n=QUn.exec(e))?MM(n[1],n[2]/100,n[3]/100,n[4]):NM.hasOwnProperty(e)?AM(NM[e]):e==="transparent"?new na(NaN,NaN,NaN,0):null}function AM(e){return new na(e>>16&255,e>>8&255,e&255,1)}function nv(e,n,t,r){return r<=0&&(e=n=t=NaN),new na(e,n,t,r)}function ZUn(e){return e instanceof hg||(e=$f(e)),e?(e=e.rgb(),new na(e.r,e.g,e.b,e.opacity)):new na}function Bk(e,n,t,r){return arguments.length===1?ZUn(e):new na(e,n,t,r??1)}function na(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}YC(na,Bk,kU(hg,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new na(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xm:Math.pow(xm,e),new na(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new na(wf(this.r),wf(this.g),wf(this.b),Fb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TM,formatHex:TM,formatHex8:JUn,formatRgb:RM,toString:RM}));function TM(){return`#${nf(this.r)}${nf(this.g)}${nf(this.b)}`}function JUn(){return`#${nf(this.r)}${nf(this.g)}${nf(this.b)}${nf((isNaN(this.opacity)?1:this.opacity)*255)}`}function RM(){const e=Fb(this.opacity);return`${e===1?"rgb(":"rgba("}${wf(this.r)}, ${wf(this.g)}, ${wf(this.b)}${e===1?")":`, ${e})`}`}function Fb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nf(e){return e=wf(e),(e<16?"0":"")+e.toString(16)}function MM(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ho(e,n,t,r)}function SU(e){if(e instanceof Ho)return new Ho(e.h,e.s,e.l,e.opacity);if(e instanceof hg||(e=$f(e)),!e)return new Ho;if(e instanceof Ho)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),i=Math.max(n,t,r),a=NaN,o=i-s,c=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&c<1?0:a,new Ho(a,o,c,e.opacity)}function eGn(e,n,t,r){return arguments.length===1?SU(e):new Ho(e,n,t,r??1)}function Ho(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}YC(Ho,eGn,kU(hg,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new Ho(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xm:Math.pow(xm,e),new Ho(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*n,s=2*t-r;return new na(K4(e>=240?e-240:e+120,s,r),K4(e,s,r),K4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ho(OM(this.h),rv(this.s),rv(this.l),Fb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Fb(this.opacity);return`${e===1?"hsl(":"hsla("}${OM(this.h)}, ${rv(this.s)*100}%, ${rv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OM(e){return e=(e||0)%360,e<0?e+360:e}function rv(e){return Math.max(0,Math.min(1,e||0))}function K4(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const ZC=e=>()=>e;function tGn(e,n){return function(t){return e+t*n}}function nGn(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(r){return Math.pow(e+r*n,t)}}function rGn(e){return(e=+e)==1?CU:function(n,t){return t-n?nGn(n,t,e):ZC(isNaN(n)?t:n)}}function CU(e,n){var t=n-e;return t?tGn(e,t):ZC(isNaN(e)?n:e)}const Hb=(function e(n){var t=rGn(n);function r(s,i){var a=t((s=Bk(s)).r,(i=Bk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=CU(s.opacity,i.opacity);return function(d){return s.r=a(d),s.g=o(d),s.b=c(d),s.opacity=u(d),s+""}}return r.gamma=e,r})(1);function sGn(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(i){for(s=0;st&&(i=n.slice(t,i),o[a]?o[a]+=i:o[++a]=i),(r=r[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,c.push({i:a,x:Ec(r,s)})),t=W4.lastIndex;return t180?d+=360:d-u>180&&(u+=360),p.push({i:_.push(s(_)+"rotate(",null,r)-2,x:Ec(u,d)})):d&&_.push(s(_)+"rotate("+d+r)}function o(u,d,_,p){u!==d?p.push({i:_.push(s(_)+"skewX(",null,r)-2,x:Ec(u,d)}):d&&_.push(s(_)+"skewX("+d+r)}function c(u,d,_,p,m,w){if(u!==_||d!==p){var k=m.push(s(m)+"scale(",null,",",null,")");w.push({i:k-4,x:Ec(u,_)},{i:k-2,x:Ec(d,p)})}else(_!==1||p!==1)&&m.push(s(m)+"scale("+_+","+p+")")}return function(u,d){var _=[],p=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,_,p),a(u.rotate,d.rotate,_,p),o(u.skewX,d.skewX,_,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,_,p),u=d=null,function(m){for(var w=-1,k=p.length,v;++w=0&&e._call.call(void 0,n),e=e._next;--Xh}function IM(){Bf=(Ub=km.now())+hx,Xh=N0=0;try{bGn()}finally{Xh=0,xGn(),Bf=0}}function yGn(){var e=km.now(),n=e-Ub;n>jU&&(hx-=n,Ub=e)}function xGn(){for(var e,n=qb,t,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:qb=t);z0=e,Hk(r)}function Hk(e){if(!Xh){N0&&(N0=clearTimeout(N0));var n=e-Bf;n>24?(e<1/0&&(N0=setTimeout(IM,e-km.now()-hx)),y0&&(y0=clearInterval(y0))):(y0||(Ub=km.now(),y0=setInterval(yGn,jU)),Xh=1,AU(IM))}}function $M(e,n,t){var r=new Gb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var wGn=fx("start","end","cancel","interrupt"),kGn=[],RU=0,BM=1,qk=2,Lv=3,PM=4,Uk=5,Iv=6;function px(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;SGn(e,t,{name:n,index:r,group:s,on:wGn,tween:kGn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:RU})}function e7(e,n){var t=Xo(e,n);if(t.state>RU)throw new Error("too late; already scheduled");return t}function Qc(e,n){var t=Xo(e,n);if(t.state>Lv)throw new Error("too late; already running");return t}function Xo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function SGn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=TU(i,0,t.time);function i(u){t.state=BM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var d,_,p,m;if(t.state!==BM)return c();for(d in r)if(m=r[d],m.name===t.name){if(m.state===Lv)return $M(a);m.state===PM?(m.state=Iv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+dqk&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function eVn(e,n,t){var r,s,i=JGn(n)?e7:Qc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function tVn(e,n){var t=this._id;return arguments.length<2?Xo(this.node(),t).on.on(e):this.each(eVn(t,e,n))}function nVn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function rVn(){return this.on("end.remove",nVn(this._id))}function sVn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=QC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function jVn(e,{sourceEvent:n,target:t,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function $l(e,n,t){this.k=e,this.x=n,this.y=t}$l.prototype={constructor:$l,scale:function(e){return e===1?this:new $l(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new $l(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mx=new $l(1,0,0);LU.prototype=$l.prototype;function LU(e){for(;!e.__zoom;)if(!(e=e.parentNode))return mx;return e.__zoom}function Q4(e){e.stopImmediatePropagation()}function x0(e){e.preventDefault(),e.stopImmediatePropagation()}function AVn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function TVn(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function FM(){return this.__zoom||mx}function RVn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function MVn(){return navigator.maxTouchPoints||"ontouchstart"in this}function OVn(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],i=e.invertY(n[0][1])-t[0][1],a=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function IU(){var e=AVn,n=TVn,t=OVn,r=RVn,s=MVn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=Dv,u=fx("start","zoom","end"),d,_,p,m=500,w=150,k=0,v=10;function y(H){H.property("__zoom",FM).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",L).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(H,Q,K,Z){var ee=H.selection?H.selection():H;ee.property("__zoom",FM),H!==ee?N(H,Q,K,Z):ee.interrupt().each(function(){z(this,arguments).event(Z).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},y.scaleBy=function(H,Q,K,Z){y.scaleTo(H,function(){var ee=this.__zoom.k,$=typeof Q=="function"?Q.apply(this,arguments):Q;return ee*$},K,Z)},y.scaleTo=function(H,Q,K,Z){y.transform(H,function(){var ee=n.apply(this,arguments),$=this.__zoom,I=K==null?C(ee):typeof K=="function"?K.apply(this,arguments):K,F=$.invert(I),q=typeof Q=="function"?Q.apply(this,arguments):Q;return t(b(x($,q),I,F),ee,a)},K,Z)},y.translateBy=function(H,Q,K,Z){y.transform(H,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof K=="function"?K.apply(this,arguments):K),n.apply(this,arguments),a)},null,Z)},y.translateTo=function(H,Q,K,Z,ee){y.transform(H,function(){var $=n.apply(this,arguments),I=this.__zoom,F=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(mx.translate(F[0],F[1]).scale(I.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof K=="function"?-K.apply(this,arguments):-K),$,a)},Z,ee)};function x(H,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===H.k?H:new $l(Q,H.x,H.y)}function b(H,Q,K){var Z=Q[0]-K[0]*H.k,ee=Q[1]-K[1]*H.k;return Z===H.x&&ee===H.y?H:new $l(H.k,Z,ee)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function N(H,Q,K,Z){H.on("start.zoom",function(){z(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(Z).end()}).tween("zoom",function(){var ee=this,$=arguments,I=z(ee,$).event(Z),F=n.apply(ee,$),q=K==null?C(F):typeof K=="function"?K.apply(ee,$):K,V=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ie=ee.__zoom,oe=typeof Q=="function"?Q.apply(ee,$):Q,ce=c(ie.invert(q).concat(V/ie.k),oe.invert(q).concat(V/oe.k));return function(ne){if(ne===1)ne=oe;else{var G=ce(ne),ae=V/G[2];ne=new $l(ae,q[0]-G[0]*ae,q[1]-G[1]*ae)}I.zoom(null,ne)}})}function z(H,Q,K){return!K&&H.__zooming||new A(H,Q)}function A(H,Q){this.that=H,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(H,Q),this.taps=0}A.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,Q){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Q=Na(this.that).datum();u.call(H,this.that,new jVn(H,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),Q)}};function j(H,...Q){if(!e.apply(this,arguments))return;var K=z(this,Q).event(H),Z=this.__zoom,ee=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=$o(H);if(K.wheel)(K.mouse[0][0]!==$[0]||K.mouse[0][1]!==$[1])&&(K.mouse[1]=Z.invert(K.mouse[0]=$)),clearTimeout(K.wheel);else{if(Z.k===ee)return;K.mouse=[$,Z.invert($)],$v(this),K.start()}x0(H),K.wheel=setTimeout(I,w),K.zoom("mouse",t(b(x(Z,ee),K.mouse[0],K.mouse[1]),K.extent,a));function I(){K.wheel=null,K.end()}}function M(H,...Q){if(p||!e.apply(this,arguments))return;var K=H.currentTarget,Z=z(this,Q,!0).event(H),ee=Na(H.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",V,!0),$=$o(H,K),I=H.clientX,F=H.clientY;yU(H.view),Q4(H),Z.mouse=[$,this.__zoom.invert($)],$v(this),Z.start();function q(ie){if(x0(ie),!Z.moved){var oe=ie.clientX-I,ce=ie.clientY-F;Z.moved=oe*oe+ce*ce>k}Z.event(ie).zoom("mouse",t(b(Z.that.__zoom,Z.mouse[0]=$o(ie,K),Z.mouse[1]),Z.extent,a))}function V(ie){ee.on("mousemove.zoom mouseup.zoom",null),xU(ie.view,Z.moved),x0(ie),Z.event(ie).end()}}function D(H,...Q){if(e.apply(this,arguments)){var K=this.__zoom,Z=$o(H.changedTouches?H.changedTouches[0]:H,this),ee=K.invert(Z),$=K.k*(H.shiftKey?.5:2),I=t(b(x(K,$),Z,ee),n.apply(this,Q),a);x0(H),o>0?Na(this).transition().duration(o).call(N,I,Z,H):Na(this).call(y.transform,I,Z,H)}}function L(H,...Q){if(e.apply(this,arguments)){var K=H.touches,Z=K.length,ee=z(this,Q,H.changedTouches.length===Z).event(H),$,I,F,q;for(Q4(H),I=0;I`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:t,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?t:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Sm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],$U=["Enter"," ","Escape"],BU={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:t})=>`Moved selected node ${e}. New position, x: ${n}, y: ${t}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Yh;(function(e){e.Strict="strict",e.Loose="loose"})(Yh||(Yh={}));var kf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(kf||(kf={}));var Cm;(function(e){e.Partial="partial",e.Full="full"})(Cm||(Cm={}));const PU={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var $u;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($u||($u={}));var Vb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Vb||(Vb={}));var Dt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Dt||(Dt={}));const HM={[Dt.Left]:Dt.Right,[Dt.Right]:Dt.Left,[Dt.Top]:Dt.Bottom,[Dt.Bottom]:Dt.Top};function FU(e){return e===null?null:e?"valid":"invalid"}const HU=e=>"id"in e&&"source"in e&&"target"in e,DVn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),n7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),pg=(e,n=[0,0])=>{const{width:t,height:r}=Yl(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},LVn=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const t=e.reduce((r,s)=>{const i=typeof s=="string";let a=!n.nodeLookup&&!i?s:void 0;n.nodeLookup&&(a=i?n.nodeLookup.get(s):n7(s)?s:n.nodeLookup.get(s.id));const o=a?Kb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return gx(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return vx(t)},mg=(e,n={})=>{let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(n.filter===void 0||n.filter(s))&&(t=gx(t,Kb(s)),r=!0)}),r?vx(t):{x:0,y:0,width:0,height:0}},r7=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,u=n.width/s,d=n.height/s,_=[];for(const p of e.values()){const{measured:m,selectable:w=!0,hidden:k=!1}=p;if(a&&!w||k)continue;const v=m.width??p.width??p.initialWidth??0,y=m.height??p.height??p.initialHeight??0,{x,y:b}=p.internals.positionAbsolute,C=VU(o,c,u,d,x,b,v,y),N=v*y,z=i&&C>0;(!p.internals.handleBounds||z||C>=N||p.dragging)&&_.push(p)}return _},IVn=(e,n)=>{const t=new Set;return e.forEach(r=>{t.add(r.id)}),n.filter(r=>t.has(r.source)||t.has(r.target))};function $Vn(e,n){const t=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&t.set(s.id,s)}),t}async function BVn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=$Vn(e,a),c=mg(o),u=i7(c,n,t,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await r.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function qU({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:i}){const a=t.get(e),o=a.parentId?t.get(a.parentId):void 0,{x:c,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},d=a.origin??r;let _=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",Wo.error005());else{const m=o.measured.width,w=o.measured.height;m&&w&&(_=[[c,u],[c+m,u+w]])}else o&&Ff(a.extent)&&(_=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=Ff(_)?Pf(n,_,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",Wo.error015())),{position:{x:p.x-c+(a.measured.width??0)*d[0],y:p.y-u+(a.measured.height??0)*d[1]},positionAbsolute:p}}async function PVn({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of t){if(p.deletable===!1)continue;const m=i.has(p.id),w=!m&&p.parentId&&a.find(k=>k.id===p.parentId);(m||w)&&a.push(p)}const o=new Set(n.map(p=>p.id)),c=r.filter(p=>p.deletable!==!1),d=IVn(a,c);for(const p of c)o.has(p.id)&&!d.find(w=>w.id===p.id)&&d.push(p);if(!s)return{edges:d,nodes:a};const _=await s({nodes:a,edges:d});return typeof _=="boolean"?_?{edges:d,nodes:a}:{edges:[],nodes:[]}:_}const Zh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Pf=(e={x:0,y:0},n,t)=>({x:Zh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:Zh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function UU(e,n,t){const{width:r,height:s}=Yl(t),{x:i,y:a}=t.internals.positionAbsolute;return Pf(e,[[i,a],[i+r,a+s]],n)}const qM=(e,n,t)=>et?-Zh(Math.abs(e-t),1,n)/n:0,s7=(e,n,t=15,r=40)=>{const s=qM(e.x,r,n.width-r)*t,i=qM(e.y,r,n.height-r)*t;return[s,i]},gx=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Gk=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),vx=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),Em=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=n7(e)?e.internals.positionAbsolute:pg(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Kb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=n7(e)?e.internals.positionAbsolute:pg(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},GU=(e,n)=>vx(gx(Gk(e),Gk(n))),VU=(e,n,t,r,s,i,a,o)=>{const c=Math.max(0,Math.min(e+t,s+a)-Math.max(e,s)),u=Math.max(0,Math.min(n+r,i+o)-Math.max(n,i));return Math.ceil(c*u)},Wb=(e,n)=>VU(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),UM=e=>qo(e.width)&&qo(e.height)&&qo(e.x)&&qo(e.y),qo=e=>!isNaN(e)&&isFinite(e),KU=(e,n)=>(t,r)=>{},gg=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),vg=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?gg(o,a):o},Jh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Ud(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(n*t*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function FVn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Ud(e,t),s=Ud(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Ud(e.top??e.y??0,t),s=Ud(e.bottom??e.y??0,t),i=Ud(e.left??e.x??0,n),a=Ud(e.right??e.x??0,n);return{top:r,right:a,bottom:s,left:i,x:i+a,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function HVn(e,n,t,r,s,i){const{x:a,y:o}=Jh(e,[n,t,r]),{x:c,y:u}=Jh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),d=s-c,_=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(d),bottom:Math.floor(_)}}const i7=(e,n,t,r,s,i)=>{const a=FVn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),d=Zh(u,r,s),_=e.x+e.width/2,p=e.y+e.height/2,m=n/2-_*d,w=t/2-p*d,k=HVn(e,m,w,d,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:w-v.top+v.bottom,zoom:d}},Nm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ff(e){return e!=null&&e!=="parent"}function Yl(e){var n,t;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight??0}}function WU(e){var n,t;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight)!==void 0}function QU(e,n={width:0,height:0},t,r,s){const i={...e},a=r.get(t);if(a){const o=a.origin||s;i.x+=a.internals.positionAbsolute.x-(n.width??0)*o[0],i.y+=a.internals.positionAbsolute.y-(n.height??0)*o[1]}return i}function GM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function qVn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function UVn(e){return{...BU,...e||{}}}function U0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=Uo(e),o=vg({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?gg(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const a7=e=>({width:e.offsetWidth,height:e.offsetHeight}),XU=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},GVn=["INPUT","SELECT","TEXTAREA"];function YU(e){var r,s;const n=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:GVn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const ZU=e=>"clientX"in e,Uo=(e,n)=>{var i,a;const t=ZU(e),r=t?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=t?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},VM=(e,n,t,r,s)=>{const i=n.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const o=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,...a7(a)}})};function JU({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const c=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,d=Math.abs(c-e),_=Math.abs(u-n);return[c,u,d,_]}function av(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function KM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Dt.Left:return[n-av(n-r,i),t];case Dt.Right:return[n+av(r-n,i),t];case Dt.Top:return[n,t-av(t-s,i)];case Dt.Bottom:return[n,t+av(s-t,i)]}}function eG({sourceX:e,sourceY:n,sourcePosition:t=Dt.Bottom,targetX:r,targetY:s,targetPosition:i=Dt.Top,curvature:a=.25}){const[o,c]=KM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,d]=KM({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[_,p,m,w]=JU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${n} C${o},${c} ${u},${d} ${r},${s}`,_,p,m,w]}function tG({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const WVn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,QVn=(e,n)=>n.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),XVn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",Wo.error006()),n;const r=t.getEdgeId||WVn;let s;return HU(e)?s={...e}:s={...e,id:r(e)},QVn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function nG({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=tG({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const WM={[Dt.Left]:{x:-1,y:0},[Dt.Right]:{x:1,y:0},[Dt.Top]:{x:0,y:-1},[Dt.Bottom]:{x:0,y:1}},YVn=({source:e,sourcePosition:n=Dt.Bottom,target:t})=>n===Dt.Left||n===Dt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function ZVn({source:e,sourcePosition:n=Dt.Bottom,target:t,targetPosition:r=Dt.Top,center:s,offset:i,stepPosition:a}){const o=WM[n],c=WM[r],u={x:e.x+o.x*i,y:e.y+o.y*i},d={x:t.x+c.x*i,y:t.y+c.y*i},_=YVn({source:u,sourcePosition:n,target:d}),p=_.x!==0?"x":"y",m=_[p];let w=[],k,v;const y={x:0,y:0},x={x:0,y:0},[,,b,C]=tG({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*c[p]===-1){p==="x"?(k=s.x??u.x+(d.x-u.x)*a,v=s.y??(u.y+d.y)/2):(k=s.x??(u.x+d.x)/2,v=s.y??u.y+(d.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:d.y}],M=[{x:u.x,y:v},{x:d.x,y:v}];o[p]===m?w=p==="x"?j:M:w=p==="x"?M:j}else{const j=[{x:u.x,y:d.y}],M=[{x:d.x,y:u.y}];if(p==="x"?w=o.x===m?M:j:w=o.y===m?j:M,n===r){const H=Math.abs(e[p]-t[p]);if(H<=i){const Q=Math.min(i-1,i-H);o[p]===m?y[p]=(u[p]>e[p]?-1:1)*Q:x[p]=(d[p]>t[p]?-1:1)*Q}}if(n!==r){const H=p==="x"?"y":"x",Q=o[p]===c[H],K=u[H]>d[H],Z=u[H]=U?(k=(D.x+L.x)/2,v=w[0].y):(k=w[0].x,v=(D.y+L.y)/2)}const N={x:u.x+y.x,y:u.y+y.y},z={x:d.x+x.x,y:d.y+x.y};return[[e,...N.x!==w[0].x||N.y!==w[0].y?[N]:[],...w,...z.x!==w[w.length-1].x||z.y!==w[w.length-1].y?[z]:[],t],k,v,b,C]}function JVn(e,n,t,r){const s=Math.min(QM(e,n)/2,QM(n,t)/2,r),{x:i,y:a}=n;if(e.x===i&&i===t.x||e.y===a&&a===t.y)return`L${i} ${a}`;if(e.y===a){const u=e.xt.id===n):e[0])||null}function Kk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function tKn(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const i=new Set;return e.reduce((a,o)=>([o.markerStart||r,o.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const u=Kk(c,n);i.has(u)||(a.push({id:u,color:c.color||t,...c}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const rG=1e3,nKn=10,o7={nodeOrigin:[0,0],nodeExtent:Sm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},rKn={...o7,checkEquality:!0};function c7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function sKn(e,n,t){const r=c7(o7,t);for(const s of e.values())if(s.parentId)u7(s,e,n,r);else{const i=pg(s,r.nodeOrigin),a=Ff(s.extent)?s.extent:r.nodeExtent,o=Pf(i,a,Yl(s));s.internals.positionAbsolute=o}}function iKn(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const t=[],r=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?t.push(i):s.type==="target"&&r.push(i)}return{source:t,target:r}}function l7(e){return e==="manual"}function Wk(e,n,t,r={}){var d,_;const s=c7(rKn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!l7(s.zIndexMode)?rG:0;let c=e.length>0,u=!1;n.clear(),t.clear();for(const p of e){let m=a.get(p.id);if(s.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const w=pg(p,s.nodeOrigin),k=Ff(p.extent)?p.extent:s.nodeExtent,v=Pf(w,k,Yl(p));m={...s.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(_=p.measured)==null?void 0:_.height},internals:{positionAbsolute:v,handleBounds:iKn(p,m),z:sG(p,o,s.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(c=!1),p.parentId&&u7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function aKn(e,n){if(!e.parentId)return;const t=n.get(e.parentId);t?t.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function u7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=c7(o7,r),u=e.parentId,d=n.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}aKn(e,t),s&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++s.i,d.internals.z=d.internals.z+s.i*nKn),s&&d.internals.rootParentIndex!==void 0&&(s.i=d.internals.rootParentIndex);const _=i&&!l7(c)?rG:0,{x:p,y:m,z:w}=oKn(e,d,a,o,_,c),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||w!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:w}})}function sG(e,n,t){const r=qo(e.zIndex)?e.zIndex:0;return l7(t)?r:r+(e.selected?n:0)}function oKn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=Yl(e),u=pg(e,t),d=Ff(e.extent)?Pf(u,e.extent,c):u;let _=Pf({x:a+d.x,y:o+d.y},r,c);e.extent==="parent"&&(_=UU(_,c,n));const p=sG(e,s,i),m=n.internals.z??0;return{x:_.x,y:_.y,z:m>=p?m+1:p}}function _7(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??Em(c),d=GU(u,o.rect);i.set(o.parentId,{expandedRect:d,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var b;const d=c.internals.positionAbsolute,_=Yl(c),p=c.origin??r,m=o.x0||w>0||y||x)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+y,y:c.position.y-w+x}}),(b=t.get(u))==null||b.forEach(C=>{e.some(N=>N.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+w}})})),(_.width0){const m=_7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function lKn({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:i}){if(!n||!e.x&&!e.y)return!1;const a=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,i]],r);return!!a&&(a.x!==t[0]||a.y!==t[1]||a.k!==t[2])}function JM(e,n,t,r,s,i){let a=s;const o=r.get(a)||new Map;r.set(a,o.set(t,n)),a=`${s}-${e}`;const c=r.get(a)||new Map;if(r.set(a,c.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function iG(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,d=`${i}-${o}--${s}-${a}`;JM("source",c,d,e,s,a),JM("target",c,u,e,i,o),n.set(r.id,r)}}function aG(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:aG(t,n):!1}function eO(e,n,t){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,n))return!0;if(r===t)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function uKn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!aG(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const o=e.get(i);o&&s.set(i,{id:i,position:o.position||{x:0,y:0},distance:{x:t.x-o.internals.positionAbsolute.x,y:t.y-o.internals.positionAbsolute.y},extent:o.extent,parentId:o.parentId,origin:o.origin,expandParent:o.expandParent,internals:{positionAbsolute:o.internals.positionAbsolute||{x:0,y:0}},measured:{width:o.measured.width??0,height:o.measured.height??0}})}return s}function X4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,d]of n){const _=(a=t.get(u))==null?void 0:a.internals.userNode;_&&s.push({..._,position:d.position,dragging:r})}if(!e)return[s[0],s];const i=(o=t.get(e))==null?void 0:o.internals.userNode;return[i?{...i,position:((c=n.get(e))==null?void 0:c.position)||i.position,dragging:r}:s[0],s]}function _Kn({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const i={x:t-s.distance.x,y:r-s.distance.y},a=gg(i,n);return{x:a.x-i.x,y:a.y-i.y}}function fKn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,c=!1,u={x:0,y:0},d=null,_=!1,p=null,m=!1,w=!1,k=null;function v({noDragClassName:x,handleSelector:b,domNode:C,isSelectable:N,nodeId:z,nodeClickDistance:A=0}){p=Na(C);function j({x:B,y:U}){const{nodeLookup:H,nodeExtent:Q,snapGrid:K,snapToGrid:Z,nodeOrigin:ee,onNodeDrag:$,onSelectionDrag:I,onError:F,updateNodePositions:q}=n();i={x:B,y:U};let V=!1;const ie=o.size>1,oe=ie&&Q?Gk(mg(o)):null,ce=ie&&Z?_Kn({dragItems:o,snapGrid:K,x:B,y:U}):null;for(const[ne,G]of o){if(!H.has(ne))continue;let ae={x:B-G.distance.x,y:U-G.distance.y};Z&&(ae=ce?{x:Math.round(ae.x+ce.x),y:Math.round(ae.y+ce.y)}:gg(ae,K));let le=null;if(ie&&Q&&!G.extent&&oe){const{positionAbsolute:Ee}=G.internals,Fe=Ee.x-oe.x+Q[0][0],Ye=Ee.x+G.measured.width-oe.x2+Q[1][0],Me=Ee.y-oe.y+Q[0][1],Ue=Ee.y+G.measured.height-oe.y2+Q[1][1];le=[[Fe,Me],[Ye,Ue]]}const{position:ge,positionAbsolute:be}=qU({nodeId:ne,nextPosition:ae,nodeLookup:H,nodeExtent:le||Q,nodeOrigin:ee,onError:F});V=V||G.position.x!==ge.x||G.position.y!==ge.y,G.position=ge,G.internals.positionAbsolute=be}if(w=w||V,!!V&&(q(o,!0),k&&(r||$||!z&&I))){const[ne,G]=X4({nodeId:z,dragItems:o,nodeLookup:H});r==null||r(k,o,ne,G),$==null||$(k,ne,G),z||I==null||I(k,G)}}async function M(){if(!d)return;const{transform:B,panBy:U,autoPanSpeed:H,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[K,Z]=s7(u,d,H);(K!==0||Z!==0)&&(i.x=(i.x??0)-K/B[2],i.y=(i.y??0)-Z/B[2],await U({x:K,y:Z})&&j(i)),a=requestAnimationFrame(M)}function D(B){var ie;const{nodeLookup:U,multiSelectionActive:H,nodesDraggable:Q,transform:K,snapGrid:Z,snapToGrid:ee,selectNodesOnDrag:$,onNodeDragStart:I,onSelectionDragStart:F,unselectNodesAndEdges:q}=n();_=!0,(!$||!N)&&!H&&z&&((ie=U.get(z))!=null&&ie.selected||q()),N&&$&&z&&(e==null||e(z));const V=U0(B.sourceEvent,{transform:K,snapGrid:Z,snapToGrid:ee,containerBounds:d});if(i=V,o=uKn(U,Q,V,z),o.size>0&&(t||I||!z&&F)){const[oe,ce]=X4({nodeId:z,dragItems:o,nodeLookup:U});t==null||t(B.sourceEvent,o,oe,ce),I==null||I(B.sourceEvent,oe,ce),z||F==null||F(B.sourceEvent,ce)}}const L=wU().clickDistance(A).on("start",B=>{const{domNode:U,nodeDragThreshold:H,transform:Q,snapGrid:K,snapToGrid:Z}=n();d=(U==null?void 0:U.getBoundingClientRect())||null,m=!1,w=!1,k=B.sourceEvent,H===0&&D(B),i=U0(B.sourceEvent,{transform:Q,snapGrid:K,snapToGrid:Z,containerBounds:d}),u=Uo(B.sourceEvent,d)}).on("drag",B=>{const{autoPanOnNodeDrag:U,transform:H,snapGrid:Q,snapToGrid:K,nodeDragThreshold:Z,nodeLookup:ee}=n(),$=U0(B.sourceEvent,{transform:H,snapGrid:Q,snapToGrid:K,containerBounds:d});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||z&&!ee.has(z))&&(m=!0),!m){if(!c&&U&&_&&(c=!0,M()),!_){const I=Uo(B.sourceEvent,d),F=I.x-u.x,q=I.y-u.y;Math.sqrt(F*F+q*q)>Z&&D(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&_&&(u=Uo(B.sourceEvent,d),j($))}}).on("end",B=>{if(!_||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,_=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:U,updateNodePositions:H,onNodeDragStop:Q,onSelectionDragStop:K}=n();if(w&&(H(o,!1),w=!1),s||Q||!z&&K){const[Z,ee]=X4({nodeId:z,dragItems:o,nodeLookup:U,dragging:!1});s==null||s(B.sourceEvent,o,Z,ee),Q==null||Q(B.sourceEvent,Z,ee),z||K==null||K(B.sourceEvent,ee)}}}).filter(B=>{const U=B.target;return!B.button&&(!x||!eO(U,`.${x}`,C))&&(!b||eO(U,b,C))});p.call(L)}function y(){p==null||p.on(".drag",null)}return{update:v,destroy:y}}function dKn(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const i of n.values())Wb(s,Em(i))>0&&r.push(i);return r}const hKn=250;function pKn(e,n,t,r){var o,c;let s=[],i=1/0;const a=dKn(e,t,n+hKn);for(const u of a){const d=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const _ of d){if(r.nodeId===_.nodeId&&r.type===_.type&&r.id===_.id)continue;const{x:p,y:m}=Hf(u,_,_.position,!0),w=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));w>n||(w1){const u=r.type==="source"?"target":"source";return s.find(d=>d.type===u)??s[0]}return s[0]}function oG(e,n,t,r,s,i=!1){var u,d,_;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((d=a.internals.handleBounds)==null?void 0:d.source)??[],...((_=a.internals.handleBounds)==null?void 0:_.target)??[]],c=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return c&&i?{...c,...Hf(a,c,c.position,!0)}:c}function cG(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function mKn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const lG=()=>!0;function gKn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:_,panBy:p,cancelConnection:m,onConnectStart:w,onConnect:k,onConnectEnd:v,isValidConnection:y=lG,onReconnectEnd:x,updateConnection:b,getTransform:C,getFromHandle:N,autoPanSpeed:z,dragThreshold:A=1,handleDomNode:j}){const M=XU(e.target);let D=0,L;const{x:B,y:U}=Uo(e),H=cG(i,j),Q=o==null?void 0:o.getBoundingClientRect();let K=!1;if(!Q||!H)return;const Z=oG(s,H,r,c,n);if(!Z)return;let ee=Uo(e,Q),$=!1,I=null,F=!1,q=null;function V(){if(!d||!Q)return;const[ge,be]=s7(ee,Q,z);p({x:ge,y:be}),D=requestAnimationFrame(V)}const ie={...Z,nodeId:s,type:H,position:Z.position},oe=c.get(s);let ne={inProgress:!0,isValid:null,from:Hf(oe,ie,Dt.Left,!0),fromHandle:ie,fromPosition:ie.position,fromNode:oe,to:ee,toHandle:null,toPosition:HM[ie.position],toNode:null,pointer:ee};function G(){K=!0,b(ne),w==null||w(e,{nodeId:s,handleId:r,handleType:H})}A===0&&G();function ae(ge){if(!K){const{x:Ue,y:dt}=Uo(ge),wt=Ue-B,Ft=dt-U;if(!(wt*wt+Ft*Ft>A*A))return;G()}if(!N()||!ie){le(ge);return}const be=C();ee=Uo(ge,Q),L=pKn(vg(ee,be,!1,[1,1]),t,c,ie),$||(V(),$=!0);const Ee=uG(ge,{handle:L,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:y,doc:M,lib:u,flowId:_,nodeLookup:c});q=Ee.handleDomNode,I=Ee.connection,F=mKn(!!L,Ee.isValid);const Fe=c.get(s),Ye=Fe?Hf(Fe,ie,Dt.Left,!0):ne.from,Me={...ne,from:Ye,isValid:F,to:Ee.toHandle&&F?Jh({x:Ee.toHandle.x,y:Ee.toHandle.y},be):ee,toHandle:Ee.toHandle,toPosition:F&&Ee.toHandle?Ee.toHandle.position:HM[ie.position],toNode:Ee.toHandle?c.get(Ee.toHandle.nodeId):null,pointer:ee};b(Me),ne=Me}function le(ge){if(!("touches"in ge&&ge.touches.length>0)){if(K){(L||q)&&I&&F&&(k==null||k(I));const{inProgress:be,...Ee}=ne,Fe={...Ee,toPosition:ne.toHandle?ne.toPosition:null};v==null||v(ge,Fe),i&&(x==null||x(ge,Fe))}m(),cancelAnimationFrame(D),$=!1,F=!1,I=null,q=null,M.removeEventListener("mousemove",ae),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",ae),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",ae),M.addEventListener("mouseup",le),M.addEventListener("touchmove",ae),M.addEventListener("touchend",le)}function uG(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=lG,nodeLookup:d}){const _=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:w}=Uo(e),k=a.elementFromPoint(m,w),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,y={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const x=cG(void 0,v),b=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),z=v.classList.contains("connectableend");if(!b||!x)return y;const A={source:_?b:r,sourceHandle:_?C:s,target:_?r:b,targetHandle:_?s:C};y.connection=A;const M=N&&z&&(t===Yh.Strict?_&&x==="source"||!_&&x==="target":b!==r||C!==s);y.isValid=M&&u(A),y.toHandle=oG(b,x,C,d,t,!0)}return y}const Qk={onPointerDown:gKn,isValid:uG};function vKn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Na(e);function i({translateExtent:o,width:c,height:u,zoomStep:d=1,pannable:_=!0,zoomable:p=!0,inversePan:m=!1}){const w=b=>{if(b.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=b.sourceEvent.ctrlKey&&Nm()?10:1,z=-b.sourceEvent.deltaY*(b.sourceEvent.deltaMode===1?.05:b.sourceEvent.deltaMode?1:.002)*d,A=C[2]*Math.pow(2,z*N);n.scaleTo(A)};let k=[0,0];const v=b=>{(b.sourceEvent.type==="mousedown"||b.sourceEvent.type==="touchstart")&&(k=[b.sourceEvent.clientX??b.sourceEvent.touches[0].clientX,b.sourceEvent.clientY??b.sourceEvent.touches[0].clientY])},y=b=>{const C=t();if(b.sourceEvent.type!=="mousemove"&&b.sourceEvent.type!=="touchmove"||!n)return;const N=[b.sourceEvent.clientX??b.sourceEvent.touches[0].clientX,b.sourceEvent.clientY??b.sourceEvent.touches[0].clientY],z=[N[0]-k[0],N[1]-k[1]];k=N;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-z[0]*A,y:C[1]-z[1]*A},M=[[0,0],[c,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},x=IU().on("start",v).on("zoom",_?y:null).on("zoom.wheel",p?w:null);s.call(x,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:$o}}const bx=e=>({x:e.x,y:e.y,zoom:e.k}),Y4=({x:e,y:n,zoom:t})=>mx.translate(e,n).scale(t),nh=(e,n)=>e.target.closest(`.${n}`),_G=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),bKn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Z4=(e,n=0,t=bKn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},fG=e=>{const n=e.ctrlKey&&Nm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function yKn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(nh(d,n))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const _=t.property("__zoom").k||1;if(d.ctrlKey&&a){const v=$o(d),y=fG(d),x=_*Math.pow(2,y);r.scaleTo(t,x,v,d);return}const p=d.deltaMode===1?20:1;let m=s===kf.Vertical?0:d.deltaX*p,w=s===kf.Horizontal?0:d.deltaY*p;!Nm()&&d.shiftKey&&s!==kf.Vertical&&(m=d.deltaY*p,w=0),r.translateBy(t,-(m/_)*i,-(w/_)*i,{internal:!0});const k=bx(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(d,k))}}function xKn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=nh(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function wKn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=bx(r.transform);e.mouseButton=((a=r.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((o=r.sourceEvent)==null?void 0:o.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function kKn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&_G(n,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||r([i.transform.x,i.transform.y,i.transform.k]),s&&!((o=i.sourceEvent)!=null&&o.internal)&&(s==null||s(i.sourceEvent,bx(i.transform)))}}function SKn({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:i}){return a=>{var o;if(!((o=a.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,i&&_G(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=bx(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function CKn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:d}){return _=>{var v;const p=e||n,m=t&&_.ctrlKey,w=_.type==="wheel";if(_.button===1&&_.type==="mousedown"&&(nh(_,`${u}-flow__node`)||nh(_,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||d&&!w||nh(_,o)&&w||nh(_,c)&&(!w||s&&w&&!e)||!t&&_.ctrlKey&&w)return!1;if(!t&&_.type==="touchstart"&&((v=_.touches)==null?void 0:v.length)>1)return _.preventDefault(),!1;if(!p&&!s&&!m&&w||!r&&(_.type==="mousedown"||_.type==="touchstart")||Array.isArray(r)&&!r.includes(_.button)&&_.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(_.button)||!_.button||_.button<=1;return(!_.ctrlKey||w)&&k}}function EKn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),_=IU().scaleExtent([n,t]).translateExtent(r),p=Na(e).call(_);x({x:s.x,y:s.y,zoom:Zh(s.zoom,n,t)},[[0,0],[d.width,d.height]],r);const m=p.on("wheel.zoom"),w=p.on("dblclick.zoom");_.wheelDelta(fG);async function k(L,B){return p?new Promise(U=>{_==null||_.interpolate((B==null?void 0:B.interpolate)==="linear"?q0:Dv).transform(Z4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>U(!0)),L)}):!1}function v({noWheelClassName:L,noPanClassName:B,onPaneContextMenu:U,userSelectionActive:H,panOnScroll:Q,panOnDrag:K,panOnScrollMode:Z,panOnScrollSpeed:ee,preventScrolling:$,zoomOnPinch:I,zoomOnScroll:F,zoomOnDoubleClick:q,zoomActivationKeyPressed:V,lib:ie,onTransformChange:oe,connectionInProgress:ce,paneClickDistance:ne,selectionOnDrag:G}){H&&!u.isZoomingOrPanning&&y();const ae=Q&&!V&&!H;_.clickDistance(G?1/0:!qo(ne)||ne<0?0:ne);const le=ae?yKn({zoomPanValues:u,noWheelClassName:L,d3Selection:p,d3Zoom:_,panOnScrollMode:Z,panOnScrollSpeed:ee,zoomOnPinch:I,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):xKn({noWheelClassName:L,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const ge=wKn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});_.on("start",ge);const be=kKn({zoomPanValues:u,panOnDrag:K,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:oe});_.on("zoom",be);const Ee=SKn({zoomPanValues:u,panOnDrag:K,panOnScroll:Q,onPaneContextMenu:U,onPanZoomEnd:o,onDraggingChange:c});_.on("end",Ee);const Fe=CKn({zoomActivationKeyPressed:V,panOnDrag:K,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:q,zoomOnPinch:I,userSelectionActive:H,noPanClassName:B,noWheelClassName:L,lib:ie,connectionInProgress:ce});_.filter(Fe),q?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function y(){_.on("zoom",null)}async function x(L,B,U){const H=Y4(L),Q=_==null?void 0:_.constrain()(H,B,U);return Q&&await k(Q),Q}async function b(L,B){const U=Y4(L);return await k(U,B),U}function C(L){if(p){const B=Y4(L),U=p.property("__zoom");(U.k!==L.zoom||U.x!==L.x||U.y!==L.y)&&(_==null||_.transform(p,B,null,{sync:!0}))}}function N(){const L=p?LU(p.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}async function z(L,B){return p?new Promise(U=>{_==null||_.interpolate((B==null?void 0:B.interpolate)==="linear"?q0:Dv).scaleTo(Z4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>U(!0)),L)}):!1}async function A(L,B){return p?new Promise(U=>{_==null||_.interpolate((B==null?void 0:B.interpolate)==="linear"?q0:Dv).scaleBy(Z4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>U(!0)),L)}):!1}function j(L){_==null||_.scaleExtent(L)}function M(L){_==null||_.translateExtent(L)}function D(L){const B=!qo(L)||L<0?0:L;_==null||_.clickDistance(B)}return{update:v,destroy:y,setViewport:b,setViewportConstrained:x,getViewport:N,scaleTo:z,scaleBy:A,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var ep;(function(e){e.Line="line",e.Handle="handle"})(ep||(ep={}));function NKn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,c=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(c[0]=c[0]*-1),o&&i&&(c[1]=c[1]*-1),c}function tO(e){const n=e.includes("right")||e.includes("left"),t=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:n,isVertical:t,affectsX:r,affectsY:s}}function Ru(e,n){return Math.max(0,n-e)}function Mu(e,n){return Math.max(0,e-n)}function ov(e,n,t){return Math.max(0,n-e,e-t)}function nO(e,n){return e?!n:n}function zKn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:d,isVertical:_}=n,p=d&&_,{xSnapped:m,ySnapped:w}=t,{minWidth:k,maxWidth:v,minHeight:y,maxHeight:x}=r,{x:b,y:C,width:N,height:z,aspectRatio:A}=e;let j=Math.floor(d?m-e.pointerX:0),M=Math.floor(_?w-e.pointerY:0);const D=N+(c?-j:j),L=z+(u?-M:M),B=-i[0]*N,U=-i[1]*z;let H=ov(D,k,v),Q=ov(L,y,x);if(a){let ee=0,$=0;c&&j<0?ee=Ru(b+j+B,a[0][0]):!c&&j>0&&(ee=Mu(b+D+B,a[1][0])),u&&M<0?$=Ru(C+M+U,a[0][1]):!u&&M>0&&($=Mu(C+L+U,a[1][1])),H=Math.max(H,ee),Q=Math.max(Q,$)}if(o){let ee=0,$=0;c&&j>0?ee=Mu(b+j,o[0][0]):!c&&j<0&&(ee=Ru(b+D,o[1][0])),u&&M>0?$=Mu(C+M,o[0][1]):!u&&M<0&&($=Ru(C+L,o[1][1])),H=Math.max(H,ee),Q=Math.max(Q,$)}if(s){if(d){const ee=ov(D/A,y,x)*A;if(H=Math.max(H,ee),a){let $=0;!c&&!u||c&&!u&&p?$=Mu(C+U+D/A,a[1][1])*A:$=Ru(C+U+(c?j:-j)/A,a[0][1])*A,H=Math.max(H,$)}if(o){let $=0;!c&&!u||c&&!u&&p?$=Ru(C+D/A,o[1][1])*A:$=Mu(C+(c?j:-j)/A,o[0][1])*A,H=Math.max(H,$)}}if(_){const ee=ov(L*A,k,v)/A;if(Q=Math.max(Q,ee),a){let $=0;!c&&!u||u&&!c&&p?$=Mu(b+L*A+B,a[1][0])/A:$=Ru(b+(u?M:-M)*A+B,a[0][0])/A,Q=Math.max(Q,$)}if(o){let $=0;!c&&!u||u&&!c&&p?$=Ru(b+L*A,o[1][0])/A:$=Mu(b+(u?M:-M)*A,o[0][0])/A,Q=Math.max(Q,$)}}}M=M+(M<0?Q:-Q),j=j+(j<0?H:-H),s&&(p?D>L*A?M=(nO(c,u)?-j:j)/A:j=(nO(c,u)?-M:M)*A:d?(M=j/A,u=c):(j=M*A,c=u));const K=c?b+j:b,Z=u?C+M:C;return{width:N+(c?-j:j),height:z+(u?-M:M),x:i[0]*j*(c?-1:1)+K,y:i[1]*M*(u?-1:1)+Z}}const dG={width:0,height:0,x:0,y:0},jKn={...dG,pointerX:0,pointerY:0,aspectRatio:1};function AKn(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,o=t[0]*i,c=t[1]*a;return[[r-o,s-c],[r+i-o,s+a-c]]}function TKn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Na(e);let a={controlDirection:tO("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:u,boundaries:d,keepAspectRatio:_,resizeDirection:p,onResizeStart:m,onResize:w,onResizeEnd:k,shouldResize:v}){let y={...dG},x={...jKn};a={boundaries:d,resizeDirection:p,keepAspectRatio:_,controlDirection:tO(u)};let b,C=null,N=[],z,A,j,M=!1;const D=wU().on("start",L=>{const{nodeLookup:B,transform:U,snapGrid:H,snapToGrid:Q,nodeOrigin:K,paneDomNode:Z}=t();if(b=B.get(n),!b)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:ee,ySnapped:$}=U0(L.sourceEvent,{transform:U,snapGrid:H,snapToGrid:Q,containerBounds:C});y={width:b.measured.width??0,height:b.measured.height??0,x:b.position.x??0,y:b.position.y??0},x={...y,pointerX:ee,pointerY:$,aspectRatio:y.width/y.height},z=void 0,A=Ff(b.extent)?b.extent:void 0,b.parentId&&(b.extent==="parent"||b.expandParent)&&(z=B.get(b.parentId)),z&&b.extent==="parent"&&(A=[[0,0],[z.measured.width,z.measured.height]]),N=[],j=void 0;for(const[I,F]of B)if(F.parentId===n&&(N.push({id:I,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const q=AKn(F,b,F.origin??K);j?j=[[Math.min(q[0][0],j[0][0]),Math.min(q[0][1],j[0][1])],[Math.max(q[1][0],j[1][0]),Math.max(q[1][1],j[1][1])]]:j=q}m==null||m(L,{...y})}).on("drag",L=>{const{transform:B,snapGrid:U,snapToGrid:H,nodeOrigin:Q}=t(),K=U0(L.sourceEvent,{transform:B,snapGrid:U,snapToGrid:H,containerBounds:C}),Z=[];if(!b)return;const{x:ee,y:$,width:I,height:F}=y,q={},V=b.origin??Q,{width:ie,height:oe,x:ce,y:ne}=zKn(x,a.controlDirection,K,a.boundaries,a.keepAspectRatio,V,A,j),G=ie!==I,ae=oe!==F,le=ce!==ee&&G,ge=ne!==$&&ae;if(!le&&!ge&&!G&&!ae)return;if((le||ge||V[0]===1||V[1]===1)&&(q.x=le?ce:y.x,q.y=ge?ne:y.y,y.x=q.x,y.y=q.y,N.length>0)){const Ye=ce-ee,Me=ne-$;for(const Ue of N)Ue.position={x:Ue.position.x-Ye+V[0]*(ie-I),y:Ue.position.y-Me+V[1]*(oe-F)},Z.push(Ue)}if((G||ae)&&(q.width=G&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ie:y.width,q.height=ae&&(!a.resizeDirection||a.resizeDirection==="vertical")?oe:y.height,y.width=q.width,y.height=q.height),z&&b.expandParent){const Ye=V[0]*(q.width??0);q.x&&q.x{M&&(k==null||k(L,{...y}),s==null||s({...y}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const RKn={},rO=e=>{let n;const t=new Set,r=(d,_)=>{const p=typeof d=="function"?d(n):d;if(!Object.is(p,n)){const m=n;n=_??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(w=>w(n,m))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>u,subscribe:d=>(t.add(d),()=>t.delete(d)),destroy:()=>{(RKn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},u=n=e(r,s,c);return c},MKn=e=>e?rO(e):rO,{useDebugValue:OKn}=rt,{useSyncExternalStoreWithSelector:DKn}=TQ,LKn=e=>e;function hG(e,n=LKn,t){const r=DKn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return OKn(r),r}const sO=(e,n)=>{const t=MKn(e),r=(s,i=n)=>hG(t,s,i);return Object.assign(r,t),r},IKn=(e,n)=>e?sO(e,n):sO;function Mr(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[r,s]of e)if(!Object.is(s,n.get(r)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(n).length)return!1;for(const r of t)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(e[r],n[r]))return!1;return!0}const yx=T.createContext(null),$Kn=yx.Provider,pG=Wo.error001("react");function $n(e,n){const t=T.useContext(yx);if(t===null)throw new Error(pG);return hG(t,e,n)}function Dr(){const e=T.useContext(yx);if(e===null)throw new Error(pG);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const iO={display:"none"},BKn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},mG="react-flow__node-desc",gG="react-flow__edge-desc",PKn="react-flow__aria-live",FKn=e=>e.ariaLiveMessage,HKn=e=>e.ariaLabelConfig;function qKn({rfId:e}){const n=$n(FKn);return f.jsx("div",{id:`${PKn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:BKn,children:n})}function UKn({rfId:e,disableKeyboardA11y:n}){const t=$n(HKn);return f.jsxs(f.Fragment,{children:[f.jsx("div",{id:`${mG}-${e}`,style:iO,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),f.jsx("div",{id:`${gG}-${e}`,style:iO,children:t["edge.a11yDescription.default"]}),!n&&f.jsx(qKn,{rfId:e})]})}const xx=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return f.jsx("div",{className:Cs(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});xx.displayName="Panel";const aO="https://reactflow.dev?utm_source=attribution";function GKn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:f.jsx(xx,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${aO}`,children:f.jsx("a",{href:aO,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const VKn=e=>{const n=[],t=[];for(const[,r]of e.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&t.push(r);return{selectedNodes:n,selectedEdges:t}},cv=e=>e.id;function KKn(e,n){return Mr(e.selectedNodes.map(cv),n.selectedNodes.map(cv))&&Mr(e.selectedEdges.map(cv),n.selectedEdges.map(cv))}function WKn({onSelectionChange:e}){const n=Dr(),{selectedNodes:t,selectedEdges:r}=$n(VKn,KKn);return T.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const QKn=e=>!!e.onSelectionChangeHandlers;function XKn({onSelectionChange:e}){const n=$n(QKn);return e||n?f.jsx(WKn,{onSelectionChange:e}):null}const vG=[0,0],YKn={x:0,y:0,zoom:1},ZKn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],oO=[...ZKn,"rfId"],JKn=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),cO={translateExtent:Sm,nodeOrigin:vG,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function eWn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=$n(JKn,Mr),u=Dr();T.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=cO,o()}),[]);const d=T.useRef(cO);return T.useEffect(()=>{for(const _ of oO){const p=e[_],m=d.current[_];p!==m&&(typeof e[_]>"u"||(_==="nodes"?n(p):_==="edges"?t(p):_==="minZoom"?r(p):_==="maxZoom"?s(p):_==="translateExtent"?i(p):_==="nodeExtent"?a(p):_==="ariaLabelConfig"?u.setState({ariaLabelConfig:UVn(p)}):_==="fitView"?u.setState({fitViewQueued:p}):_==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[_]:p})))}d.current=e},oO.map(_=>e[_])),null}function lO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function tWn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=lO(),i=()=>t(s!=null&&s.matches?"dark":"light");return i(),s==null||s.addEventListener("change",i),()=>{s==null||s.removeEventListener("change",i)}},[e]),n!==null?n:(r=lO())!=null&&r.matches?"dark":"light"}const uO=typeof document<"u"?document:null;function zm(e=null,n={target:uO,actInsideInputWithModifier:!0}){const[t,r]=T.useState(!1),s=T.useRef(!1),i=T.useRef(new Set([])),[a,o]=T.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(_=>typeof _=="string").map(_=>_.replace("+",` +`),conflict:null}},Cl=e=>e.draft!==e.baseline,VHn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),KHn=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function WHn(e,n,t){return!Cl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class QHn{constructor(){li(this,"buffer",null);li(this,"listeners",new Set);li(this,"saving",!1);li(this,"saveError",null);li(this,"revision",0);li(this,"saveRevision",0);li(this,"getSnapshot",()=>this.buffer);li(this,"getRevision",()=>this.revision);li(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));li(this,"set",n=>{this.buffer=n,this.notify()});li(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});li(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});li(this,"setSaveError",n=>{this.saveError=n,this.notify()})}notify(){this.revision++;for(const n of this.listeners)n()}get needsProtection(){return this.saving||this.buffer!==null&&(Cl(this.buffer)||this.buffer.conflict!==null)}}function XHn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Z,ee,$;const c=dt({...Z8n(),enabled:r,subscribed:r}),u=((Z=c.data)==null?void 0:Z.engine)??(c.isPending?void 0:null),d=((ee=c.data)==null?void 0:ee.hint)??null,f=(($=c.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[w,k]=T.useState(null),[v,y]=T.useState(null),[x,b]=T.useState(!1),[C,N]=T.useState(null),[z,A]=T.useState(null),[j,M]=T.useState(!1),[D,L]=T.useState(0),B=T.useCallback(I=>{M(I),I&&L(F=>F+1)},[]),U=T.useRef(o);U.current=o;const H=T.useRef(!1),Q=T.useRef(null),K=T.useCallback(()=>{if(H.current)return;Q.current=n,H.current=!0,m(!0);const I=U.current;A(null),y(null),N(null),t4n(e,n,{sessionId:t}).then(F=>{var V,ie;const q=F.pdfPath;if(F.ok&&q){k(oe=>({path:q,version:((oe==null?void 0:oe.version)??0)+1,source:I})),b(F.hadErrors),N(F.note),F.hadErrors&&y(((V=F.log)==null?void 0:V.trim())||null),B(!0);return}k(null),b(!1),N(F.note),M(!1),y(((ie=F.log)==null?void 0:ie.trim())||yJe())}).catch(F=>{k(null),b(!1),N(null),M(!1),A(F instanceof Error?F.message:String(F))}).finally(()=>{H.current=!1,m(!1)})},[e,n,t,B]);return T.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&K()},[r,s,a,u,n,K]),{engine:u,installHint:d,installCommand:f,compiling:p,compiled:w,stale:w!==null&&w.source!==o,log:v,builtWithErrors:x,note:C,error:z,showPdf:j,setShowPdf:B,viewNonce:D,compile:()=>{i==null||i(),K()},dismiss:()=>{A(null),y(null)}}}const YHn=3e4,ZHn=3e4,JHn=5*6e4;function eqn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var ce,ne,G,ae;const u=T.useMemo(()=>e9n(e,n,{sessionId:t}),[e,n,t]),d=dt({...u,enabled:r,subscribed:r}),f=((ce=d.data)==null?void 0:ce.hasToken)??!1,p=((ne=d.data)==null?void 0:ne.hasSession)??!1,m=((G=d.data)==null?void 0:G.link)??null,w=!d.isPending,[k,v]=T.useState(null),[y,x]=T.useState(0),[b,C]=T.useState(!1),[N,z]=T.useState(null),[A,j]=T.useState(null),[M,D]=T.useState(!1),L=T.useCallback(le=>{Gn(u.queryKey)&&Ze.setQueryData(u.queryKey,me=>me&&{...me,hasSession:le})},[u]),B=T.useCallback(le=>{Gn(u.queryKey)&&Ze.setQueryData(u.queryKey,le)},[u]);T.useEffect(()=>{z(null),x(0),I.current=!1,j(null),D(!1),K.current=!1},[r,e,n,t]),T.useEffect(()=>{D(!1)},[a]);const U=T.useRef(!1),H=T.useRef(c);H.current=c;const Q=T.useRef(o);Q.current=o;const K=T.useRef(!1),Z=T.useCallback(le=>!f||!m||U.current||Q.current?!1:(U.current=!0,C(!0),j(null),_4n(e,n,{sessionId:t,resolve:le}).then(me=>{K.current=!1,z(me),me.pulled.includes(n)&&(Q.current?D(!0):H.current(me.pulled))}).catch(me=>{K.current=!0,z(null),j(me instanceof Error?me.message:String(me))}).finally(()=>{U.current=!1,C(!1)}),!0),[e,n,t,f,m]),ee=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const le=`${n}:${m.projectId}:${a}`;ee.current!==le&&Z()&&(ee.current=le)},[r,s,w,f,m,n,a,o,b,Z,$]);const I=T.useRef(!1);!b&&N&&N.conflicts.length===0&&!A&&(I.current=!0);const F=r&&w&&!!m&&f&&p&&I.current,q=T.useRef(null),V=T.useRef(Promise.resolve()),ie=T.useRef(!1);ie.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const oe=T.useRef(!1);return T.useEffect(()=>{if(!F)return;let le=!1;const me=()=>{const Ee=oe.current;oe.current=!1,!(!Ee&&ie.current)&&(V.current=V.current.then(()=>{if(!le)return a4n(e,n,{sessionId:t,retry:Ee}).then(Fe=>{var We;le||((q.current===null||((We=Fe.status)==null?void 0:We.state)==="stopped")&&v(Fe.status),q.current=Fe.key)}).catch(Fe=>{le||v({state:"stopped",error:Fe instanceof Error?Fe.message:String(Fe),needsSession:!1,note:null})})}))};me();const ve=setInterval(me,ZHn);return()=>{le=!0,clearInterval(ve),q.current=null,v(null),V.current=V.current.then(()=>o4n(e,n,{sessionId:t})).catch(()=>{})}},[F,y,e,n,t]),T.useEffect(()=>z5n(le=>{if(le.key===q.current){if(le.type==="live"){v(le.status);return}le.paths.includes(n)&&(Q.current?D(!0):H.current(le.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const le=setInterval(()=>{U.current||K.current||Ze.fetchQuery({...t9n(e,n,{sessionId:t}),staleTime:0}).then(me=>{me.remoteChanged&&Z()}).catch(me=>{K.current=!0,j(me instanceof Error?me.message:String(me))})},YHn);return()=>clearInterval(le)},[r,s,w,f,m,o,e,n,t,Z,$]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||!$)return;const le=setInterval(Z,JHn);return()=>clearInterval(le)},[r,s,w,f,m,$,Z]),{hasToken:f,hasSession:p,live:k,retryLive:()=>{oe.current=!0,x(le=>le+1)},link:m,loaded:w,syncing:b,last:N,error:A??((ae=d.error)==null?void 0:ae.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:d4n(e,n,{sessionId:t}),saveToken:async le=>{const me=await TI(le);ee.current=null,K.current=!1,j(null),Gn(u.queryKey)&&Ze.setQueryData(u.queryKey,ve=>ve&&{...ve,hasToken:me.hasToken})},saveSession:async le=>{const me=await RI(le,{host:m==null?void 0:m.host});L(me.hasSession),oe.current=!0,x(ve=>ve+1)},importSession:async()=>{const le=await i4n({host:m==null?void 0:m.host});return L(le.hasSession),oe.current=!0,x(me=>me+1),le.source},linkProject:async le=>{z(null),v(null),I.current=!1,ee.current=null,B(await l4n(e,n,{project:le,sessionId:t})),i==null||i()},unlink:async()=>{B(await u4n(e,n,{sessionId:t})),ee.current=null,K.current=!1,z(null),j(null)},sync:le=>{K.current=!1,Z(le)&&(ee.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const yM=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],tqn=4e6,nqn=200,xM=16e6,rqn=e=>new Promise(n=>{const t=new FileReader;t.onload=()=>n(typeof t.result=="string"?t.result:null),t.onerror=()=>n(null),t.readAsDataURL(e)}),wM=e=>e.startsWith("//")?`https:${e}`:e;async function sqn(e,n){var s;let t=tqn;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:c}of e){if(r.has(o)){const w=r.get(o);w&&i.setAttribute(a,w);continue}if(n.aborted)return;if(r.size>=nqn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const d=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!c.some(w=>d.startsWith(w))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await rqn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function iqn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(yM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:d}of yM){if(!o.matches(c))continue;const f=o.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?o.setAttribute(u,wM(f)):s.push({element:o,attribute:u,url:p,typePrefixes:d}))}await sqn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!hC(c)||(o.setAttribute("href",wM(c)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const i=((a=r.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(i)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function aqn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${xM-1}`}}).catch(()=>null),i=s!=null&&s.ok?await s.text().catch(()=>null):null;if(i===null)return{text:e,partial:!0};const a=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:i,partial:Number.isFinite(a)&&a>xM}}function oqn({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=T.useState(null);return T.useEffect(()=>{let o=!1;const c=new AbortController;return a(null),aqn(e,n,t,c.signal).then(async({text:u,partial:d})=>({source:await iqn(u,s,c.signal),partial:d})).then(u=>{o||a(u)}),()=>{o=!0,c.abort()}},[e,n,t,s]),i===null?_.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[_.jsx(Et,{})," ",vL()]}):_.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:ZHe()}),_.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:iqe({name:Ae(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function cqn({overleaf:e}){var f;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=ra(n),i=T.useId(),[a,o]=T.useState({top:0,left:0,maxHeight:0}),c=((f=e.last)==null?void 0:f.conflicts.length)??0,u=e.hasToken&&!!e.error,d=u?U3():c?L1t():!e.hasToken||!e.link?Yxt():e.syncing?LL():e.blocked?DL():RL();return T.useEffect(()=>{c&&r(!0)},[c,r]),T.useEffect(()=>{u&&sn(U3(),"error",{id:i,duration:5e3})},[u,e.error,i]),T.useLayoutEffect(()=>{if(!t||!n.current||!s.current)return;const p=n.current.getBoundingClientRect(),m=Math.min(384,window.innerWidth-16),w=Math.min(p.bottom+6,window.innerHeight-80);o({top:w,left:Math.max(8,Math.min(p.right-m,window.innerWidth-m-8)),maxHeight:window.innerHeight-w-8}),(s.current.querySelector("input")??s.current).focus();const k=()=>r(!1),v=y=>{var x;y.target instanceof Node&&!((x=s.current)!=null&&x.contains(y.target))&&k()};return window.addEventListener("resize",k),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",v,!0)}},[t,s,r]),_.jsxs(_.Fragment,{children:[_.jsx(Rt,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":d,"data-tip-align":"end","aria-label":gJ({status:d}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?_.jsx(Et,{}):_.jsx(h6n,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&ni.createPortal(_.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":nI(),tabIndex:-1,className:"fixed z-100 w-96 max-w-[calc(100vw-1rem)] overflow-auto rounded-lg border border-border bg-background p-4 text-text shadow-popover",style:a,onBlur:p=>{var m;p.relatedTarget instanceof Node&&!p.currentTarget.contains(p.relatedTarget)&&!((m=n.current)!=null&&m.contains(p.relatedTarget))&&r(!1)},children:[_.jsx("div",{className:"absolute end-3 top-3",children:_.jsx(Rt,{size:"small","aria-label":bHe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:_.jsx(_r,{size:13})})}),_.jsx(dqn,{overleaf:e})]}),document.body)]})}const ev=e=>Ml(new Intl.ListFormat(E()).format(e.map(Ae)));function lqn(e){if(e.error)return wvt();if(e.syncing)return LL();if(e.blocked)return DL();const n=e.last;return n?n.pulled.length&&n.pushed.length?uxt({pulled:ev(n.pulled),pushed:ev(n.pushed)}):n.pulled.length?rxt({paths:ev(n.pulled)}):n.pushed.length?gxt({paths:ev(n.pushed)}):n.conflicts.length?kbt():RL():qyt()}function uqn({href:e}){return _.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:OL()})}function _qn(e){return e.state==="live"?qvt():e.state==="connecting"?Lvt():e.error??rbt()}function kM({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),d=p=>{s||(i(!0),u(null),p().then(()=>o(!1)).catch(m=>{u(m instanceof Error?m.message:String(m)),o(!0)}).finally(()=>i(!1)))},f=a?u2t():n?Sxt():nvt();return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("p",{className:"text-sm text-subtext",children:f}),a&&_.jsx(qr,{className:"basis-full min-w-0","aria-label":q3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:q3(),autoComplete:"off"}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&_.jsx(Et,{}),a?_.jsx(Me,{type:"button",disabled:s||!t.trim(),onClick:()=>d(()=>e.saveSession(t.trim())),children:s?Ba():j1t()}):_.jsx(Me,{type:"button",disabled:s,onClick:()=>d(e.importSession),children:lvt()}),_.jsx(Me,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?ML():Xyt()})]}),c&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function fqn({overleaf:e}){if(!e.hasSession)return _.jsx(kM,{overleaf:e});const n=e.live;if(!n)return _.jsx("p",{className:"text-sm text-subtext",children:ubt()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[_.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),_.jsx("span",{className:"min-w-0 break-words",children:_qn(n)})]}),n.note&&_.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&_.jsx("div",{children:_.jsx(Me,{onClick:e.retryLive,children:Xvt()})}),t&&_.jsx(kM,{overleaf:e,replacing:!0})]})}function dqn({overleaf:e}){var p,m,w;const[n,t]=T.useState(""),[r,s]=T.useState(!1),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=()=>{t(""),a(null),c(!0)},d=!e.hasToken||o;async function f(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{d?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(y){a(y instanceof Error?y.message:String(y))}finally{s(!1)}}}if(e.link&&!d){const k=((p=e.last)==null?void 0:p.conflicts)??[];return _.jsxs("div",{className:"flex flex-col gap-3",children:[_.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[_.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&_.jsx(Et,{}),e.error?U3():lqn(e)]}),e.error&&_.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),_.jsx(fqn,{overleaf:e}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_.jsx(Me,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?Txt():((m=e.live)==null?void 0:m.state)==="live"?k2t():void 0,onClick:()=>e.sync(),children:e.error?Ks():myt()}),_.jsxs($h,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[ryt()," ",_.jsx(Rf,{size:12})]})]}),k.map(v=>_.jsxs("div",{className:"space-y-2 text-sm",children:[_.jsxs("p",{className:"break-words text-accent-red",children:[_.jsx("code",{className:"font-mono",children:v})," ",qbt()]}),_.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.jsx(Me,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Xbt()}),_.jsx(Me,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:Lyt()})]})]},v)),((w=e.last)==null?void 0:w.note)&&_.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),_.jsxs("details",{className:"border-t border-border pt-3",children:[_.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:_.jsx("span",{className:"ms-2",children:$S()})}),_.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[_.jsx(Me,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:Pz()}),_.jsx($h,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:OL()}),_.jsx(Me,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:kyt()})]})]})]})}return _.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[_.jsx("div",{className:"pe-8 text-sm text-subtext",children:d?L2t():q2t()}),_.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[_.jsx(qr,{className:"basis-full min-w-0","aria-label":d?$z():Bz(),"aria-invalid":!!i,type:d?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:d?$z():"https://www.overleaf.com/project/…",autoComplete:"off"}),_.jsx(Me,{type:"submit",disabled:r||!n.trim(),children:r?d?Ba():Da():d?Uxt():jvt()}),_.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:d?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:d?q1t():Bz()})]}),(i||e.error)&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),_.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[_.jsx(uqn,{href:e.uploadUrl}),o?_.jsx(Me,{variant:"ghost",type:"button",onClick:()=>c(!1),children:ML()}):e.hasToken&&_.jsx(Me,{variant:"ghost",type:"button",onClick:u,children:Pz()})]})]})}function hqn({command:e}){const[n,t]=T.useState("idle"),r=T.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const i=r.current;if(i){const a=document.createRange();a.selectNodeContents(i);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(a)}t("select"),setTimeout(()=>t("idle"),4e3)}};return _.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[_.jsx("code",{ref:r,className:"font-mono text-xs text-text bg-panel border border-border-variant rounded-xs py-1 px-2",children:e}),_.jsx(Rt,{"data-tip":n==="copied"?Cf():n==="select"?$Ge():dFe(),"aria-label":MFe(),onClick:()=>void s(),children:n==="copied"?_.jsx(ti,{size:13}):_.jsx(Wf,{size:13})})]})}function SM(e){const[n,t]=T.useState(!1),[r,s]=T.useState(null);return{busy:n,error:r,trigger:async()=>{t(!0),s(null);try{await e()}catch(a){s(a instanceof Error?a.message:String(a))}finally{t(!1)}}}}function pqn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:d,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:w=[],bufferSession:k,remote:v=!1,restored:y=!1,onRestoreActivated:x,showSource:b=!1,onShowSourceChange:C}){var Vr,vr;const N=HB(e,n,t??"repo",r,s),z=dt({...N,enabled:!k.saving}),A=z.data??null,j=((Vr=z.error)==null?void 0:Vr.message)??null,M=Qe=>{ts(N.queryKey,mt=>(typeof Qe=="function"?Qe(mt??null):Qe)??void 0)},[D,L]=T.useState(0),B=t==="artifacts",U=t==="abs",H=VC(n),Q=Bq(n),K=dHn(n),Z=H||K,[ee,$]=T.useState(!1),I=!y||ee,F=()=>{$(!0),x==null||x()};T.useSyncExternalStore(k.subscribe,k.getRevision);const q=k.getSnapshot(),V=k.set,ie=k.saving,oe=k.setSaving,ce=k.saveRevision,ne=k.saveError,G=k.setSaveError,ae=T.useRef(null),le=T.useRef(null),[me,ve]=T.useState(!1),[Ee,Fe]=T.useState(null),We=T.useRef(c),Oe=(A==null?void 0:A.file)??null,He=q&&Cl(q)?q.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,ht=He.split("/").slice(0,-1).join("/"),xt=(A==null?void 0:A.source)==="artifact",Kt=T.useCallback(Qe=>{var mt;return((mt=Q5(ht,Qe,U))==null?void 0:mt.path)??null},[U,ht]),Ut=T.useCallback(Qe=>U?jI(Qe):xt?zf(e,Qe):J3(e,Qe,{sessionId:r,ref:s}),[xt,s,U,e,r]),Ht=T.useCallback(Qe=>{if(hC(Qe))return Qe;const mt=Q5(ht,Qe,U);return mt?IRn(Ut(mt.path),mt):null},[U,ht,Ut]),$e=Vq(Oe==null?void 0:Oe.presentation),ot=(A==null?void 0:A.source)==="artifact"&&!B,ct=B&&(A==null?void 0:A.source)==="checkout",ye=!s&&(A==null?void 0:A.source)==="checkout"&&Oe!=null&&!Oe.notFound,Be=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",Ke=ye&&Oe!=null&&!Oe.binary&&!Oe.truncated&&!$e&&!Be,Ce=Ke&&Oe.version===void 0,Ye=q!==null&&Cl(q),lt=!Ce&&(Ke&&typeof Oe.version=="string"||Ye),je=(q==null?void 0:q.draft)??Lk((Oe==null?void 0:Oe.content)??""),Gt=(q==null?void 0:q.baseline)??Lk((Oe==null?void 0:Oe.content)??""),Mt=lt&&q!==null&&Cl(q),Jt=q!==null&&!Ye&&typeof(Oe==null?void 0:Oe.version)=="string"&&q.version!==Oe.version,rn=z.isFetching||Jt?void 0:d,nn=async Qe=>{const mt=k.getSnapshot();if(!lt||!mt||!Cl(mt))return!0;if(k.saving)return!1;if(mt.conflict&&Qe===void 0)return G(mt.conflict.exists?iz():cz()),!1;const mn=mt.draft,xn=KHn(mt);oe(!0),G(null);try{await Ze.cancelQueries(N);const Rn=await Ywn(e,He,xn,{sessionId:r,expectedVersion:Qe??mt.version});return k.getSnapshot()?(k.saved(mn,Rn.version),M(ir=>ir&&ir.source==="checkout"?{source:"checkout",file:{...ir.file,content:xn,version:Rn.version}}:ir),!0):!1}catch(Rn){if(Rn instanceof Y3){const fr=k.getSnapshot();return!fr||!Cl(fr)||V({...fr,conflict:{currentVersion:Rn.currentVersion,exists:Rn.exists}}),!1}return G(Rn instanceof Error?Rn.message:String(Rn)),!1}finally{oe(!1)}},Nt=Q&&ye&&!Be,wt=XHn({projectId:e,filePath:He,sessionId:r,enabled:Nt,autoRun:I,onManualAction:F,ready:Oe!=null&&!Oe.notFound,source:lt?je:(Oe==null?void 0:Oe.content)??""}),Bn=eqn({projectId:e,filePath:He,sessionId:r,enabled:Nt,autoRun:I,onManualAction:F,savedSource:Gt,dirty:Mt,onPulled:T.useCallback(Qe=>{Qe.includes(He)&&L(mt=>mt+1)},[He])}),gr=Q&&wt.showPdf&&wt.compiled!=null,Gr=Ce&&Ye,en=(lt||Gr)&&!(Z&&!b)&&!gr,Vn=Oe!==null&&!Oe.notFound&&!Oe.binary&&!$e&&!gr,ls=Vn&&!en&&(!K||b),_t=async()=>{if(Oe)try{if(Oe.truncated&&!en){const Qe=fetch(Ut(He)).then(async mt=>{if(!mt.ok)throw new Error;return new Blob([await mt.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":Qe})])}else await navigator.clipboard.writeText(en?je:Oe.content);ve(!0),window.setTimeout(()=>ve(!1),1500)}catch{sn(EFe(),"error")}},fn=Qe=>{if(!Qe.metaKey&&!Qe.ctrlKey||Qe.altKey||Qe.shiftKey||Qe.key.toLowerCase()!=="a"||!(Qe.target instanceof Node)||!Qe.currentTarget.contains(Qe.target))return;const mt=le.current;if(!mt)return;Qe.preventDefault();const mn=document.createRange();mn.selectNodeContents(mt);const xn=window.getSelection();xn==null||xn.removeAllRanges(),xn==null||xn.addRange(mn)},yn=wt.compiled?`${J3(e,wt.compiled.path,{sessionId:r})}&v=${wt.compiled.version}`:null,Tn=yn?`${yn}&view=${wt.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,Kn=wt.compiled?wt.compiled.path.split("/").pop()??wt.compiled.path:null,dn=async()=>{Mt&&!await nn()||Q&&wt.engine&&wt.compile()},Dn=async()=>{Mt&&(I?await dn():await nn())},Wn=SM(()=>Jwn(e,He,{sessionId:r})),zt=SM(()=>AI(e,He,{sessionId:r})),Ot=v?vUe():Oe!=null&&Oe.notFound?_z():s?_Ue({branch:Ae(s)}):ye?null:CUe(),Fn=T.useCallback(()=>{k.saving||L(Qe=>Qe+1)},[k]),rs=()=>{V(null),G(null),Fn()},Wt=Wq(Ut(He),!s&&!ie);T.useEffect(()=>{if(!j||s)return;const Qe=window.setInterval(()=>{document.visibilityState!=="hidden"&&Fn()},2e3);return()=>window.clearInterval(Qe)},[j,s,Fn]);const sr=`${Ut(He)}&v=${encodeURIComponent(Wt??m??"")}&reload=${D}`;T.useEffect(()=>{var xn,Rn;if(!A||k.saving)return;const Qe=A,mt=k.getSnapshot();if(mt&&Cl(mt)){const fr=Qe.source==="checkout"?Qe.file:null,ir=fr!==null&&fr.path===mt.path&&(!r||fr.root==="worktree"),Ln=WHn(mt,ir&&typeof fr.version=="string"?fr.version:null,ir&&!fr.notFound);Ln&&(Ln.currentVersion!==((xn=mt.conflict)==null?void 0:xn.currentVersion)||Ln.exists!==((Rn=mt.conflict)==null?void 0:Rn.exists))?V({...mt,conflict:Ln}):!Ln&&mt.conflict&&V({...mt,conflict:null})}(!mt||!Cl(mt)&&(mt.version!==Qe.file.version||mt.path!==Qe.file.path))&&Qe.source==="checkout"&&!Qe.file.notFound&&!Qe.file.binary&&!Qe.file.truncated&&typeof Qe.file.version=="string"&&(V(bM(Qe.file.path,Qe.file.content,Qe.file.version)),G(null))},[A,k,r,ie,ce,q]);const Qn=JSON.stringify(N.queryKey),jr=T.useRef({sourceKey:Qn,nonce:D,artifactVersion:m,diskVersion:Wt});T.useEffect(()=>{const Qe=jr.current;jr.current={sourceKey:Qn,nonce:D,artifactVersion:m,diskVersion:Wt},Qe.sourceKey===Qn&&(Qe.nonce!==D||Qe.diskVersion!==null&&Qe.diskVersion!==Wt||Qe.artifactVersion!=null&&Qe.artifactVersion!==m)&&n9n(e,n,t??"repo",r,s)},[Qn,D,m,Wt,e,n,t,r,s]),T.useLayoutEffect(()=>{const Qe=ae.current,mt=We.current;!Qe||!Oe||!mt||(Qe.scrollTop=mt.top,Qe.scrollLeft=mt.left)},[Oe]);const Es=Qe=>{if(Qe.source==="absolute")return $qe();if(B)return Sqe({root:r?E1():C1()});if(s)return Tqe({branch:Ae(s)});if(r&&Qe.source==="checkout"&&Qe.file.root==="clone")return IVe();const mt=Qe.source==="checkout"?Qe.file.root:Qe.checkoutRoot;return Gqe({root:mt==="worktree"?E1():C1()})};return _.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:fn,children:[_.jsxs("div",{className:"file-view-header @container flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-text shrink-0",children:[_.jsx(Wh,{name:He}),_.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ae(He),children:He.split("/").pop()||He}),a&&_.jsxs("span",{className:"file-view-branch inline-flex items-center gap-1 min-w-0 text-xs text-muted border border-border-variant rounded-sm py-px px-1.5 max-w-65 overflow-hidden text-ellipsis whitespace-nowrap [&_svg]:flex-none",title:UX({branch:Ae(a)}),children:[_.jsx(ng,{size:11}),a]}),en&&(ie||Mt||ne)&&_.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${ne?"text-accent-red":"text-muted"}`,title:ne??(ie?Ba():kVe()),children:ie?_.jsxs(_.Fragment,{children:[_.jsx(Et,{})," ",TGe()]}):ne?SGe():bL()}),_.jsx("div",{ref:Fe,className:"contents"}),Q&&wt.compiled&&_.jsx(Rt,{size:"small",active:!wt.showPdf,"data-tip":wt.stale&&wt.showPdf?VUe():wt.showPdf?Zd():pz(),"data-tip-align":"end","aria-label":wt.showPdf?Zd():pz(),onClick:()=>wt.setShowPdf(!wt.showPdf),children:wt.showPdf?_.jsx(b5,{size:13}):_.jsx(fy,{size:13,className:wt.stale?"text-accent-amber":void 0})}),Q&&yn&&Kn&&_.jsx(rp,{size:"small","data-tip":wt.stale?RHe({name:Ae(Kn)}):Jv({name:Ae(Kn)}),"data-tip-align":"end","aria-label":Jv({name:Ae(Kn)}),href:yn,download:Kn,children:_.jsx(tg,{size:13,className:wt.stale?"text-accent-amber":void 0})}),Nt&&_.jsx(cqn,{overleaf:Bn}),Q&&ye&&_.jsx(Rt,{size:"small","data-tip":wt.compiled?dz():az(),"data-tip-align":"end","aria-label":wt.compiled?dz():az(),disabled:wt.compiling||!wt.engine,onClick:()=>void dn(),children:wt.compiling?_.jsx(Et,{}):_.jsx(S6n,{size:13})}),Z&&_.jsx(Rt,{size:"small",active:b,"data-tip":b?eb():Zd(),"data-tip-align":"end","aria-label":b?eb():Zd(),onClick:()=>C==null?void 0:C(!b),children:_.jsx(b5,{size:13})}),Vn&&_.jsx(Rt,{size:"small","data-tip":me?Cf():oz(),"data-tip-align":"end","aria-label":me?Cf():oz(),onClick:()=>void _t(),children:me?_.jsx(ti,{size:13}):_.jsx(Wf,{size:13})}),Oe!=null&&_.jsxs(_.Fragment,{children:[_.jsx(Rt,{size:"small","data-tip":Ot??Wn.error??fz(),"data-tip-align":"end","aria-label":fz(),"aria-description":Ot??void 0,disabled:Wn.busy||Ot!=null,onClick:()=>void Wn.trigger(),children:Wn.busy?_.jsx(Et,{}):_.jsx(Rf,{size:13})}),_.jsx(Rt,{size:"small","data-tip":Ot??zt.error??hz(),"data-tip-align":"end","aria-label":hz(),"aria-description":Ot??void 0,disabled:zt.busy||Ot!=null,onClick:()=>void zt.trigger(),children:zt.busy?_.jsx(Et,{}):_.jsx(vo,{size:13})})]})]}),!j&&ct&&(A==null?void 0:A.source)==="checkout"&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:Zqe({root:A.file.root==="worktree"?E1():C1()})}),Ce&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-amber",children:AVe()}),j&&Oe!==null&&_.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-red",children:[uz()," ",Ae(j)]}),(q==null?void 0:q.conflict)&&_.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[_.jsx("span",{className:"flex-1 min-w-0",role:"status",children:q.conflict.exists?iz():cz()}),((vr=q==null?void 0:q.conflict)==null?void 0:vr.exists)&&q.conflict.currentVersion&&_.jsx(Me,{disabled:ie,onPointerDown:Qe=>Qe.preventDefault(),onClick:()=>{var Qe;return void nn(((Qe=q.conflict)==null?void 0:Qe.currentVersion)??void 0)},children:BUe()}),_.jsx(Me,{disabled:ie,onPointerDown:Qe=>Qe.preventDefault(),onClick:rs,children:_Ge()})]}),(wt.error||wt.log)&&_.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4",children:[_.jsxs("div",{className:"flex items-start gap-2",children:[_.jsx("span",{className:`flex-1 min-w-0 text-sm ${wt.builtWithErrors?"text-subtext":"text-accent-red"}`,children:wt.error??(wt.builtWithErrors?aFe():KPe())}),_.jsx(Rt,{"data-tip":iHe(),"data-tip-align":"end","aria-label":fHe(),onClick:wt.dismiss,children:_.jsx(_r,{size:13})})]}),wt.log&&_.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:wt.log})]}),Nt&&Bn.staleOnDisk&&_.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[_.jsx("span",{className:"flex-1 min-w-0",children:RUe()}),_.jsx(Me,{onClick:()=>{Bn.reloaded(),L(Qe=>Qe+1)},children:VFe()})]}),Q&&ye&&wt.engine===null&&wt.installHint&&_.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[wt.installHint,wt.installCommand&&_.jsx(hqn,{command:wt.installCommand})]}),wt.note&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:wt.note}),gr&&wt.stale&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:rVe()}),_.jsxs("div",{ref:ae,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:ls?0:void 0,onScroll:Qe=>{const mt={top:Math.max(0,Qe.currentTarget.scrollTop),left:Math.max(0,Qe.currentTarget.scrollLeft)};We.current=mt,u==null||u(mt)},children:[!en&&!j&&!B&&(A==null?void 0:A.source)==="checkout"&&!A.file.notFound&&!s&&r&&A.file.root==="clone"&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:uVe()}),!en&&!j&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&ot&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:NPe({root:A.checkoutRoot==="worktree"?E1():C1()})}),j&&Oe===null?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[uz()," ",Ae(j)]}):Oe===null?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:vL()}):en?_.jsx(NB,{value:je,onChange:Qe=>{const mt=k.getSnapshot()??(Oe&&typeof Oe.version=="string"?bM(Oe.path,Oe.content,Oe.version):null);mt&&V(VHn(mt,Qe)),p==null||p(),ne&&G(null)},onSave:()=>void Dn(),onBlur:()=>{Dk||Dn()},readOnly:Gr,path:n,highlightLine:i,scrollRequest:rn,onScrollRequestHandled:f,scrollPosition:We.current,onScrollPositionChange:Qe=>{We.current=Qe,u==null||u(Qe)}}):Oe.notFound?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Es(A):_z()}):$e?_.jsx(Bb.Provider,{value:Ee,children:_.jsx(Ok,{kind:$e,url:sr,name:n.split("/").pop()??n})}):Oe.binary?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[OPe()," ",_.jsx("a",{href:sr,download:n.split("/").pop()??n,children:gL()})]}):gr&&Tn&&Kn?_.jsx(Bb.Provider,{value:Ee,children:_.jsx(Ok,{kind:"pdf",url:Tn,name:Kn,download:!1},Tn)}):H&&!b?_.jsx("div",{ref:le,className:"file-view-md max-w-readable pt-4.5 px-5 pb-8 [&_.md]:text-base [&_.md_h1]:text-2xl [&_.md_h1]:mt-4.5 [&_.md_h1]:mx-0 [&_.md_h1]:mb-2 [&_.md_h2]:text-xl [&_.md_h2]:mt-4 [&_.md_h2]:mx-0 [&_.md_h2]:mb-2 [&_.md_h3]:text-lg",children:xt?_.jsx(Jq,{projectId:e,folder:ht,markdown:Oe.content,entries:w}):_.jsx($c,{text:Oe.content,resolveFilePath:Kt,resolveImageSrc:Ht,onOpenFile:o&&((Qe,mt,mn,xn,Rn)=>o(Qe,r,s,Rn))})}):K&&!b?_.jsx(oqn,{html:Oe.content,truncated:Oe.truncated,url:sr,name:He,resolveSrc:Ht}):_.jsxs(_.Fragment,{children:[_.jsx("div",{ref:le,children:_.jsx(Gq,{text:Oe.content,path:n,highlightLine:i,scrollRequest:rn,onScrollRequestHandled:f})}),Oe.truncated&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:GHe()})]})]})]})}function mqn({onCollapse:e}){return _.jsx("div",{className:"rail-brand px-3 py-3 border-b border-border shrink-0",children:_.jsxs("div",{className:"flex items-center gap-2 px-1",children:[_.jsx("span",{className:"w-5 h-5",children:_.jsx(by,{})}),_.jsx("span",{className:"flex-1 text-base font-medium",children:"OpenResearch"}),e&&_.jsx(Rt,{size:"small","data-tip":gz(),"aria-label":gz(),onClick:e,children:_.jsx(M$,{size:18})})]})})}function G4(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function tv(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function gqn(e){const t=(e.trim().split(/[?#]/)[0].split("/").filter(Boolean).pop()??"").replace(/\.(pdf|md)$/i,"");return/^\d{4}\.\d{4,5}(v\d+)?$/.test(t)?t:null}function vqn(e){const n=e==null?void 0:e.trim().match(/github\.com[/:]([^/]+)\/([^/?#]+)/i);return n?{owner:n[1],repo:n[2].replace(/\.git$/,"")}:null}function bqn(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function yqn({onCreated:e,onCancel:n,remote:t=!1}){var Kn,dn,Dn,Wn;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,d]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(!1),[y,x]=T.useState(null),[b,C]=T.useState(!1),[N,z]=T.useState(!1),[A,j]=T.useState(""),[M,D]=T.useState(null),[L,B]=T.useState(!1),U=T.useRef(0),H=T.useRef(0),Q=T.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),K=r==="paper"?vqn(M==null?void 0:M.repoUrl):null,Z=i.trim()?`~/OpenResearch/${tv(i,48)}`:"",ee=`~/OpenResearch/${tv(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!f?Z:r==="paper"&&M&&!f?ee:u,I=G4($.trim(),200),F=dt({...D0(I),enabled:!!I&&I===$.trim()}),q=I===$.trim()?F.data??null:null,V=I===$.trim()?((Kn=F.error)==null?void 0:Kn.message)??null:null,ie=!!$.trim()&&(I!==$.trim()||F.isFetching),oe=K??(r==="folder"&&(q!=null&&q.githubOwner)&&q.githubRepo?{owner:q.githubOwner,repo:q.githubRepo}:null),ce=dt(q5n()),ne=((dn=ce.data)==null?void 0:dn.login)??(ce.isPending?void 0:null),G=dt(PS()),ae=T.useRef(!1);T.useEffect(()=>{ae.current||!G.data||(ae.current=!0,z(G.data.githubForNewProjects))},[G.data]);const le=G4(i.trim(),150),me=dt({...U5n(le),enabled:le===i.trim()}),ve=le===i.trim()?((Dn=me.data)==null?void 0:Dn.repo)??tv(i,48):tv(i,48),Ee=le!==i.trim()||me.isFetching,Fe=dt({...kj((oe==null?void 0:oe.owner)??"",(oe==null?void 0:oe.repo)??""),enabled:!!oe,subscribed:!!oe}),We=!!oe&&Fe.isFetching,Oe=oe&&((Wn=Fe.data)!=null&&Wn.canPush)?`github.com/${oe.owner}/${oe.repo}`:null,He=G4(A.trim(),350),ht=gqn(He),xt=r==="paper"&&!M&&He===A.trim(),Kt=dt({...ZI(He),enabled:xt&&!ht&&He.length>=3,subscribed:xt&&!ht&&He.length>=3}),Ut=dt({...d5(ht??""),enabled:xt&&!!ht,subscribed:xt&&!!ht}),Ht=xt&&!ht?Kt.data??[]:[],$e=xt&&Kt.isSuccess?He:"",ot=L||r==="paper"&&!M&&(He!==A.trim()||(ht?Ut.isFetching:Kt.isFetching));T.useEffect(()=>{var zt;!xt||!ht||!Ut.data||(D(Ut.data),o||a(((zt=Ut.data.title)==null?void 0:zt.trim())||Ut.data.paperId))},[xt,ht,Ut.data,o]),T.useEffect(()=>{const zt=ht?Ut.error:Kt.error;xt&&zt&&x(zt.message)},[xt,ht,Ut.error,Kt.error]);const ct=pn({mutationFn:Mwn});async function ye(zt){var Fn;const Ot=++U.current;B(!0),x(null);try{const rs=await Ze.fetchQuery(d5(zt));if(Ot!==U.current)return;D(rs),o||a(((Fn=rs.title)==null?void 0:Fn.trim())||rs.paperId)}catch(rs){Ot===U.current&&x(rs instanceof Error?rs.message:String(rs))}finally{Ot===U.current&&B(!1)}}function Be(){U.current+=1,H.current+=1,D(null),j(""),B(!1),w(!1),d(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function Ke(zt){if(zt===r)return;U.current+=1,H.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:f};const Ot=Q.current[zt];s(zt),x(null),B(!1),w(!1),a(Ot.name),c(Ot.nameTouched),d(Ot.path),p(Ot.pathTouched)}async function Ce(){if(m)return;const zt=++H.current;w(!0),x(null);try{const Ot=await Rwn();if(zt!==H.current||!Ot)return;if(p(!0),d(Ot),Ze.invalidateQueries(D0(Ot)),r==="folder"&&!o){const Fn=Ot.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Fn&&a(Fn)}}catch(Ot){zt===H.current&&x(Ot instanceof Error?Ot.message:String(Ot))}finally{zt===H.current&&w(!1)}}async function Ye(zt){if(zt.preventDefault(),!!_t){v(!0),x(null);try{const Ot=await Ze.fetchQuery({...D0($.trim()),staleTime:0});if(Ot.exists&&Ot.directory===!1)throw new Error(xw());if(r==="blank"&&Ot.exists)throw new Error(jz());if(r==="paper"&&Ot.empty===!1)throw new Error(Mz());N&&oe&&await Ze.fetchQuery({...kj(oe.owner,oe.repo),staleTime:0}).catch(()=>null);const Fn=await ct.mutateAsync({name:i.trim(),path:$.trim(),creationMode:r,createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:E(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(Fn.project,Fn.githubPublicationError)}catch(Ot){x(Ot instanceof Error?Ot.message:String(Ot))}finally{v(!1)}}}const lt=i.trim(),je=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Gt=r==="folder"&&(q==null?void 0:q.gitState)==="ready"?q.resolvedPath??null:null,Mt=lt!==""&&(je!==null||Gt!==null);T.useEffect(()=>{if(!Mt)return;const zt=window.setTimeout(()=>{Pwn({name:lt,paperId:je??void 0,path:Gt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(zt)},[Mt,lt,je,Gt]);const Jt=(q==null?void 0:q.gitVersion)===null,rn=r==="folder"&&!!$.trim()&&q!==null&&q.exists===!1,nn=r==="blank"&&(q==null?void 0:q.exists)===!0,Nt=!!$.trim()&&(q==null?void 0:q.exists)===!0&&q.directory===!1,wt=r==="paper"&&!!(M!=null&&M.repoUrl)&&(q==null?void 0:q.empty)===!1,Bn=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(q==null?void 0:q.empty)===!1,gr=r==="folder"&&((q==null?void 0:q.gitState)==="detached"||(q==null?void 0:q.gitState)==="invalid"),Gr=f&&!$.trim()||Nt||wt||Bn,en=f&&!$.trim()||Nt||nn,Vn=f&&!$.trim()?Rz():Nt?xw():nn?jz():null,ls=f&&!$.trim()?Rz():Nt?xw():wt?Mz():Bn?Vit():null,_t=!!(i.trim()&&$.trim())&&!k&&!m&&!ie&&q!==null&&!V&&!Jt&&!rn&&!nn&&!Nt&&!wt&&!Bn&&!gr&&(r!=="paper"||!!M)&&(!N||typeof ne=="string"&&!Ee&&!We),fn=Oe??`github.com/${ne??"you"}/${ve}`,yn=ne===void 0||Ee||We,Tn=r==="paper"&&!M&&A.trim().length>=3&&$e===A.trim()&&!ot&&Ht.length===0&&!y;return _.jsxs("form",{className:"form [&_.form-seg]:self-start [&_.form-seg]:mb-0.5 [&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3 [&_.repo-hint]:font-normal [&_.repo-hint]:text-sm [&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal [&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center [&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full [&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5 [&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background [&_.folder-picker-control]:border [&_.folder-picker-control]:border-border [&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer [&_.folder-picker-control]:text-start [&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard [&_.folder-picker-control:hover:not(:disabled)]:border-muted [&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle [&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text [&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1 [&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden [&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap [&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none [&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none [&_.folder-picker-chevron]:text-muted [&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext [&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm [&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4] [&_.project-location-field]:flex [&_.project-location-field]:flex-col [&_.project-location-field]:gap-2 [&_.project-location-label]:text-text [&_.project-location-label]:text-base [&_.project-location-label]:font-medium [&_.project-field-label]:text-text [&_.project-field-label]:text-base [&_.project-field-label]:font-medium [&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65 [&_.paper-destination]:flex [&_.paper-destination]:items-center [&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3 [&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md [&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1 [&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden [&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm [&_.paper-destination_code]:font-normal [&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap [&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px] [&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant [&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface [&_.project-path-notice]:text-subtext [&_.project-path-notice]:text-sm [&_.project-path-notice]:leading-[1.4] [&_.project-path-notice.error]:border-danger-notice-border [&_.paper-results]:flex [&_.paper-results]:flex-col [&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md [&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto [&_.paper-results_button]:flex [&_.paper-results_button]:flex-col [&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5 [&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent [&_.paper-results_button]:border-0 [&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant [&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit] [&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer [&_.paper-results_button:last-child]:border-b-0 [&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm [&_.paper-results_.title]:font-medium [&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted [&_.paper-pick_.id]:text-xs [&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center [&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3 [&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md [&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0 [&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium flex flex-col [&_label]:flex [&_label]:flex-col [&_label]:gap-1 [&_label]:text-sm [&_label]:text-text [&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2 [&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end [&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start [&_.new-project-actions]:mt-2.5 [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap new-project-form gap-4.5 [&_>_label]:gap-2",onSubmit:Ye,children:[_.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default form-seg",children:[_.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>Ke("blank"),children:sot()}),_.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),_.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>Ke("folder"),children:Got()}),_.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),_.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>Ke("paper"),children:ict()})]}),r==="paper"&&!M&&_.jsxs("label",{className:"!font-normal",children:[Vct(),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:zt=>{x(null),j(zt.target.value)},placeholder:_lt()}),!Tn&&_.jsx("span",{className:"repo-hint",children:ot?But():Cut()}),Tn&&_.jsx("span",{className:"project-path-notice block",children:Cct()}),Ht.length>0&&_.jsx("div",{className:"paper-results",children:Ht.map(zt=>_.jsxs("button",{type:"button",onClick:()=>void ye(zt.paperId),children:[_.jsx(im,{children:zt.title}),_.jsx("span",{className:"id",children:zt.paperId})]},zt.paperId))})]}),M&&r==="paper"&&_.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[_.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[_.jsxs("div",{className:"meta",children:[_.jsx(im,{className:"block",children:M.title||M.paperId}),M.repoUrl&&_.jsx("div",{className:"id",children:bqn(M.repoUrl)})]}),_.jsx(Me,{size:"small",type:"button","aria-label":Cot(),onClick:Be,children:vot()})]}),!M.repoUrl&&_.jsxs("div",{className:"flex w-full flex-col items-start gap-1 rounded-md border border-border-variant bg-background px-[9px] py-1 text-sm font-normal text-subtext",children:[_.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[_.jsx(VS,{size:16})," ",Rct()]}),_.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Bct()})]})]}),(r!=="paper"||M)&&_.jsxs(_.Fragment,{children:[r==="blank"&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:F3()}),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:zt=>{c(!0),a(zt.target.value)},placeholder:Tz()})]}),r==="paper"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?bat():ww()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:zt=>{p(!0),d(zt.target.value)},"aria-describedby":Gr?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ie&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Az()}),Gr&&_.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:ls})]}):r==="folder"&&!t?_.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?Jit({path:Ae(u)}):Nz(),disabled:m,title:u||void 0,onClick:()=>void Ce(),children:[_.jsx(vo,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),_.jsx("span",{className:u?"text-sm":"placeholder",children:m?fat():u||Nz()}),_.jsx(yo,{className:"folder-picker-chevron",size:15})]}):r==="folder"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:ww()}),_.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:zt=>{p(!0),d(zt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:ww()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:zt=>{p(!0),d(zt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":en?"blank-destination-description":void 0,spellCheck:!1}),ie&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Az()}),en&&_.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Vn})]}):null,r!=="blank"&&$&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:F3()}),_.jsx("input",{className:"text-sm font-normal",value:i,onChange:zt=>{c(!0),a(zt.target.value)},placeholder:Tz()})]}),Jt&&_.jsx("div",{className:"project-path-notice error",children:fct()}),!Jt&&r==="folder"&&u.trim()&&!ie&&(q==null?void 0:q.exists)===!1&&_.jsx("div",{className:"project-path-notice error",children:Clt()}),!Jt&&r==="folder"&&u.trim()&&!ie&&Nt&&_.jsx("div",{className:"project-path-notice error",children:Blt()}),!Jt&&r==="folder"&&!ie&&(q==null?void 0:q.gitState)==="detached"&&_.jsx("div",{className:"project-path-notice error",children:Rot()}),!Jt&&r==="folder"&&!ie&&(q==null?void 0:q.gitState)==="invalid"&&_.jsx("div",{className:"project-path-notice error",children:Rlt()}),V&&_.jsx("div",{className:"project-path-notice error",role:"alert",children:V})]}),y&&_.jsx("div",{className:"error",role:"alert",children:y}),(r!=="paper"||M)&&$&&(r!=="blank"||i.trim())&&_.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[_.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${N&&ne===null?" text-accent-red":" text-text"}`,"aria-expanded":b,"aria-controls":"new-project-advanced-settings",onClick:()=>C(zt=>!zt),children:[N?ne===null?Rit():Bit():zL(),_.jsx(qc,{className:b?"rotate-180":"",size:16})]}),b&&_.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[_.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[_.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:zt=>z(zt.target.checked),disabled:k}),_.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:vlt()})]}),_.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[_.jsx("span",{children:yn?Vlt({repository:Ae(fn)}):Oe?aut({repository:Ae(fn)}):Jlt({repository:Ae(fn)})}),_.jsx("span",{children:Zot()}),ne===null&&_.jsx("span",{children:Rut({command:Ae("gh auth login")})})]})]})]}),_.jsxs("div",{className:"actions new-project-actions",children:[n&&_.jsx(Me,{type:"button",onClick:n,children:_ot()}),_.jsx(Me,{variant:"primary",className:"ms-auto",disabled:!_t,children:k?Bat():r==="paper"?M!=null&&M.repoUrl?Eat():zz():r==="folder"?Vut():zz()})]})]})}function xqn({onClose:e,onCreated:n,remote:t=!1}){const r=T.useRef(null),s=T.useRef(e);return s.current=e,T.useEffect(()=>{const i=r.current;if(!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...i.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(i.querySelector("[data-initial-focus]")??o()[0]??i).focus();const c=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),s.current();return}if(u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&!u.altKey&&u.shiftKey){u.preventDefault(),u.stopPropagation();return}if(u.key!=="Tab")return;const d=o();if(d.length===0){u.preventDefault(),i.focus();return}const f=d[0],p=d[d.length-1];u.shiftKey&&document.activeElement===f?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),f.focus())};return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0),a==null||a.focus()}},[]),_.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-start justify-center p-5 [--new-project-modal-top:clamp(4rem,20vh,24rem)] pt-[var(--new-project-modal-top)] overflow-y-auto z-100",onClick:i=>{i.target===i.currentTarget&&e()},children:_.jsxs("div",{ref:r,className:"modal w-120 max-w-full max-h-[calc(100vh_-_var(--new-project-modal-top)_-_1.25rem)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl [&_h2]:font-medium",role:"dialog","aria-modal":"true","aria-labelledby":"new-project-dialog-title",tabIndex:-1,children:[_.jsx("h2",{id:"new-project-dialog-title",children:nb()}),_.jsx(yqn,{onCancel:e,onCreated:n,remote:t})]})})}function wqn(e){const n=new Map,t=new Map(e.map(c=>[c.id,c]));for(const c of e){if(!c.parentExperimentId)continue;const u=n.get(c.parentExperimentId)??[];u.push(c),n.set(c.parentExperimentId,u)}const r=new Map,s=new Map;function i(c){const u=r.get(c);if(u!==void 0)return u;const d=(n.get(c)??[]).some(f=>f.archived||i(f.id));return r.set(c,d),d}function a(c){const u=s.get(c);if(u!==void 0)return u;const d=(n.get(c)??[]).some(f=>!f.archived||a(f.id));return s.set(c,d),d}const o=new Map;for(const c of e){let u=!1,d=!1,f=c.parentExperimentId?t.get(c.parentExperimentId):void 0;for(;f;)f.archived?d=!0:u=!0,f=f.parentExperimentId?t.get(f.parentExperimentId):void 0;o.set(c.id,{archiveOnly:!c.archived,archiveAbove:!c.archived&&u,archiveDown:!c.archived&&a(c.id),restoreOnly:c.archived,restoreAbove:!c.archived&&d,restoreDown:i(c.id)})}return o}function oU({id:e,name:n,actions:t,onArchive:r,compact:s=!1}){const i=T.useRef(null),a=ra(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const f=i.current.getBoundingClientRect(),p=Object.values(t).filter(Boolean).length*32+12,m=window.innerHeight-f.bottom>=p;c({top:m?f.bottom+4:Math.max(4,f.top-p),left:Math.max(4,Math.min(f.right-176,window.innerWidth-180))})}a.setOpen(f=>!f)},d=(f,p)=>{a.setOpen(!1),r(e,f,p)};return _.jsxs("div",{className:"nodrag ms-auto shrink-0",children:[s?_.jsx(Rt,{type:"button",ref:i,size:"small",className:"node-action","aria-label":oj({name:n}),"aria-expanded":a.open,onClick:u,children:_.jsx(ip,{size:15,"aria-hidden":"true"})}):_.jsx("button",{type:"button",className:"btn inline-flex h-7 items-center justify-center rounded-sm border border-border bg-background px-2.5 text-sm text-text hover:bg-surface",ref:i,"aria-label":oj({name:n}),"aria-expanded":a.open,onClick:u,children:zmn()}),a.open&&ni.createPortal(_.jsxs("div",{ref:a.ref,className:"option-menu fixed z-70 min-w-44 rounded-lg border border-border bg-background p-1.5 shadow-menu",style:o,children:[t.archiveAbove&&_.jsx(un,{onClick:()=>d("ancestors",!0),children:hmn()}),t.archiveOnly&&_.jsx(un,{onClick:()=>d("only",!0),children:Fmn()}),t.archiveDown&&_.jsx(un,{onClick:()=>d("descendants",!0),children:xmn()}),t.restoreOnly&&_.jsx(un,{onClick:()=>d("only",!1),children:bI()}),t.restoreAbove&&_.jsx(un,{onClick:()=>d("ancestors",!1),children:Fgn()}),t.restoreDown&&_.jsx(un,{onClick:()=>d("descendants",!1),children:t1n()})]}),document.body)]})}function kqn({runs:e,experiments:n,archiveActions:t,emptyHint:r,onOpen:s,onOpenLogs:i,onOpenCode:a,onArchive:o,onCancel:c}){const[u,d]=T.useState(new Set),[f,p]=T.useState(null),m=new Map;for(const v of e){const y=m.get(v.experimentId);y?y.push(v):m.set(v.experimentId,[v])}for(const v of m.values())v.sort((y,x)=>x.createdAt-y.createdAt);const w=[...n].sort((v,y)=>{var C,N,z,A;const x=((N=(C=m.get(v.id))==null?void 0:C[0])==null?void 0:N.createdAt)??v.createdAt;return(((A=(z=m.get(y.id))==null?void 0:z[0])==null?void 0:A.createdAt)??y.createdAt)-x});if(w.length===0)return _.jsx(WC,{icon:Bh,title:r??_$e(),description:r?void 0:YIe()});async function k(v){p(null),d(y=>new Set(y).add(v));try{await c(v)}catch(y){d(x=>{const b=new Set(x);return b.delete(v),b}),p(y instanceof Error?y.message:String(y))}}return _.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[f&&_.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[EBe()," ",f]}),_.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":dBe(),children:w.map(v=>{const y=m.get(v.id)??[],x=y[0]??null,b=y.find(A=>A.status==="running"||A.status==="starting"),C=b??x,N=!!(b&&(b.cancelRequested||u.has(b.id))),z=b?N?"cancelling":Aa(b):x?Aa(x):"idle";return _.jsxs("div",{className:"experiment-table-group grid grid-cols-[minmax(0,_1fr)_auto] [grid-template-areas:'name_meta'_'actions_actions'] gap-x-8 items-center py-4 px-5 gap-y-[7px] border-b border-b-divider-subtle bg-background cursor-pointer [&:hover]:bg-canvas [&:last-child]:border-b-0 [@container((max-width:_560px))]:grid-cols-[minmax(0,_1fr)_auto] [@container((max-width:_560px))]:gap-x-3.5 [@container((max-width:_560px))]:gap-y-[9px] [@container((max-width:_400px))]:grid-cols-[minmax(0,_1fr)] [@container((max-width:_400px))]:[grid-template-areas:'name'_'meta'_'actions']",role:"listitem",onClick:()=>s(v,"preview"),onDoubleClick:()=>s(v,"keepOpen"),onAuxClick:A=>{A.button===1&&(A.preventDefault(),s(v,"keepOpen"))},children:[_.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[_.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...ns(A=>s(v,A),{stopPropagation:!0}),children:v.title||v.slug}),v.archived&&_.jsx("span",{className:"text-muted text-xs",children:vI()}),_.jsxs("span",{className:"experiment-table-subtitle flex items-center min-w-0 gap-1.5 mt-1 overflow-hidden text-subtext text-sm [&_>_svg]:shrink-0 [&_code]:min-w-0 [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:v.branchName,children:[_.jsx(ng,{size:14,"aria-hidden":"true"}),_.jsx("code",{children:v.branchName})]})]}),_.jsxs("div",{className:"experiment-table-meta [grid-area:meta] self-start flex items-center justify-end gap-4.5 whitespace-nowrap [@container((max-width:_560px))]:flex-col [@container((max-width:_560px))]:items-end [@container((max-width:_560px))]:gap-1.5 [@container((max-width:_400px))]:!flex-row [@container((max-width:_400px))]:!items-center [@container((max-width:_400px))]:flex-wrap [@container((max-width:_400px))]:justify-start [@container((max-width:_400px))]:gap-3",children:[_.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:_.jsx(Pl,{status:z})}),_.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:_.jsx("span",{children:y.length===1?C$e():B$e({count:_n(y.length)})})}),_.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:_.jsx("span",{children:x?Dc(x.createdAt):v$e()})})]}),_.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":AX({name:v.title||v.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[_.jsxs(Me,{size:"small",disabled:!C,title:C?R$e():s$e(),...ns(A=>{C&&i(v.id,C.id,A)},{stopPropagation:!0}),children:[_.jsx(Ko,{size:15}),$3()]}),_.jsxs(Me,{size:"small",title:ZD({branch:Ae(v.branchName)}),...ns(A=>a(v.id,A),{stopPropagation:!0}),children:[_.jsx(dy,{size:15}),aBe()]}),b&&_.jsxs(Me,{size:"small",variant:"danger",disabled:N,title:N?V$e():J$e(),onClick:()=>void k(b.id),children:[_.jsx(E$,{size:15}),N?MAe():hL()]}),_.jsx(oU,{id:v.id,name:v.title||v.slug,actions:t.get(v.id),onArchive:o})]})]},v.id)})})]})}function Sqn({onClose:e,onCreateProject:n}){const[t,r]=T.useState(!1),[s,i]=T.useState(null),a=T.useRef(null),o=T.useCallback(c=>{t||(r(!0),i(null),c().catch(()=>i(P0n())).finally(()=>r(!1)))},[t]);return T.useEffect(()=>{const c=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(()=>e("dismiss")))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,o]),T.useEffect(()=>{const c=a.current;if(!c)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,d=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(d()[0]??c).focus();const f=p=>{if(p.key!=="Tab")return;const m=d();if(m.length===0){p.preventDefault(),c.focus();return}const w=m[0],k=m[m.length-1];p.shiftKey&&document.activeElement===w?(p.preventDefault(),k.focus()):!p.shiftKey&&document.activeElement===k&&(p.preventDefault(),w.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),u==null||u.focus()}},[]),ni.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:_.jsxs("div",{ref:a,className:"relative w-110 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"demo-welcome-title",tabIndex:-1,children:[_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":ib(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:_.jsx(_r,{size:16})}),_.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[_.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:_.jsx(by,{})}),_.jsxs("div",{children:[_.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:f0n()}),_.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:emn()})]})]}),_.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[_.jsxs("p",{dir:"auto",children:[K0n()," ",_.jsx("a",{dir:"ltr",href:"https://github.com/karpathy/nanochat",target:"_blank",rel:"noreferrer",className:"font-medium text-primary underline decoration-border-strong underline-offset-3 hover:decoration-primary",children:E0n()}),Vpn()]}),_.jsx("p",{dir:"auto",children:b0n()})]}),s&&_.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),_.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[_.jsx(Me,{onClick:()=>o(n),disabled:t,children:i0n()}),_.jsx(Me,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?Ba():M0n()})]})]})}),document.body)}function Cs(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function dx(){for(var e=0,n=arguments.length,t={},r;e=0&&(r=t.slice(s+1),t=t.slice(0,s)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}Dv.prototype=dx.prototype={constructor:Dv,on:function(e,n){var t=this._,r=Eqn(e+"",t),s,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var t=new Array(s),r=0,s,i;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),EM.hasOwnProperty(n)?{space:EM[n],local:e}:e}function zqn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===Ik&&n.documentElement.namespaceURI===Ik?n.createElement(e):n.createElementNS(t,e)}}function jqn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cU(e){var n=hx(e);return(n.local?jqn:zqn)(n)}function Aqn(){}function QC(e){return e==null?Aqn:function(){return this.querySelector(e)}}function Tqn(e){typeof e!="function"&&(e=QC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=b&&(b=x+1);!(N=v[b])&&++b=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function nUn(e){e||(e=rUn);function n(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function sUn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function iUn(){return Array.from(this)}function aUn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?gUn:typeof n=="function"?bUn:vUn)(e,n,t??"")):Qh(this.node(),e)}function Qh(e,n){return e.style.getPropertyValue(n)||dU(e).getComputedStyle(e,null).getPropertyValue(n)}function xUn(e){return function(){delete this[e]}}function wUn(e,n){return function(){this[e]=n}}function kUn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function SUn(e,n){return arguments.length>1?this.each((n==null?xUn:typeof n=="function"?kUn:wUn)(e,n)):this.node()[e]}function hU(e){return e.trim().split(/^|\s+/)}function XC(e){return e.classList||new pU(e)}function pU(e){this._node=e,this._names=hU(e.getAttribute("class")||"")}pU.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function mU(e,n){for(var t=XC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function ZUn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function $k(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}$k.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function cGn(e){return!e.ctrlKey&&!e.button}function lGn(){return this.parentNode}function uGn(e,n){return n??{x:e.x,y:e.y}}function _Gn(){return navigator.maxTouchPoints||"ontouchstart"in this}function wU(){var e=cGn,n=lGn,t=uGn,r=_Gn,s={},i=dx("start","drag","end"),a=0,o,c,u,d,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",y,oGn).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(d||!e.call(this,C,N))){var z=b(this,n.call(this,C,N),C,N,"mouse");z&&(Na(C.view).on("mousemove.drag",w,xm).on("mouseup.drag",k,xm),yU(C.view),V4(C),u=!1,o=C.clientX,c=C.clientY,z("start",C))}}function w(C){if(hh(C),!u){var N=C.clientX-o,z=C.clientY-c;u=N*N+z*z>f}s.mouse("drag",C)}function k(C){Na(C.view).on("mousemove.drag mouseup.drag",null),xU(C.view,u),hh(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var z=C.changedTouches,A=n.call(this,C,N),j=z.length,M,D;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?rv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?rv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=dGn.exec(e))?new na(n[1],n[2],n[3],1):(n=hGn.exec(e))?new na(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=pGn.exec(e))?rv(n[1],n[2],n[3],n[4]):(n=mGn.exec(e))?rv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=gGn.exec(e))?MM(n[1],n[2]/100,n[3]/100,1):(n=vGn.exec(e))?MM(n[1],n[2]/100,n[3]/100,n[4]):NM.hasOwnProperty(e)?AM(NM[e]):e==="transparent"?new na(NaN,NaN,NaN,0):null}function AM(e){return new na(e>>16&255,e>>8&255,e&255,1)}function rv(e,n,t,r){return r<=0&&(e=n=t=NaN),new na(e,n,t,r)}function xGn(e){return e instanceof pg||(e=$f(e)),e?(e=e.rgb(),new na(e.r,e.g,e.b,e.opacity)):new na}function Bk(e,n,t,r){return arguments.length===1?xGn(e):new na(e,n,t,r??1)}function na(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}YC(na,Bk,kU(pg,{brighter(e){return e=e==null?Fb:Math.pow(Fb,e),new na(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wm:Math.pow(wm,e),new na(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new na(wf(this.r),wf(this.g),wf(this.b),Hb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:TM,formatHex:TM,formatHex8:wGn,formatRgb:RM,toString:RM}));function TM(){return`#${nf(this.r)}${nf(this.g)}${nf(this.b)}`}function wGn(){return`#${nf(this.r)}${nf(this.g)}${nf(this.b)}${nf((isNaN(this.opacity)?1:this.opacity)*255)}`}function RM(){const e=Hb(this.opacity);return`${e===1?"rgb(":"rgba("}${wf(this.r)}, ${wf(this.g)}, ${wf(this.b)}${e===1?")":`, ${e})`}`}function Hb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nf(e){return e=wf(e),(e<16?"0":"")+e.toString(16)}function MM(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ho(e,n,t,r)}function SU(e){if(e instanceof Ho)return new Ho(e.h,e.s,e.l,e.opacity);if(e instanceof pg||(e=$f(e)),!e)return new Ho;if(e instanceof Ho)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),i=Math.max(n,t,r),a=NaN,o=i-s,c=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&c<1?0:a,new Ho(a,o,c,e.opacity)}function kGn(e,n,t,r){return arguments.length===1?SU(e):new Ho(e,n,t,r??1)}function Ho(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}YC(Ho,kGn,kU(pg,{brighter(e){return e=e==null?Fb:Math.pow(Fb,e),new Ho(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wm:Math.pow(wm,e),new Ho(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*n,s=2*t-r;return new na(K4(e>=240?e-240:e+120,s,r),K4(e,s,r),K4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ho(OM(this.h),sv(this.s),sv(this.l),Hb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Hb(this.opacity);return`${e===1?"hsl(":"hsla("}${OM(this.h)}, ${sv(this.s)*100}%, ${sv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OM(e){return e=(e||0)%360,e<0?e+360:e}function sv(e){return Math.max(0,Math.min(1,e||0))}function K4(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const ZC=e=>()=>e;function SGn(e,n){return function(t){return e+t*n}}function CGn(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(r){return Math.pow(e+r*n,t)}}function EGn(e){return(e=+e)==1?CU:function(n,t){return t-n?CGn(n,t,e):ZC(isNaN(n)?t:n)}}function CU(e,n){var t=n-e;return t?SGn(e,t):ZC(isNaN(e)?n:e)}const qb=(function e(n){var t=EGn(n);function r(s,i){var a=t((s=Bk(s)).r,(i=Bk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=CU(s.opacity,i.opacity);return function(d){return s.r=a(d),s.g=o(d),s.b=c(d),s.opacity=u(d),s+""}}return r.gamma=e,r})(1);function NGn(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(i){for(s=0;st&&(i=n.slice(t,i),o[a]?o[a]+=i:o[++a]=i),(r=r[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,c.push({i:a,x:Ec(r,s)})),t=W4.lastIndex;return t180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:Ec(u,d)})):d&&f.push(s(f)+"rotate("+d+r)}function o(u,d,f,p){u!==d?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:Ec(u,d)}):d&&f.push(s(f)+"skewX("+d+r)}function c(u,d,f,p,m,w){if(u!==f||d!==p){var k=m.push(s(m)+"scale(",null,",",null,")");w.push({i:k-4,x:Ec(u,f)},{i:k-2,x:Ec(d,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),o(u.skewX,d.skewX,f,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(m){for(var w=-1,k=p.length,v;++w=0&&e._call.call(void 0,n),e=e._next;--Xh}function IM(){Bf=(Gb=Sm.now())+px,Xh=z0=0;try{HGn()}finally{Xh=0,UGn(),Bf=0}}function qGn(){var e=Sm.now(),n=e-Gb;n>jU&&(px-=n,Gb=e)}function UGn(){for(var e,n=Ub,t,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Ub=t);j0=e,Hk(r)}function Hk(e){if(!Xh){z0&&(z0=clearTimeout(z0));var n=e-Bf;n>24?(e<1/0&&(z0=setTimeout(IM,e-Sm.now()-px)),y0&&(y0=clearInterval(y0))):(y0||(Gb=Sm.now(),y0=setInterval(qGn,jU)),Xh=1,AU(IM))}}function $M(e,n,t){var r=new Vb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var GGn=dx("start","end","cancel","interrupt"),VGn=[],RU=0,BM=1,qk=2,Iv=3,PM=4,Uk=5,$v=6;function mx(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;KGn(e,t,{name:n,index:r,group:s,on:GGn,tween:VGn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:RU})}function e7(e,n){var t=Xo(e,n);if(t.state>RU)throw new Error("too late; already scheduled");return t}function Qc(e,n){var t=Xo(e,n);if(t.state>Iv)throw new Error("too late; already running");return t}function Xo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function KGn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=TU(i,0,t.time);function i(u){t.state=BM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var d,f,p,m;if(t.state!==BM)return c();for(d in r)if(m=r[d],m.name===t.name){if(m.state===Iv)return $M(a);m.state===PM?(m.state=$v,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+dqk&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function kVn(e,n,t){var r,s,i=wVn(n)?e7:Qc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function SVn(e,n){var t=this._id;return arguments.length<2?Xo(this.node(),t).on.on(e):this.each(kVn(t,e,n))}function CVn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function EVn(){return this.on("end.remove",CVn(this._id))}function NVn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=QC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function ZVn(e,{sourceEvent:n,target:t,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function $l(e,n,t){this.k=e,this.x=n,this.y=t}$l.prototype={constructor:$l,scale:function(e){return e===1?this:new $l(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new $l(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gx=new $l(1,0,0);LU.prototype=$l.prototype;function LU(e){for(;!e.__zoom;)if(!(e=e.parentNode))return gx;return e.__zoom}function Q4(e){e.stopImmediatePropagation()}function x0(e){e.preventDefault(),e.stopImmediatePropagation()}function JVn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function eKn(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function FM(){return this.__zoom||gx}function tKn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function nKn(){return navigator.maxTouchPoints||"ontouchstart"in this}function rKn(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],i=e.invertY(n[0][1])-t[0][1],a=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function IU(){var e=JVn,n=eKn,t=rKn,r=tKn,s=nKn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=Lv,u=dx("start","zoom","end"),d,f,p,m=500,w=150,k=0,v=10;function y(H){H.property("__zoom",FM).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",L).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(H,Q,K,Z){var ee=H.selection?H.selection():H;ee.property("__zoom",FM),H!==ee?N(H,Q,K,Z):ee.interrupt().each(function(){z(this,arguments).event(Z).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},y.scaleBy=function(H,Q,K,Z){y.scaleTo(H,function(){var ee=this.__zoom.k,$=typeof Q=="function"?Q.apply(this,arguments):Q;return ee*$},K,Z)},y.scaleTo=function(H,Q,K,Z){y.transform(H,function(){var ee=n.apply(this,arguments),$=this.__zoom,I=K==null?C(ee):typeof K=="function"?K.apply(this,arguments):K,F=$.invert(I),q=typeof Q=="function"?Q.apply(this,arguments):Q;return t(b(x($,q),I,F),ee,a)},K,Z)},y.translateBy=function(H,Q,K,Z){y.transform(H,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof K=="function"?K.apply(this,arguments):K),n.apply(this,arguments),a)},null,Z)},y.translateTo=function(H,Q,K,Z,ee){y.transform(H,function(){var $=n.apply(this,arguments),I=this.__zoom,F=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(gx.translate(F[0],F[1]).scale(I.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof K=="function"?-K.apply(this,arguments):-K),$,a)},Z,ee)};function x(H,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===H.k?H:new $l(Q,H.x,H.y)}function b(H,Q,K){var Z=Q[0]-K[0]*H.k,ee=Q[1]-K[1]*H.k;return Z===H.x&&ee===H.y?H:new $l(H.k,Z,ee)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function N(H,Q,K,Z){H.on("start.zoom",function(){z(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(Z).end()}).tween("zoom",function(){var ee=this,$=arguments,I=z(ee,$).event(Z),F=n.apply(ee,$),q=K==null?C(F):typeof K=="function"?K.apply(ee,$):K,V=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ie=ee.__zoom,oe=typeof Q=="function"?Q.apply(ee,$):Q,ce=c(ie.invert(q).concat(V/ie.k),oe.invert(q).concat(V/oe.k));return function(ne){if(ne===1)ne=oe;else{var G=ce(ne),ae=V/G[2];ne=new $l(ae,q[0]-G[0]*ae,q[1]-G[1]*ae)}I.zoom(null,ne)}})}function z(H,Q,K){return!K&&H.__zooming||new A(H,Q)}function A(H,Q){this.that=H,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(H,Q),this.taps=0}A.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,Q){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Q=Na(this.that).datum();u.call(H,this.that,new ZVn(H,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),Q)}};function j(H,...Q){if(!e.apply(this,arguments))return;var K=z(this,Q).event(H),Z=this.__zoom,ee=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=$o(H);if(K.wheel)(K.mouse[0][0]!==$[0]||K.mouse[0][1]!==$[1])&&(K.mouse[1]=Z.invert(K.mouse[0]=$)),clearTimeout(K.wheel);else{if(Z.k===ee)return;K.mouse=[$,Z.invert($)],Bv(this),K.start()}x0(H),K.wheel=setTimeout(I,w),K.zoom("mouse",t(b(x(Z,ee),K.mouse[0],K.mouse[1]),K.extent,a));function I(){K.wheel=null,K.end()}}function M(H,...Q){if(p||!e.apply(this,arguments))return;var K=H.currentTarget,Z=z(this,Q,!0).event(H),ee=Na(H.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",V,!0),$=$o(H,K),I=H.clientX,F=H.clientY;yU(H.view),Q4(H),Z.mouse=[$,this.__zoom.invert($)],Bv(this),Z.start();function q(ie){if(x0(ie),!Z.moved){var oe=ie.clientX-I,ce=ie.clientY-F;Z.moved=oe*oe+ce*ce>k}Z.event(ie).zoom("mouse",t(b(Z.that.__zoom,Z.mouse[0]=$o(ie,K),Z.mouse[1]),Z.extent,a))}function V(ie){ee.on("mousemove.zoom mouseup.zoom",null),xU(ie.view,Z.moved),x0(ie),Z.event(ie).end()}}function D(H,...Q){if(e.apply(this,arguments)){var K=this.__zoom,Z=$o(H.changedTouches?H.changedTouches[0]:H,this),ee=K.invert(Z),$=K.k*(H.shiftKey?.5:2),I=t(b(x(K,$),Z,ee),n.apply(this,Q),a);x0(H),o>0?Na(this).transition().duration(o).call(N,I,Z,H):Na(this).call(y.transform,I,Z,H)}}function L(H,...Q){if(e.apply(this,arguments)){var K=H.touches,Z=K.length,ee=z(this,Q,H.changedTouches.length===Z).event(H),$,I,F,q;for(Q4(H),I=0;I`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:t,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?t:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Cm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],$U=["Enter"," ","Escape"],BU={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:t})=>`Moved selected node ${e}. New position, x: ${n}, y: ${t}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Yh;(function(e){e.Strict="strict",e.Loose="loose"})(Yh||(Yh={}));var kf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(kf||(kf={}));var Em;(function(e){e.Partial="partial",e.Full="full"})(Em||(Em={}));const PU={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var $u;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($u||($u={}));var Kb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Kb||(Kb={}));var It;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(It||(It={}));const HM={[It.Left]:It.Right,[It.Right]:It.Left,[It.Top]:It.Bottom,[It.Bottom]:It.Top};function FU(e){return e===null?null:e?"valid":"invalid"}const HU=e=>"id"in e&&"source"in e&&"target"in e,sKn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),n7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),mg=(e,n=[0,0])=>{const{width:t,height:r}=Yl(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},iKn=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const t=e.reduce((r,s)=>{const i=typeof s=="string";let a=!n.nodeLookup&&!i?s:void 0;n.nodeLookup&&(a=i?n.nodeLookup.get(s):n7(s)?s:n.nodeLookup.get(s.id));const o=a?Wb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return vx(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return bx(t)},gg=(e,n={})=>{let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(n.filter===void 0||n.filter(s))&&(t=vx(t,Wb(s)),r=!0)}),r?bx(t):{x:0,y:0,width:0,height:0}},r7=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,c=(n.y-r)/s,u=n.width/s,d=n.height/s,f=[];for(const p of e.values()){const{measured:m,selectable:w=!0,hidden:k=!1}=p;if(a&&!w||k)continue;const v=m.width??p.width??p.initialWidth??0,y=m.height??p.height??p.initialHeight??0,{x,y:b}=p.internals.positionAbsolute,C=VU(o,c,u,d,x,b,v,y),N=v*y,z=i&&C>0;(!p.internals.handleBounds||z||C>=N||p.dragging)&&f.push(p)}return f},aKn=(e,n)=>{const t=new Set;return e.forEach(r=>{t.add(r.id)}),n.filter(r=>t.has(r.source)||t.has(r.target))};function oKn(e,n){const t=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&t.set(s.id,s)}),t}async function cKn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=oKn(e,a),c=gg(o),u=i7(c,n,t,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await r.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function qU({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:i}){const a=t.get(e),o=a.parentId?t.get(a.parentId):void 0,{x:c,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},d=a.origin??r;let f=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",Wo.error005());else{const m=o.measured.width,w=o.measured.height;m&&w&&(f=[[c,u],[c+m,u+w]])}else o&&Ff(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=Ff(f)?Pf(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",Wo.error015())),{position:{x:p.x-c+(a.measured.width??0)*d[0],y:p.y-u+(a.measured.height??0)*d[1]},positionAbsolute:p}}async function lKn({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of t){if(p.deletable===!1)continue;const m=i.has(p.id),w=!m&&p.parentId&&a.find(k=>k.id===p.parentId);(m||w)&&a.push(p)}const o=new Set(n.map(p=>p.id)),c=r.filter(p=>p.deletable!==!1),d=aKn(a,c);for(const p of c)o.has(p.id)&&!d.find(w=>w.id===p.id)&&d.push(p);if(!s)return{edges:d,nodes:a};const f=await s({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const Zh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Pf=(e={x:0,y:0},n,t)=>({x:Zh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:Zh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function UU(e,n,t){const{width:r,height:s}=Yl(t),{x:i,y:a}=t.internals.positionAbsolute;return Pf(e,[[i,a],[i+r,a+s]],n)}const qM=(e,n,t)=>et?-Zh(Math.abs(e-t),1,n)/n:0,s7=(e,n,t=15,r=40)=>{const s=qM(e.x,r,n.width-r)*t,i=qM(e.y,r,n.height-r)*t;return[s,i]},vx=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Gk=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),bx=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),Nm=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=n7(e)?e.internals.positionAbsolute:mg(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Wb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=n7(e)?e.internals.positionAbsolute:mg(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},GU=(e,n)=>bx(vx(Gk(e),Gk(n))),VU=(e,n,t,r,s,i,a,o)=>{const c=Math.max(0,Math.min(e+t,s+a)-Math.max(e,s)),u=Math.max(0,Math.min(n+r,i+o)-Math.max(n,i));return Math.ceil(c*u)},Qb=(e,n)=>VU(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),UM=e=>qo(e.width)&&qo(e.height)&&qo(e.x)&&qo(e.y),qo=e=>!isNaN(e)&&isFinite(e),KU=(e,n)=>(t,r)=>{},vg=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),bg=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?vg(o,a):o},Jh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Ud(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(n*t*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function uKn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Ud(e,t),s=Ud(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Ud(e.top??e.y??0,t),s=Ud(e.bottom??e.y??0,t),i=Ud(e.left??e.x??0,n),a=Ud(e.right??e.x??0,n);return{top:r,right:a,bottom:s,left:i,x:i+a,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function _Kn(e,n,t,r,s,i){const{x:a,y:o}=Jh(e,[n,t,r]),{x:c,y:u}=Jh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),d=s-c,f=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(d),bottom:Math.floor(f)}}const i7=(e,n,t,r,s,i)=>{const a=uKn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),d=Zh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*d,w=t/2-p*d,k=_Kn(e,m,w,d,n,t),v={left:Math.min(k.left-a.left,0),top:Math.min(k.top-a.top,0),right:Math.min(k.right-a.right,0),bottom:Math.min(k.bottom-a.bottom,0)};return{x:m-v.left+v.right,y:w-v.top+v.bottom,zoom:d}},zm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ff(e){return e!=null&&e!=="parent"}function Yl(e){var n,t;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight??0}}function WU(e){var n,t;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight)!==void 0}function QU(e,n={width:0,height:0},t,r,s){const i={...e},a=r.get(t);if(a){const o=a.origin||s;i.x+=a.internals.positionAbsolute.x-(n.width??0)*o[0],i.y+=a.internals.positionAbsolute.y-(n.height??0)*o[1]}return i}function GM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function fKn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function dKn(e){return{...BU,...e||{}}}function G0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=Uo(e),o=bg({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?vg(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const a7=e=>({width:e.offsetWidth,height:e.offsetHeight}),XU=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},hKn=["INPUT","SELECT","TEXTAREA"];function YU(e){var r,s;const n=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:hKn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const ZU=e=>"clientX"in e,Uo=(e,n)=>{var i,a;const t=ZU(e),r=t?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=t?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},VM=(e,n,t,r,s)=>{const i=n.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const o=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,...a7(a)}})};function JU({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const c=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,d=Math.abs(c-e),f=Math.abs(u-n);return[c,u,d,f]}function ov(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function KM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case It.Left:return[n-ov(n-r,i),t];case It.Right:return[n+ov(r-n,i),t];case It.Top:return[n,t-ov(t-s,i)];case It.Bottom:return[n,t+ov(s-t,i)]}}function eG({sourceX:e,sourceY:n,sourcePosition:t=It.Bottom,targetX:r,targetY:s,targetPosition:i=It.Top,curvature:a=.25}){const[o,c]=KM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,d]=KM({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[f,p,m,w]=JU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${n} C${o},${c} ${u},${d} ${r},${s}`,f,p,m,w]}function tG({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const gKn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,vKn=(e,n)=>n.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),bKn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",Wo.error006()),n;const r=t.getEdgeId||gKn;let s;return HU(e)?s={...e}:s={...e,id:r(e)},vKn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function nG({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=tG({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const WM={[It.Left]:{x:-1,y:0},[It.Right]:{x:1,y:0},[It.Top]:{x:0,y:-1},[It.Bottom]:{x:0,y:1}},yKn=({source:e,sourcePosition:n=It.Bottom,target:t})=>n===It.Left||n===It.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function xKn({source:e,sourcePosition:n=It.Bottom,target:t,targetPosition:r=It.Top,center:s,offset:i,stepPosition:a}){const o=WM[n],c=WM[r],u={x:e.x+o.x*i,y:e.y+o.y*i},d={x:t.x+c.x*i,y:t.y+c.y*i},f=yKn({source:u,sourcePosition:n,target:d}),p=f.x!==0?"x":"y",m=f[p];let w=[],k,v;const y={x:0,y:0},x={x:0,y:0},[,,b,C]=tG({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*c[p]===-1){p==="x"?(k=s.x??u.x+(d.x-u.x)*a,v=s.y??(u.y+d.y)/2):(k=s.x??(u.x+d.x)/2,v=s.y??u.y+(d.y-u.y)*a);const j=[{x:k,y:u.y},{x:k,y:d.y}],M=[{x:u.x,y:v},{x:d.x,y:v}];o[p]===m?w=p==="x"?j:M:w=p==="x"?M:j}else{const j=[{x:u.x,y:d.y}],M=[{x:d.x,y:u.y}];if(p==="x"?w=o.x===m?M:j:w=o.y===m?j:M,n===r){const H=Math.abs(e[p]-t[p]);if(H<=i){const Q=Math.min(i-1,i-H);o[p]===m?y[p]=(u[p]>e[p]?-1:1)*Q:x[p]=(d[p]>t[p]?-1:1)*Q}}if(n!==r){const H=p==="x"?"y":"x",Q=o[p]===c[H],K=u[H]>d[H],Z=u[H]=U?(k=(D.x+L.x)/2,v=w[0].y):(k=w[0].x,v=(D.y+L.y)/2)}const N={x:u.x+y.x,y:u.y+y.y},z={x:d.x+x.x,y:d.y+x.y};return[[e,...N.x!==w[0].x||N.y!==w[0].y?[N]:[],...w,...z.x!==w[w.length-1].x||z.y!==w[w.length-1].y?[z]:[],t],k,v,b,C]}function wKn(e,n,t,r){const s=Math.min(QM(e,n)/2,QM(n,t)/2,r),{x:i,y:a}=n;if(e.x===i&&i===t.x||e.y===a&&a===t.y)return`L${i} ${a}`;if(e.y===a){const u=e.xt.id===n):e[0])||null}function Kk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function SKn(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const i=new Set;return e.reduce((a,o)=>([o.markerStart||r,o.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const u=Kk(c,n);i.has(u)||(a.push({id:u,color:c.color||t,...c}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const rG=1e3,CKn=10,o7={nodeOrigin:[0,0],nodeExtent:Cm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},EKn={...o7,checkEquality:!0};function c7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function NKn(e,n,t){const r=c7(o7,t);for(const s of e.values())if(s.parentId)u7(s,e,n,r);else{const i=mg(s,r.nodeOrigin),a=Ff(s.extent)?s.extent:r.nodeExtent,o=Pf(i,a,Yl(s));s.internals.positionAbsolute=o}}function zKn(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const t=[],r=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?t.push(i):s.type==="target"&&r.push(i)}return{source:t,target:r}}function l7(e){return e==="manual"}function Wk(e,n,t,r={}){var d,f;const s=c7(EKn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!l7(s.zIndexMode)?rG:0;let c=e.length>0,u=!1;n.clear(),t.clear();for(const p of e){let m=a.get(p.id);if(s.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const w=mg(p,s.nodeOrigin),k=Ff(p.extent)?p.extent:s.nodeExtent,v=Pf(w,k,Yl(p));m={...s.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:zKn(p,m),z:sG(p,o,s.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(c=!1),p.parentId&&u7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function jKn(e,n){if(!e.parentId)return;const t=n.get(e.parentId);t?t.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function u7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=c7(o7,r),u=e.parentId,d=n.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}jKn(e,t),s&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++s.i,d.internals.z=d.internals.z+s.i*CKn),s&&d.internals.rootParentIndex!==void 0&&(s.i=d.internals.rootParentIndex);const f=i&&!l7(c)?rG:0,{x:p,y:m,z:w}=AKn(e,d,a,o,f,c),{positionAbsolute:k}=e.internals,v=p!==k.x||m!==k.y;(v||w!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:p,y:m}:k,z:w}})}function sG(e,n,t){const r=qo(e.zIndex)?e.zIndex:0;return l7(t)?r:r+(e.selected?n:0)}function AKn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=Yl(e),u=mg(e,t),d=Ff(e.extent)?Pf(u,e.extent,c):u;let f=Pf({x:a+d.x,y:o+d.y},r,c);e.extent==="parent"&&(f=UU(f,c,n));const p=sG(e,s,i),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function _7(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const c=n.get(o.parentId);if(!c)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??Nm(c),d=GU(u,o.rect);i.set(o.parentId,{expandedRect:d,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var b;const d=c.internals.positionAbsolute,f=Yl(c),p=c.origin??r,m=o.x0||w>0||y||x)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+y,y:c.position.y-w+x}}),(b=t.get(u))==null||b.forEach(C=>{e.some(N=>N.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+w}})})),(f.width0){const m=_7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function RKn({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:i}){if(!n||!e.x&&!e.y)return!1;const a=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,i]],r);return!!a&&(a.x!==t[0]||a.y!==t[1]||a.k!==t[2])}function JM(e,n,t,r,s,i){let a=s;const o=r.get(a)||new Map;r.set(a,o.set(t,n)),a=`${s}-${e}`;const c=r.get(a)||new Map;if(r.set(a,c.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function iG(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,c={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,d=`${i}-${o}--${s}-${a}`;JM("source",c,d,e,s,a),JM("target",c,u,e,i,o),n.set(r.id,r)}}function aG(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:aG(t,n):!1}function eO(e,n,t){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,n))return!0;if(r===t)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function MKn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!aG(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const o=e.get(i);o&&s.set(i,{id:i,position:o.position||{x:0,y:0},distance:{x:t.x-o.internals.positionAbsolute.x,y:t.y-o.internals.positionAbsolute.y},extent:o.extent,parentId:o.parentId,origin:o.origin,expandParent:o.expandParent,internals:{positionAbsolute:o.internals.positionAbsolute||{x:0,y:0}},measured:{width:o.measured.width??0,height:o.measured.height??0}})}return s}function X4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,d]of n){const f=(a=t.get(u))==null?void 0:a.internals.userNode;f&&s.push({...f,position:d.position,dragging:r})}if(!e)return[s[0],s];const i=(o=t.get(e))==null?void 0:o.internals.userNode;return[i?{...i,position:((c=n.get(e))==null?void 0:c.position)||i.position,dragging:r}:s[0],s]}function OKn({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const i={x:t-s.distance.x,y:r-s.distance.y},a=vg(i,n);return{x:a.x-i.x,y:a.y-i.y}}function DKn({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,c=!1,u={x:0,y:0},d=null,f=!1,p=null,m=!1,w=!1,k=null;function v({noDragClassName:x,handleSelector:b,domNode:C,isSelectable:N,nodeId:z,nodeClickDistance:A=0}){p=Na(C);function j({x:B,y:U}){const{nodeLookup:H,nodeExtent:Q,snapGrid:K,snapToGrid:Z,nodeOrigin:ee,onNodeDrag:$,onSelectionDrag:I,onError:F,updateNodePositions:q}=n();i={x:B,y:U};let V=!1;const ie=o.size>1,oe=ie&&Q?Gk(gg(o)):null,ce=ie&&Z?OKn({dragItems:o,snapGrid:K,x:B,y:U}):null;for(const[ne,G]of o){if(!H.has(ne))continue;let ae={x:B-G.distance.x,y:U-G.distance.y};Z&&(ae=ce?{x:Math.round(ae.x+ce.x),y:Math.round(ae.y+ce.y)}:vg(ae,K));let le=null;if(ie&&Q&&!G.extent&&oe){const{positionAbsolute:Ee}=G.internals,Fe=Ee.x-oe.x+Q[0][0],We=Ee.x+G.measured.width-oe.x2+Q[1][0],Oe=Ee.y-oe.y+Q[0][1],He=Ee.y+G.measured.height-oe.y2+Q[1][1];le=[[Fe,Oe],[We,He]]}const{position:me,positionAbsolute:ve}=qU({nodeId:ne,nextPosition:ae,nodeLookup:H,nodeExtent:le||Q,nodeOrigin:ee,onError:F});V=V||G.position.x!==me.x||G.position.y!==me.y,G.position=me,G.internals.positionAbsolute=ve}if(w=w||V,!!V&&(q(o,!0),k&&(r||$||!z&&I))){const[ne,G]=X4({nodeId:z,dragItems:o,nodeLookup:H});r==null||r(k,o,ne,G),$==null||$(k,ne,G),z||I==null||I(k,G)}}async function M(){if(!d)return;const{transform:B,panBy:U,autoPanSpeed:H,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[K,Z]=s7(u,d,H);(K!==0||Z!==0)&&(i.x=(i.x??0)-K/B[2],i.y=(i.y??0)-Z/B[2],await U({x:K,y:Z})&&j(i)),a=requestAnimationFrame(M)}function D(B){var ie;const{nodeLookup:U,multiSelectionActive:H,nodesDraggable:Q,transform:K,snapGrid:Z,snapToGrid:ee,selectNodesOnDrag:$,onNodeDragStart:I,onSelectionDragStart:F,unselectNodesAndEdges:q}=n();f=!0,(!$||!N)&&!H&&z&&((ie=U.get(z))!=null&&ie.selected||q()),N&&$&&z&&(e==null||e(z));const V=G0(B.sourceEvent,{transform:K,snapGrid:Z,snapToGrid:ee,containerBounds:d});if(i=V,o=MKn(U,Q,V,z),o.size>0&&(t||I||!z&&F)){const[oe,ce]=X4({nodeId:z,dragItems:o,nodeLookup:U});t==null||t(B.sourceEvent,o,oe,ce),I==null||I(B.sourceEvent,oe,ce),z||F==null||F(B.sourceEvent,ce)}}const L=wU().clickDistance(A).on("start",B=>{const{domNode:U,nodeDragThreshold:H,transform:Q,snapGrid:K,snapToGrid:Z}=n();d=(U==null?void 0:U.getBoundingClientRect())||null,m=!1,w=!1,k=B.sourceEvent,H===0&&D(B),i=G0(B.sourceEvent,{transform:Q,snapGrid:K,snapToGrid:Z,containerBounds:d}),u=Uo(B.sourceEvent,d)}).on("drag",B=>{const{autoPanOnNodeDrag:U,transform:H,snapGrid:Q,snapToGrid:K,nodeDragThreshold:Z,nodeLookup:ee}=n(),$=G0(B.sourceEvent,{transform:H,snapGrid:Q,snapToGrid:K,containerBounds:d});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||z&&!ee.has(z))&&(m=!0),!m){if(!c&&U&&f&&(c=!0,M()),!f){const I=Uo(B.sourceEvent,d),F=I.x-u.x,q=I.y-u.y;Math.sqrt(F*F+q*q)>Z&&D(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&f&&(u=Uo(B.sourceEvent,d),j($))}}).on("end",B=>{if(!f||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(c=!1,f=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:U,updateNodePositions:H,onNodeDragStop:Q,onSelectionDragStop:K}=n();if(w&&(H(o,!1),w=!1),s||Q||!z&&K){const[Z,ee]=X4({nodeId:z,dragItems:o,nodeLookup:U,dragging:!1});s==null||s(B.sourceEvent,o,Z,ee),Q==null||Q(B.sourceEvent,Z,ee),z||K==null||K(B.sourceEvent,ee)}}}).filter(B=>{const U=B.target;return!B.button&&(!x||!eO(U,`.${x}`,C))&&(!b||eO(U,b,C))});p.call(L)}function y(){p==null||p.on(".drag",null)}return{update:v,destroy:y}}function LKn(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const i of n.values())Qb(s,Nm(i))>0&&r.push(i);return r}const IKn=250;function $Kn(e,n,t,r){var o,c;let s=[],i=1/0;const a=LKn(e,t,n+IKn);for(const u of a){const d=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=Hf(u,f,f.position,!0),w=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));w>n||(w1){const u=r.type==="source"?"target":"source";return s.find(d=>d.type===u)??s[0]}return s[0]}function oG(e,n,t,r,s,i=!1){var u,d,f;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((d=a.internals.handleBounds)==null?void 0:d.source)??[],...((f=a.internals.handleBounds)==null?void 0:f.target)??[]],c=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return c&&i?{...c,...Hf(a,c,c.position,!0)}:c}function cG(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function BKn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const lG=()=>!0;function PKn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:m,onConnectStart:w,onConnect:k,onConnectEnd:v,isValidConnection:y=lG,onReconnectEnd:x,updateConnection:b,getTransform:C,getFromHandle:N,autoPanSpeed:z,dragThreshold:A=1,handleDomNode:j}){const M=XU(e.target);let D=0,L;const{x:B,y:U}=Uo(e),H=cG(i,j),Q=o==null?void 0:o.getBoundingClientRect();let K=!1;if(!Q||!H)return;const Z=oG(s,H,r,c,n);if(!Z)return;let ee=Uo(e,Q),$=!1,I=null,F=!1,q=null;function V(){if(!d||!Q)return;const[me,ve]=s7(ee,Q,z);p({x:me,y:ve}),D=requestAnimationFrame(V)}const ie={...Z,nodeId:s,type:H,position:Z.position},oe=c.get(s);let ne={inProgress:!0,isValid:null,from:Hf(oe,ie,It.Left,!0),fromHandle:ie,fromPosition:ie.position,fromNode:oe,to:ee,toHandle:null,toPosition:HM[ie.position],toNode:null,pointer:ee};function G(){K=!0,b(ne),w==null||w(e,{nodeId:s,handleId:r,handleType:H})}A===0&&G();function ae(me){if(!K){const{x:He,y:ht}=Uo(me),xt=He-B,Kt=ht-U;if(!(xt*xt+Kt*Kt>A*A))return;G()}if(!N()||!ie){le(me);return}const ve=C();ee=Uo(me,Q),L=$Kn(bg(ee,ve,!1,[1,1]),t,c,ie),$||(V(),$=!0);const Ee=uG(me,{handle:L,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:y,doc:M,lib:u,flowId:f,nodeLookup:c});q=Ee.handleDomNode,I=Ee.connection,F=BKn(!!L,Ee.isValid);const Fe=c.get(s),We=Fe?Hf(Fe,ie,It.Left,!0):ne.from,Oe={...ne,from:We,isValid:F,to:Ee.toHandle&&F?Jh({x:Ee.toHandle.x,y:Ee.toHandle.y},ve):ee,toHandle:Ee.toHandle,toPosition:F&&Ee.toHandle?Ee.toHandle.position:HM[ie.position],toNode:Ee.toHandle?c.get(Ee.toHandle.nodeId):null,pointer:ee};b(Oe),ne=Oe}function le(me){if(!("touches"in me&&me.touches.length>0)){if(K){(L||q)&&I&&F&&(k==null||k(I));const{inProgress:ve,...Ee}=ne,Fe={...Ee,toPosition:ne.toHandle?ne.toPosition:null};v==null||v(me,Fe),i&&(x==null||x(me,Fe))}m(),cancelAnimationFrame(D),$=!1,F=!1,I=null,q=null,M.removeEventListener("mousemove",ae),M.removeEventListener("mouseup",le),M.removeEventListener("touchmove",ae),M.removeEventListener("touchend",le)}}M.addEventListener("mousemove",ae),M.addEventListener("mouseup",le),M.addEventListener("touchmove",ae),M.addEventListener("touchend",le)}function uG(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=lG,nodeLookup:d}){const f=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:w}=Uo(e),k=a.elementFromPoint(m,w),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,y={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const x=cG(void 0,v),b=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),z=v.classList.contains("connectableend");if(!b||!x)return y;const A={source:f?b:r,sourceHandle:f?C:s,target:f?r:b,targetHandle:f?s:C};y.connection=A;const M=N&&z&&(t===Yh.Strict?f&&x==="source"||!f&&x==="target":b!==r||C!==s);y.isValid=M&&u(A),y.toHandle=oG(b,x,C,d,t,!0)}return y}const Qk={onPointerDown:PKn,isValid:uG};function FKn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Na(e);function i({translateExtent:o,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const w=b=>{if(b.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=b.sourceEvent.ctrlKey&&zm()?10:1,z=-b.sourceEvent.deltaY*(b.sourceEvent.deltaMode===1?.05:b.sourceEvent.deltaMode?1:.002)*d,A=C[2]*Math.pow(2,z*N);n.scaleTo(A)};let k=[0,0];const v=b=>{(b.sourceEvent.type==="mousedown"||b.sourceEvent.type==="touchstart")&&(k=[b.sourceEvent.clientX??b.sourceEvent.touches[0].clientX,b.sourceEvent.clientY??b.sourceEvent.touches[0].clientY])},y=b=>{const C=t();if(b.sourceEvent.type!=="mousemove"&&b.sourceEvent.type!=="touchmove"||!n)return;const N=[b.sourceEvent.clientX??b.sourceEvent.touches[0].clientX,b.sourceEvent.clientY??b.sourceEvent.touches[0].clientY],z=[N[0]-k[0],N[1]-k[1]];k=N;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),j={x:C[0]-z[0]*A,y:C[1]-z[1]*A},M=[[0,0],[c,u]];n.setViewportConstrained({x:j.x,y:j.y,zoom:C[2]},M,o)},x=IU().on("start",v).on("zoom",f?y:null).on("zoom.wheel",p?w:null);s.call(x,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:$o}}const yx=e=>({x:e.x,y:e.y,zoom:e.k}),Y4=({x:e,y:n,zoom:t})=>gx.translate(e,n).scale(t),nh=(e,n)=>e.target.closest(`.${n}`),_G=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),HKn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Z4=(e,n=0,t=HKn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},fG=e=>{const n=e.ctrlKey&&zm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function qKn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(nh(d,n))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(d.ctrlKey&&a){const v=$o(d),y=fG(d),x=f*Math.pow(2,y);r.scaleTo(t,x,v,d);return}const p=d.deltaMode===1?20:1;let m=s===kf.Vertical?0:d.deltaX*p,w=s===kf.Horizontal?0:d.deltaY*p;!zm()&&d.shiftKey&&s!==kf.Vertical&&(m=d.deltaY*p,w=0),r.translateBy(t,-(m/f)*i,-(w/f)*i,{internal:!0});const k=yx(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(d,k))}}function UKn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=nh(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function GKn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=yx(r.transform);e.mouseButton=((a=r.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((o=r.sourceEvent)==null?void 0:o.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function VKn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&_G(n,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||r([i.transform.x,i.transform.y,i.transform.k]),s&&!((o=i.sourceEvent)!=null&&o.internal)&&(s==null||s(i.sourceEvent,yx(i.transform)))}}function KKn({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:i}){return a=>{var o;if(!((o=a.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,i&&_G(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=yx(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function WKn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{var v;const p=e||n,m=t&&f.ctrlKey,w=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(nh(f,`${u}-flow__node`)||nh(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||d&&!w||nh(f,o)&&w||nh(f,c)&&(!w||s&&w&&!e)||!t&&f.ctrlKey&&w)return!1;if(!t&&f.type==="touchstart"&&((v=f.touches)==null?void 0:v.length)>1)return f.preventDefault(),!1;if(!p&&!s&&!m&&w||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const k=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||w)&&k}}function QKn({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=IU().scaleExtent([n,t]).translateExtent(r),p=Na(e).call(f);x({x:s.x,y:s.y,zoom:Zh(s.zoom,n,t)},[[0,0],[d.width,d.height]],r);const m=p.on("wheel.zoom"),w=p.on("dblclick.zoom");f.wheelDelta(fG);async function k(L,B){return p?new Promise(U=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?U0:Lv).transform(Z4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>U(!0)),L)}):!1}function v({noWheelClassName:L,noPanClassName:B,onPaneContextMenu:U,userSelectionActive:H,panOnScroll:Q,panOnDrag:K,panOnScrollMode:Z,panOnScrollSpeed:ee,preventScrolling:$,zoomOnPinch:I,zoomOnScroll:F,zoomOnDoubleClick:q,zoomActivationKeyPressed:V,lib:ie,onTransformChange:oe,connectionInProgress:ce,paneClickDistance:ne,selectionOnDrag:G}){H&&!u.isZoomingOrPanning&&y();const ae=Q&&!V&&!H;f.clickDistance(G?1/0:!qo(ne)||ne<0?0:ne);const le=ae?qKn({zoomPanValues:u,noWheelClassName:L,d3Selection:p,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:ee,zoomOnPinch:I,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):UKn({noWheelClassName:L,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",le,{passive:!1});const me=GKn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",me);const ve=VKn({zoomPanValues:u,panOnDrag:K,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:oe});f.on("zoom",ve);const Ee=KKn({zoomPanValues:u,panOnDrag:K,panOnScroll:Q,onPaneContextMenu:U,onPanZoomEnd:o,onDraggingChange:c});f.on("end",Ee);const Fe=WKn({zoomActivationKeyPressed:V,panOnDrag:K,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:q,zoomOnPinch:I,userSelectionActive:H,noPanClassName:B,noWheelClassName:L,lib:ie,connectionInProgress:ce});f.filter(Fe),q?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function y(){f.on("zoom",null)}async function x(L,B,U){const H=Y4(L),Q=f==null?void 0:f.constrain()(H,B,U);return Q&&await k(Q),Q}async function b(L,B){const U=Y4(L);return await k(U,B),U}function C(L){if(p){const B=Y4(L),U=p.property("__zoom");(U.k!==L.zoom||U.x!==L.x||U.y!==L.y)&&(f==null||f.transform(p,B,null,{sync:!0}))}}function N(){const L=p?LU(p.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}async function z(L,B){return p?new Promise(U=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?U0:Lv).scaleTo(Z4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>U(!0)),L)}):!1}async function A(L,B){return p?new Promise(U=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?U0:Lv).scaleBy(Z4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>U(!0)),L)}):!1}function j(L){f==null||f.scaleExtent(L)}function M(L){f==null||f.translateExtent(L)}function D(L){const B=!qo(L)||L<0?0:L;f==null||f.clickDistance(B)}return{update:v,destroy:y,setViewport:b,setViewportConstrained:x,getViewport:N,scaleTo:z,scaleBy:A,setScaleExtent:j,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var ep;(function(e){e.Line="line",e.Handle="handle"})(ep||(ep={}));function XKn({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,c=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(c[0]=c[0]*-1),o&&i&&(c[1]=c[1]*-1),c}function tO(e){const n=e.includes("right")||e.includes("left"),t=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:n,isVertical:t,affectsX:r,affectsY:s}}function Ru(e,n){return Math.max(0,n-e)}function Mu(e,n){return Math.max(0,e-n)}function cv(e,n,t){return Math.max(0,n-e,e-t)}function nO(e,n){return e?!n:n}function YKn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:d,isVertical:f}=n,p=d&&f,{xSnapped:m,ySnapped:w}=t,{minWidth:k,maxWidth:v,minHeight:y,maxHeight:x}=r,{x:b,y:C,width:N,height:z,aspectRatio:A}=e;let j=Math.floor(d?m-e.pointerX:0),M=Math.floor(f?w-e.pointerY:0);const D=N+(c?-j:j),L=z+(u?-M:M),B=-i[0]*N,U=-i[1]*z;let H=cv(D,k,v),Q=cv(L,y,x);if(a){let ee=0,$=0;c&&j<0?ee=Ru(b+j+B,a[0][0]):!c&&j>0&&(ee=Mu(b+D+B,a[1][0])),u&&M<0?$=Ru(C+M+U,a[0][1]):!u&&M>0&&($=Mu(C+L+U,a[1][1])),H=Math.max(H,ee),Q=Math.max(Q,$)}if(o){let ee=0,$=0;c&&j>0?ee=Mu(b+j,o[0][0]):!c&&j<0&&(ee=Ru(b+D,o[1][0])),u&&M>0?$=Mu(C+M,o[0][1]):!u&&M<0&&($=Ru(C+L,o[1][1])),H=Math.max(H,ee),Q=Math.max(Q,$)}if(s){if(d){const ee=cv(D/A,y,x)*A;if(H=Math.max(H,ee),a){let $=0;!c&&!u||c&&!u&&p?$=Mu(C+U+D/A,a[1][1])*A:$=Ru(C+U+(c?j:-j)/A,a[0][1])*A,H=Math.max(H,$)}if(o){let $=0;!c&&!u||c&&!u&&p?$=Ru(C+D/A,o[1][1])*A:$=Mu(C+(c?j:-j)/A,o[0][1])*A,H=Math.max(H,$)}}if(f){const ee=cv(L*A,k,v)/A;if(Q=Math.max(Q,ee),a){let $=0;!c&&!u||u&&!c&&p?$=Mu(b+L*A+B,a[1][0])/A:$=Ru(b+(u?M:-M)*A+B,a[0][0])/A,Q=Math.max(Q,$)}if(o){let $=0;!c&&!u||u&&!c&&p?$=Ru(b+L*A,o[1][0])/A:$=Mu(b+(u?M:-M)*A,o[0][0])/A,Q=Math.max(Q,$)}}}M=M+(M<0?Q:-Q),j=j+(j<0?H:-H),s&&(p?D>L*A?M=(nO(c,u)?-j:j)/A:j=(nO(c,u)?-M:M)*A:d?(M=j/A,u=c):(j=M*A,c=u));const K=c?b+j:b,Z=u?C+M:C;return{width:N+(c?-j:j),height:z+(u?-M:M),x:i[0]*j*(c?-1:1)+K,y:i[1]*M*(u?-1:1)+Z}}const dG={width:0,height:0,x:0,y:0},ZKn={...dG,pointerX:0,pointerY:0,aspectRatio:1};function JKn(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,o=t[0]*i,c=t[1]*a;return[[r-o,s-c],[r+i-o,s+a-c]]}function eWn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Na(e);let a={controlDirection:tO("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:w,onResizeEnd:k,shouldResize:v}){let y={...dG},x={...ZKn};a={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:tO(u)};let b,C=null,N=[],z,A,j,M=!1;const D=wU().on("start",L=>{const{nodeLookup:B,transform:U,snapGrid:H,snapToGrid:Q,nodeOrigin:K,paneDomNode:Z}=t();if(b=B.get(n),!b)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:ee,ySnapped:$}=G0(L.sourceEvent,{transform:U,snapGrid:H,snapToGrid:Q,containerBounds:C});y={width:b.measured.width??0,height:b.measured.height??0,x:b.position.x??0,y:b.position.y??0},x={...y,pointerX:ee,pointerY:$,aspectRatio:y.width/y.height},z=void 0,A=Ff(b.extent)?b.extent:void 0,b.parentId&&(b.extent==="parent"||b.expandParent)&&(z=B.get(b.parentId)),z&&b.extent==="parent"&&(A=[[0,0],[z.measured.width,z.measured.height]]),N=[],j=void 0;for(const[I,F]of B)if(F.parentId===n&&(N.push({id:I,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const q=JKn(F,b,F.origin??K);j?j=[[Math.min(q[0][0],j[0][0]),Math.min(q[0][1],j[0][1])],[Math.max(q[1][0],j[1][0]),Math.max(q[1][1],j[1][1])]]:j=q}m==null||m(L,{...y})}).on("drag",L=>{const{transform:B,snapGrid:U,snapToGrid:H,nodeOrigin:Q}=t(),K=G0(L.sourceEvent,{transform:B,snapGrid:U,snapToGrid:H,containerBounds:C}),Z=[];if(!b)return;const{x:ee,y:$,width:I,height:F}=y,q={},V=b.origin??Q,{width:ie,height:oe,x:ce,y:ne}=YKn(x,a.controlDirection,K,a.boundaries,a.keepAspectRatio,V,A,j),G=ie!==I,ae=oe!==F,le=ce!==ee&&G,me=ne!==$&&ae;if(!le&&!me&&!G&&!ae)return;if((le||me||V[0]===1||V[1]===1)&&(q.x=le?ce:y.x,q.y=me?ne:y.y,y.x=q.x,y.y=q.y,N.length>0)){const We=ce-ee,Oe=ne-$;for(const He of N)He.position={x:He.position.x-We+V[0]*(ie-I),y:He.position.y-Oe+V[1]*(oe-F)},Z.push(He)}if((G||ae)&&(q.width=G&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ie:y.width,q.height=ae&&(!a.resizeDirection||a.resizeDirection==="vertical")?oe:y.height,y.width=q.width,y.height=q.height),z&&b.expandParent){const We=V[0]*(q.width??0);q.x&&q.x{M&&(k==null||k(L,{...y}),s==null||s({...y}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const tWn={},rO=e=>{let n;const t=new Set,r=(d,f)=>{const p=typeof d=="function"?d(n):d;if(!Object.is(p,n)){const m=n;n=f??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(w=>w(n,m))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>u,subscribe:d=>(t.add(d),()=>t.delete(d)),destroy:()=>{(tWn?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},u=n=e(r,s,c);return c},nWn=e=>e?rO(e):rO,{useDebugValue:rWn}=rt,{useSyncExternalStoreWithSelector:sWn}=TQ,iWn=e=>e;function hG(e,n=iWn,t){const r=sWn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return rWn(r),r}const sO=(e,n)=>{const t=nWn(e),r=(s,i=n)=>hG(t,s,i);return Object.assign(r,t),r},aWn=(e,n)=>e?sO(e,n):sO;function Or(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[r,s]of e)if(!Object.is(s,n.get(r)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(n).length)return!1;for(const r of t)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(e[r],n[r]))return!1;return!0}const xx=T.createContext(null),oWn=xx.Provider,pG=Wo.error001("react");function $n(e,n){const t=T.useContext(xx);if(t===null)throw new Error(pG);return hG(t,e,n)}function Lr(){const e=T.useContext(xx);if(e===null)throw new Error(pG);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const iO={display:"none"},cWn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},mG="react-flow__node-desc",gG="react-flow__edge-desc",lWn="react-flow__aria-live",uWn=e=>e.ariaLiveMessage,_Wn=e=>e.ariaLabelConfig;function fWn({rfId:e}){const n=$n(uWn);return _.jsx("div",{id:`${lWn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:cWn,children:n})}function dWn({rfId:e,disableKeyboardA11y:n}){const t=$n(_Wn);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${mG}-${e}`,style:iO,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${gG}-${e}`,style:iO,children:t["edge.a11yDescription.default"]}),!n&&_.jsx(fWn,{rfId:e})]})}const wx=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return _.jsx("div",{className:Cs(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});wx.displayName="Panel";const aO="https://reactflow.dev?utm_source=attribution";function hWn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:_.jsx(wx,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${aO}`,children:_.jsx("a",{href:aO,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const pWn=e=>{const n=[],t=[];for(const[,r]of e.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&t.push(r);return{selectedNodes:n,selectedEdges:t}},lv=e=>e.id;function mWn(e,n){return Or(e.selectedNodes.map(lv),n.selectedNodes.map(lv))&&Or(e.selectedEdges.map(lv),n.selectedEdges.map(lv))}function gWn({onSelectionChange:e}){const n=Lr(),{selectedNodes:t,selectedEdges:r}=$n(pWn,mWn);return T.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const vWn=e=>!!e.onSelectionChangeHandlers;function bWn({onSelectionChange:e}){const n=$n(vWn);return e||n?_.jsx(gWn,{onSelectionChange:e}):null}const vG=[0,0],yWn={x:0,y:0,zoom:1},xWn=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],oO=[...xWn,"rfId"],wWn=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),cO={translateExtent:Cm,nodeOrigin:vG,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function kWn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=$n(wWn,Or),u=Lr();T.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=cO,o()}),[]);const d=T.useRef(cO);return T.useEffect(()=>{for(const f of oO){const p=e[f],m=d.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?n(p):f==="edges"?t(p):f==="minZoom"?r(p):f==="maxZoom"?s(p):f==="translateExtent"?i(p):f==="nodeExtent"?a(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:dKn(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}d.current=e},oO.map(f=>e[f])),null}function lO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function SWn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=lO(),i=()=>t(s!=null&&s.matches?"dark":"light");return i(),s==null||s.addEventListener("change",i),()=>{s==null||s.removeEventListener("change",i)}},[e]),n!==null?n:(r=lO())!=null&&r.matches?"dark":"light"}const uO=typeof document<"u"?document:null;function jm(e=null,n={target:uO,actInsideInputWithModifier:!0}){const[t,r]=T.useState(!1),s=T.useRef(!1),i=T.useRef(new Set([])),[a,o]=T.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` `).replace(` `,` +`).split(` -`)),d=u.reduce((_,p)=>_.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return T.useEffect(()=>{const c=(n==null?void 0:n.target)??uO,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var v,y;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&YU(m))return!1;const k=fO(m.code,o);if(i.current.add(m[k]),_O(a,i.current,!1)){const x=((y=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:y[0])||m.target,b=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!b)&&m.preventDefault(),r(!0)}},_=m=>{const w=fO(m.code,o);_O(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(m[w]),m.key==="Meta"&&i.current.clear(),s.current=!1},p=()=>{i.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",_),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",_),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function _O(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function fO(e,n){return n.includes(e)?"code":"key"}const nWn=()=>{const e=Dr();return T.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??i},t),!0):!1},getViewport:()=>{const[n,t,r]=e.getState().transform;return{x:n,y:t,zoom:r}},setCenter:async(n,t,r)=>e.getState().setCenter(n,t,r),fitBounds:async(n,t)=>{const{width:r,height:s,minZoom:i,maxZoom:a,panZoom:o}=e.getState(),c=i7(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(c,{duration:t==null?void 0:t.duration,ease:t==null?void 0:t.ease,interpolate:t==null?void 0:t.interpolate}),!0):!1},screenToFlowPosition:(n,t={})=>{const{transform:r,snapGrid:s,snapToGrid:i,domNode:a}=e.getState();if(!a)return n;const{x:o,y:c}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-c},d=t.snapGrid??s,_=t.snapToGrid??i;return vg(u,r,_,d)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Jh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function bG(e,n){const t=[],r=new Map,s=[];for(const i of e)if(i.type==="add"){s.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const a=r.get(i.id);a?a.push(i):r.set(i.id,[i])}for(const i of n){const a=r.get(i.id);if(!a){t.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){t.push({...a[0].item});continue}const o={...i};for(const c of a)rWn(c,o);t.push(o)}return s.length&&s.forEach(i=>{i.index!==void 0?t.splice(i.index,0,{...i.item}):t.push({...i.item})}),t}function rWn(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function sWn(e,n){return bG(e,n)}function iWn(e,n){return bG(e,n)}function X_(e,n){return{id:e,type:"select",selected:n}}function rh(e,n=new Set,t=!1){const r=[];for(const[s,i]of e){const a=n.has(s);!(i.selected===void 0&&!a)&&i.selected!==a&&(t&&(i.selected=a),r.push(X_(i.id,a)))}return r}function dO({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const o=n.get(a.id),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==a&&t.push({id:a.id,item:a,type:"replace"}),c===void 0&&t.push({item:a,type:"add",index:i})}for(const[i]of n)r.get(i)===void 0&&t.push({id:i,type:"remove"});return t}function hO(e){return{id:e.id,type:"remove"}}const aWn=KU();function oWn(e,n,t={}){return XVn(e,n,{...t,onError:t.onError??aWn})}const pO=e=>DVn(e),cWn=e=>HU(e);function yG(e){return T.forwardRef(e)}const lWn=typeof window<"u"?T.useLayoutEffect:T.useEffect;function mO(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>uWn(()=>t(s=>s+BigInt(1))));return lWn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function uWn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const xG=T.createContext(null);function _Wn({children:e}){const n=Dr(),t=T.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:_,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:w}=n.getState();let k=c;for(const y of o)k=typeof y=="function"?y(k):y;let v=dO({items:k,lookup:p});for(const y of w.values())v=y(v);d&&u(k),v.length>0?_==null||_(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:x,setNodes:b}=n.getState();y&&b(x)})},[]),r=mO(t),s=T.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:_,edgeLookup:p}=n.getState();let m=c;for(const w of o)m=typeof w=="function"?w(m):w;d?u(m):_&&_(dO({items:m,lookup:p}))},[]),i=mO(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return f.jsx(xG.Provider,{value:a,children:e})}function fWn(){const e=T.useContext(xG);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const dWn=e=>!!e.panZoom;function f7(){const e=nWn(),n=Dr(),t=fWn(),r=$n(dWn),s=T.useMemo(()=>{const i=_=>n.getState().nodeLookup.get(_),a=_=>{t.nodeQueue.push(_)},o=_=>{t.edgeQueue.push(_)},c=_=>{var y,x;const{nodeLookup:p,nodeOrigin:m}=n.getState(),w=pO(_)?_:p.get(_.id),k=w.parentId?QU(w.position,w.measured,w.parentId,p,m):w.position,v={...w,position:k,width:((y=w.measured)==null?void 0:y.width)??w.width,height:((x=w.measured)==null?void 0:x.height)??w.height};return Em(v)},u=(_,p,m={replace:!1})=>{a(w=>w.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&pO(v)?v:{...k,...v}}return k}))},d=(_,p,m={replace:!1})=>{o(w=>w.map(k=>{if(k.id===_){const v=typeof p=="function"?p(k):p;return m.replace&&cWn(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(_=>({..._})),getNode:_=>{var p;return(p=i(_))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:_=[]}=n.getState();return _.map(p=>({...p}))},getEdge:_=>n.getState().edgeLookup.get(_),setNodes:a,setEdges:o,addNodes:_=>{const p=Array.isArray(_)?_:[_];t.nodeQueue.push(m=>[...m,...p])},addEdges:_=>{const p=Array.isArray(_)?_:[_];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:_=[],edges:p=[],transform:m}=n.getState(),[w,k,v]=m;return{nodes:_.map(y=>({...y})),edges:p.map(y=>({...y})),viewport:{x:w,y:k,zoom:v}}},deleteElements:async({nodes:_=[],edges:p=[]})=>{const{nodes:m,edges:w,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:y,triggerEdgeChanges:x,onDelete:b,onBeforeDelete:C}=n.getState(),{nodes:N,edges:z}=await PVn({nodesToRemove:_,edgesToRemove:p,nodes:m,edges:w,onBeforeDelete:C}),A=z.length>0,j=N.length>0;if(A){const M=z.map(hO);v==null||v(z),x(M)}if(j){const M=N.map(hO);k==null||k(N),y(M)}return(j||A)&&(b==null||b({nodes:N,edges:z})),{deletedNodes:N,deletedEdges:z}},getIntersectingNodes:(_,p=!0,m)=>{const w=UM(_),k=w?_:c(_),v=m!==void 0;return k?(m||n.getState().nodes).filter(y=>{const x=n.getState().nodeLookup.get(y.id);if(x&&!w&&(y.id===_.id||!x.internals.positionAbsolute))return!1;const b=Em(v?y:x),C=Wb(b,k);return p&&C>0||C>=b.width*b.height||C>=k.width*k.height}):[]},isNodeIntersecting:(_,p,m=!0)=>{const k=UM(_)?_:c(_);if(!k)return!1;const v=Wb(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(_,p,m={replace:!1})=>{u(_,w=>{const k=typeof p=="function"?p(w):p;return m.replace?{...w,data:k}:{...w,data:{...w.data,...k}}},m)},updateEdge:d,updateEdgeData:(_,p,m={replace:!1})=>{d(_,w=>{const k=typeof p=="function"?p(w):p;return m.replace?{...w,data:k}:{...w,data:{...w.data,...k}}},m)},getNodesBounds:_=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return LVn(_,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:_,id:p,nodeId:m})=>{var w;return Array.from(((w=n.getState().connectionLookup.get(`${m}-${_}${p?`-${p}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:_,handleId:p,nodeId:m})=>{var w;return Array.from(((w=n.getState().connectionLookup.get(`${m}${_?p?`-${_}-${p}`:`-${_}`:""}`))==null?void 0:w.values())??[])},fitView:async _=>{const p=n.getState().fitViewResolver??qVn();return n.setState({fitViewQueued:!0,fitViewOptions:_,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return T.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const gO=e=>e.selected,hWn=typeof window<"u"?window:void 0;function pWn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Dr(),{deleteElements:r}=f7(),s=zm(e,{actInsideInputWithModifier:!1}),i=zm(n,{target:hWn});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(gO),edges:a.filter(gO)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function mWn(e){const n=Dr();T.useEffect(()=>{const t=()=>{var s,i,a,o;if(!e.current||!(((i=(s=e.current).checkVisibility)==null?void 0:i.call(s))??!0))return!1;const r=a7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",Wo.error004())),n.setState({width:r.width||500,height:r.height||500})};if(e.current){t(),window.addEventListener("resize",t);const r=new ResizeObserver(()=>t());return r.observe(e.current),()=>{window.removeEventListener("resize",t),r&&e.current&&r.unobserve(e.current)}}},[])}const wx={position:"absolute",width:"100%",height:"100%",top:0,left:0},gWn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function vWn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=kf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:_,zoomActivationKeyCode:p,preventScrolling:m=!0,children:w,noWheelClassName:k,noPanClassName:v,onViewportChange:y,isControlledViewport:x,paneClickDistance:b,selectionOnDrag:C}){const N=Dr(),z=T.useRef(null),{userSelectionActive:A,lib:j,connectionInProgress:M}=$n(gWn,Mr),D=zm(p),L=T.useRef();mWn(z);const B=T.useCallback(U=>{y==null||y({x:U[0],y:U[1],zoom:U[2]}),x||N.setState({transform:U})},[y,x]);return T.useEffect(()=>{if(z.current){L.current=EKn({domNode:z.current,minZoom:d,maxZoom:_,translateExtent:u,viewport:c,onDraggingChange:K=>N.setState(Z=>Z.paneDragging===K?Z:{paneDragging:K}),onPanZoomStart:(K,Z)=>{const{onViewportChangeStart:ee,onMoveStart:$}=N.getState();$==null||$(K,Z),ee==null||ee(Z)},onPanZoom:(K,Z)=>{const{onViewportChange:ee,onMove:$}=N.getState();$==null||$(K,Z),ee==null||ee(Z)},onPanZoomEnd:(K,Z)=>{const{onViewportChangeEnd:ee,onMoveEnd:$}=N.getState();$==null||$(K,Z),ee==null||ee(Z)}});const{x:U,y:H,zoom:Q}=L.current.getViewport();return N.setState({panZoom:L.current,transform:[U,H,Q],domNode:z.current.closest(".react-flow")}),()=>{var K;(K=L.current)==null||K.destroy()}}},[]),T.useEffect(()=>{var U;(U=L.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:v,userSelectionActive:A,noWheelClassName:k,lib:j,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:b})},[e,n,t,r,s,i,a,o,D,m,v,A,k,j,B,M,C,b]),f.jsx("div",{className:"react-flow__renderer",ref:z,style:wx,children:w})}const bWn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function yWn(){const{userSelectionActive:e,userSelectionRect:n}=$n(bWn,Mr);return e&&n?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const J4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},xWn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function wWn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=Cm.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:d,onPaneScroll:_,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:w,children:k}){const v=T.useRef(0),y=Dr(),{userSelectionActive:x,elementsSelectable:b,dragging:C,panBy:N,autoPanSpeed:z}=$n(xWn,Mr),A=b&&(e||x),j=T.useRef(null),M=T.useRef(),D=T.useRef(new Set),L=T.useRef(new Set),B=T.useRef(!1),U=T.useRef(!1),H=T.useRef({x:0,y:0}),Q=T.useRef(!1),K=G=>{if(U.current||B.current||y.getState().connection.inProgress){U.current=!1,B.current=!1;return}u==null||u(G),y.getState().resetSelectedElements(),y.setState({nodesSelectionActive:!1})},Z=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}d==null||d(G)},ee=_?G=>_(G):void 0,$=G=>{U.current&&(G.stopPropagation(),U.current=!1)},I=G=>{var Ue,dt;const{domNode:ae,transform:le}=y.getState();if(M.current=ae==null?void 0:ae.getBoundingClientRect(),!M.current)return;const ge=G.target===j.current;if(!ge&&!!G.target.closest(".nokey")||!e||!(a&&ge||n)||G.button!==0||!G.isPrimary)return;(dt=(Ue=G.target)==null?void 0:Ue.setPointerCapture)==null||dt.call(Ue,G.pointerId),U.current=!1;const{x:Fe,y:Ye}=Uo(G.nativeEvent,M.current),Me=vg({x:Fe,y:Ye},le);y.setState({userSelectionRect:{width:0,height:0,startX:Me.x,startY:Me.y,x:Fe,y:Ye}}),ge||(G.stopPropagation(),G.preventDefault())};function F(G,ae){const{userSelectionRect:le}=y.getState();if(!le)return;const{transform:ge,nodeLookup:be,edgeLookup:Ee,connectionLookup:Fe,triggerNodeChanges:Ye,triggerEdgeChanges:Me,defaultEdgeOptions:Ue}=y.getState(),dt={x:le.startX,y:le.startY},{x:wt,y:Ft}=Jh(dt,ge),Ht={startX:dt.x,startY:dt.y,x:GCe.id)),L.current=new Set;const ot=(Ue==null?void 0:Ue.selectable)??!0;for(const Ce of D.current){const me=Fe.get(Ce);if(me)for(const{edgeId:ze}of me.values()){const He=Ee.get(ze);He&&(He.selectable??ot)&&L.current.add(ze)}}if(!GM(qt,D.current)){const Ce=rh(be,D.current,!0);Ye(Ce)}if(!GM($e,L.current)){const Ce=rh(Ee,L.current);Me(Ce)}y.setState({userSelectionRect:Ht,userSelectionActive:!0,nodesSelectionActive:!1})}function q(){if(!s||!M.current)return;const[G,ae]=s7(H.current,M.current,z);N({x:G,y:ae}).then(le=>{if(!U.current||!le){v.current=requestAnimationFrame(q);return}const{x:ge,y:be}=H.current;F(ge,be),v.current=requestAnimationFrame(q)})}const V=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};T.useEffect(()=>()=>V(),[]);const ie=G=>{const{userSelectionRect:ae,transform:le,resetSelectedElements:ge}=y.getState();if(!M.current||!ae)return;const{x:be,y:Ee}=Uo(G.nativeEvent,M.current);H.current={x:be,y:Ee};const Fe=Jh({x:ae.startX,y:ae.startY},le);if(!U.current){const Ye=n?0:i;if(Math.hypot(be-Fe.x,Ee-Fe.y)<=Ye)return;ge(),o==null||o(G)}U.current=!0,Q.current||(q(),Q.current=!0),F(be,Ee)},oe=G=>{var ae,le;if(!A){G.target===j.current&&y.getState().connection.inProgress&&(B.current=!0);return}G.button===0&&((le=(ae=G.target)==null?void 0:ae.releasePointerCapture)==null||le.call(ae,G.pointerId),!x&&G.target===j.current&&y.getState().userSelectionRect&&(K==null||K(G)),y.setState({userSelectionActive:!1,userSelectionRect:null}),U.current&&(c==null||c(G),y.setState({nodesSelectionActive:D.current.size>0})),V())},ce=G=>{var ae,le;(le=(ae=G.target)==null?void 0:ae.releasePointerCapture)==null||le.call(ae,G.pointerId),V()},ne=r===!0||Array.isArray(r)&&r.includes(0);return f.jsxs("div",{className:Cs(["react-flow__pane",{draggable:ne,dragging:C,selection:e}]),onClick:A?void 0:J4(K,j),onContextMenu:J4(Z,j),onWheel:J4(ee,j),onPointerEnter:A?void 0:p,onPointerMove:A?ie:m,onPointerUp:oe,onPointerCancel:A?ce:void 0,onPointerDownCapture:A?I:void 0,onClickCapture:A?$:void 0,onPointerLeave:w,ref:j,style:wx,children:[k,f.jsx(yWn,{})]})}function Xk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:c}=n.getState(),u=o.get(e);if(!u){c==null||c("012",Wo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):s([e])}function wG({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Dr(),[c,u]=T.useState(!1),d=T.useRef();return T.useEffect(()=>{d.current=fKn({getStoreItems:()=>o.getState(),onNodeMouseDown:_=>{Xk({id:_,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!d.current))return d.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var _;(_=d.current)==null||_.destroy()}},[t,r,n,i,e,s,a]),c}const kWn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function kG(){const e=Dr();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),_=new Map,p=kWn(a),m=s?i[0]:5,w=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*w*t.factor;for(const[,y]of u){if(!p(y))continue;let x={x:y.internals.positionAbsolute.x+k,y:y.internals.positionAbsolute.y+v};s&&(x=gg(x,i));const{position:b,positionAbsolute:C}=qU({nodeId:y.id,nextPosition:x,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:o});y.position=b,y.internals.positionAbsolute=C,_.set(y.id,y)}c(_)},[])}const d7=T.createContext(null),SWn=d7.Provider;d7.Consumer;const SG=()=>T.useContext(d7),CWn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),CG=T.createContext(null);function EWn({children:e}){const n=$n(CWn,Mr);return f.jsx(CG.Provider,{value:n,children:e})}function NWn(){const e=T.useContext(CG);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const zWn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},jWn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return zWn;const d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===t;return{connectingFrom:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===n&&(o==null?void 0:o.type)===t,connectingTo:d,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Yh.Strict?(o==null?void 0:o.type)!==t:e!==(o==null?void 0:o.nodeId)||n!==(o==null?void 0:o.id),connectionInProcess:!!o,clickConnectionInProcess:!!s,valid:d&&u}};function AWn({type:e="source",position:n=Dt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:d,onTouchStart:_,...p},m){var Q,K;const w=a||null,k=e==="target",v=Dr(),y=SG(),{connectOnClick:x,noPanClassName:b,rfId:C}=NWn(),{connectingFrom:N,connectingTo:z,clickConnecting:A,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:D,valid:L}=$n(jWn(y,w,e),Mr);y||(K=(Q=v.getState()).onError)==null||K.call(Q,"010",Wo.error010());const B=Z=>{const{defaultEdgeOptions:ee,onConnect:$,hasDefaultEdges:I}=v.getState(),F={...ee,...Z};if(I){const{edges:q,setEdges:V,onError:ie}=v.getState();V(oWn(F,q,{onError:ie}))}$==null||$(F),o==null||o(F)},U=Z=>{if(!y)return;const ee=ZU(Z.nativeEvent);if(s&&(ee&&Z.button===0||!ee)){const $=v.getState();Qk.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:w,nodeId:y,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...I)=>{var F,q;return(q=(F=v.getState()).onConnectEnd)==null?void 0:q.call(F,...I)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...I)=>{var F,q;return((q=(F=v.getState()).isValidConnection)==null?void 0:q.call(F,...I))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}ee?d==null||d(Z):_==null||_(Z)},H=Z=>{const{onClickConnectStart:ee,onClickConnectEnd:$,connectionClickStartHandle:I,connectionMode:F,isValidConnection:q,lib:V,rfId:ie,nodeLookup:oe,connection:ce}=v.getState();if(!y||!I&&!s)return;if(!I){ee==null||ee(Z.nativeEvent,{nodeId:y,handleId:w,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,id:w}});return}const ne=XU(Z.target),G=t||q,{connection:ae,isValid:le}=Qk.isValid(Z.nativeEvent,{handle:{nodeId:y,id:w,type:e},connectionMode:F,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:G,flowId:ie,doc:ne,lib:V,nodeLookup:oe});le&&ae&&B(ae);const ge=structuredClone(ce);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,$==null||$(Z,ge),v.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":w,"data-nodeid":y,"data-handlepos":n,"data-id":`${C}-${y}-${w}-${e}`,className:Cs(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",b,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:N,connectingto:z,valid:L,connectionindicator:r&&(!M||j)&&(M||D?i:s)}]),onMouseDown:U,onTouchStart:U,onClick:x?H:void 0,ref:m,...p,children:c})}const Pc=T.memo(yG(AWn));function TWn({data:e,isConnectable:n,sourcePosition:t=Dt.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(Pc,{type:"source",position:t,isConnectable:n})]})}function RWn({data:e,isConnectable:n,targetPosition:t=Dt.Top,sourcePosition:r=Dt.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(Pc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,f.jsx(Pc,{type:"source",position:r,isConnectable:n})]})}function MWn(){return null}function OWn({data:e,isConnectable:n,targetPosition:t=Dt.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(Pc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Qb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},vO={input:TWn,default:RWn,output:OWn,group:MWn};function DWn(e){var n,t,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((t=e.style)==null?void 0:t.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const LWn=e=>{const{width:n,height:t,x:r,y:s}=mg(e.nodeLookup,{filter:i=>!!i.selected});return{width:qo(n)?n:null,height:qo(t)?t:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function IWn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Dr(),{width:s,height:i,transformString:a,userSelectionActive:o}=$n(LWn,Mr),c=kG(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const d=!o&&s!==null&&i!==null;if(wG({nodeRef:u,disabled:!d}),!d)return null;const _=e?m=>{const w=r.getState().nodes.filter(k=>k.selected);e(m,w)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Qb,m.key)&&(m.preventDefault(),c({direction:Qb[m.key],factor:m.shiftKey?4:1}))};return f.jsx("div",{className:Cs(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:f.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:_,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const bO=typeof window<"u"?window:void 0,$Wn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function EG({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:_,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:b,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:A,panOnDrag:j,autoPanOnSelection:M,defaultViewport:D,translateExtent:L,minZoom:B,maxZoom:U,preventScrolling:H,onSelectionContextMenu:Q,noWheelClassName:K,noPanClassName:Z,disableKeyboardA11y:ee,onViewportChange:$,isControlledViewport:I}){const{nodesSelectionActive:F,userSelectionActive:q}=$n($Wn,Mr),V=zm(u,{target:bO}),ie=zm(k,{target:bO}),oe=ie||j,ce=ie||C,ne=d&&oe!==!0,G=V||q||ne;return pWn({deleteKeyCode:c,multiSelectionKeyCode:w}),f.jsx(vWn,{onPaneContextMenu:i,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:b,panOnScroll:ce,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:A,panOnDrag:!V&&oe,defaultViewport:D,translateExtent:L,minZoom:B,maxZoom:U,zoomActivationKeyCode:v,preventScrolling:H,noWheelClassName:K,noPanClassName:Z,onViewportChange:$,isControlledViewport:I,paneClickDistance:o,selectionOnDrag:ne,children:f.jsxs(wWn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:oe,autoPanOnSelection:M,isSelecting:!!G,selectionMode:_,selectionKeyPressed:V,paneClickDistance:o,selectionOnDrag:ne,children:[e,F&&f.jsx(IWn,{onSelectionContextMenu:Q,noPanClassName:Z,disableKeyboardA11y:ee})]})})}EG.displayName="FlowRenderer";const BWn=T.memo(EG),PWn=e=>n=>e?r7(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(t=>t.id):Array.from(n.nodeLookup.keys());function FWn(e){return $n(T.useCallback(PWn(e),[e]),Mr)}const HWn=e=>e.updateNodeInternals;function qWn(){const e=$n(HWn),[n]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const i=s.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:s.target,force:!0})}),e(r)}));return T.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function UWn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Dr(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),c=T.useRef(e.targetPosition),u=T.useRef(n),d=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!d||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[d,e.hidden]),T.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),T.useEffect(()=>{if(i.current){const _=u.current!==n,p=o.current!==e.sourcePosition,m=c.current!==e.targetPosition;(_||p||m)&&(u.current=n,o.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),i}function GWn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:_,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:w,rfId:k,nodeTypes:v,nodeClickDistance:y,onError:x}){const{node:b,internals:C,isParent:N}=$n(G=>{const ae=G.nodeLookup.get(e),le=G.parentLookup.has(e);return{node:ae,internals:ae.internals,isParent:le}},Mr);let z=b.type||"default",A=(v==null?void 0:v[z])||vO[z];A===void 0&&(x==null||x("003",Wo.error003(z)),z="default",A=(v==null?void 0:v.default)||vO.default);const j=!!(b.draggable||o&&typeof b.draggable>"u"),M=!!(b.selectable||c&&typeof b.selectable>"u"),D=!!(b.connectable||u&&typeof b.connectable>"u"),L=!!(b.focusable||d&&typeof b.focusable>"u"),B=Dr(),U=WU(b),H=UWn({node:b,nodeType:z,hasDimensions:U,resizeObserver:_}),Q=wG({nodeRef:H,disabled:b.hidden||!j,noDragClassName:p,handleSelector:b.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:y}),K=kG();if(b.hidden)return null;const Z=Yl(b),ee=DWn(b),$=M||j||n||t||r||s,I=t?G=>t(G,{...C.userNode}):void 0,F=r?G=>r(G,{...C.userNode}):void 0,q=s?G=>s(G,{...C.userNode}):void 0,V=i?G=>i(G,{...C.userNode}):void 0,ie=a?G=>a(G,{...C.userNode}):void 0,oe=G=>{const{selectNodesOnDrag:ae,nodeDragThreshold:le}=B.getState();M&&(!ae||!j||le>0)&&Xk({id:e,store:B,nodeRef:H}),n&&n(G,{...C.userNode})},ce=G=>{if(!(YU(G.nativeEvent)||w)){if($U.includes(G.key)&&M){const ae=G.key==="Escape";Xk({id:e,store:B,unselect:ae,nodeRef:H})}else if(j&&b.selected&&Object.prototype.hasOwnProperty.call(Qb,G.key)){G.preventDefault();const{ariaLabelConfig:ae}=B.getState();B.setState({ariaLiveMessage:ae["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),K({direction:Qb[G.key],factor:G.shiftKey?4:1})}}},ne=()=>{var Fe;if(w||!((Fe=H.current)!=null&&Fe.matches(":focus-visible")))return;const{transform:G,width:ae,height:le,autoPanOnNodeFocus:ge,setCenter:be}=B.getState();if(!ge)return;r7(new Map([[e,b]]),{x:0,y:0,width:ae,height:le},G,!0).length>0||be(b.position.x+Z.width/2,b.position.y+Z.height/2,{zoom:G[2]})};return f.jsx("div",{className:Cs(["react-flow__node",`react-flow__node-${z}`,{[m]:j},b.className,{selected:b.selected,selectable:M,parent:N,draggable:j,dragging:Q}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:U?"visible":"hidden",...b.style,...ee},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:F,onMouseLeave:q,onContextMenu:V,onClick:oe,onDoubleClick:ie,onKeyDown:L?ce:void 0,tabIndex:L?0:void 0,onFocus:L?ne:void 0,role:b.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${mG}-${k}`,"aria-label":b.ariaLabel,...b.domAttributes,children:f.jsx(SWn,{value:e,children:f.jsx(A,{id:e,data:b.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:b.selected??!1,selectable:M,draggable:j,deletable:b.deletable??!0,isConnectable:D,sourcePosition:b.sourcePosition,targetPosition:b.targetPosition,dragging:Q,dragHandle:b.dragHandle,zIndex:C.z,parentId:b.parentId,...Z})})})}var VWn=T.memo(GWn);const KWn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function NG(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=$n(KWn,Mr),a=FWn(e.onlyRenderVisibleElements),o=qWn();return f.jsx("div",{className:"react-flow__nodes",style:wx,children:a.map(c=>f.jsx(VWn,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}NG.displayName="NodeRenderer";const WWn=T.memo(NG);function QWn(e){return $n(T.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const i=t.nodeLookup.get(s.source),a=t.nodeLookup.get(s.target);i&&a&&KVn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Mr)}const XWn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},YWn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},yO={[Vb.Arrow]:XWn,[Vb.ArrowClosed]:YWn};function ZWn(e){const n=Dr();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(yO,e)?yO[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",Wo.error009(e)),null)},[e])}const JWn=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const c=ZWn(n);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0",children:f.jsx(c,{color:t,strokeWidth:a})}):null},zG=({defaultColor:e,rfId:n})=>{const t=$n(i=>i.edges),r=$n(i=>i.defaultEdgeOptions),s=T.useMemo(()=>tKn(t,{id:n,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[t,r,n,e]);return s.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:s.map(i=>f.jsx(JWn,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};zG.displayName="MarkerDefinitions";var eQn=T.memo(zG);function jG({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...d}){const[_,p]=T.useState({x:1,y:0,width:0,height:0}),m=Cs(["react-flow__edge-textwrapper",u]),w=T.useRef(null);return T.useEffect(()=>{if(w.current){const k=w.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?f.jsxs("g",{transform:`translate(${e-_.width/2} ${n-_.height/2})`,className:m,visibility:_.width?"visible":"hidden",...d,children:[s&&f.jsx("rect",{width:_.width+2*a[0],x:-a[0],y:-a[1],height:_.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),f.jsx("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:w,style:r,children:t}),c]}):null}jG.displayName="EdgeText";const tQn=T.memo(jG);function kx({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...d,d:e,fill:"none",className:Cs(["react-flow__edge-path",d.className])}),u?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&qo(n)&&qo(t)?f.jsx(tQn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function xO({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Dt.Left||e===Dt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function AG({sourceX:e,sourceY:n,sourcePosition:t=Dt.Bottom,targetX:r,targetY:s,targetPosition:i=Dt.Top}){const[a,o]=xO({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=xO({pos:i,x1:r,y1:s,x2:e,y2:n}),[d,_,p,m]=JU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${o} ${c},${u} ${r},${s}`,d,_,p,m]}function TG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})=>{const[x,b,C]=AG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return f.jsx(kx,{id:N,path:x,labelX:b,labelY:C,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})})}const nQn=TG({isInternal:!1}),RG=TG({isInternal:!0});nQn.displayName="SimpleBezierEdge";RG.displayName="SimpleBezierEdgeInternal";function MG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:_,style:p,sourcePosition:m=Dt.Bottom,targetPosition:w=Dt.Top,markerEnd:k,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[b,C,N]=Vk({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:w,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),z=e.isInternal?void 0:n;return f.jsx(kx,{id:z,path:b,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:_,style:p,markerEnd:k,markerStart:v,interactionWidth:x})})}const OG=MG({isInternal:!1}),DG=MG({isInternal:!0});OG.displayName="SmoothStepEdge";DG.displayName="SmoothStepEdgeInternal";function LG(e){return T.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return f.jsx(OG,{...t,id:r,pathOptions:T.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const rQn=LG({isInternal:!1}),IG=LG({isInternal:!0});rQn.displayName="StepEdge";IG.displayName="StepEdgeInternal";function $G(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:w,interactionWidth:k})=>{const[v,y,x]=nG({sourceX:t,sourceY:r,targetX:s,targetY:i}),b=e.isInternal?void 0:n;return f.jsx(kx,{id:b,path:v,labelX:y,labelY:x,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:_,style:p,markerEnd:m,markerStart:w,interactionWidth:k})})}const sQn=$G({isInternal:!1}),BG=$G({isInternal:!0});sQn.displayName="StraightEdge";BG.displayName="StraightEdgeInternal";function PG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Dt.Bottom,targetPosition:o=Dt.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[b,C,N]=eG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:y==null?void 0:y.curvature}),z=e.isInternal?void 0:n;return f.jsx(kx,{id:z,path:b,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:_,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:x})})}const iQn=PG({isInternal:!1}),FG=PG({isInternal:!0});iQn.displayName="BezierEdge";FG.displayName="BezierEdgeInternal";const wO={default:FG,straight:BG,step:IG,smoothstep:DG,simplebezier:RG},kO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},aQn=(e,n,t)=>t===Dt.Left?e-n:t===Dt.Right?e+n:e,oQn=(e,n,t)=>t===Dt.Top?e-n:t===Dt.Bottom?e+n:e,SO="react-flow__edgeupdater";function CO({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return f.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:Cs([SO,`${SO}-${o}`]),cx:aQn(n,r,e),cy:oQn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function cQn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:_,setReconnecting:p,setUpdateHover:m}){const w=Dr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:A,connectionMode:j,connectionRadius:M,lib:D,onConnectStart:L,cancelConnection:B,nodeLookup:U,rfId:H,panBy:Q,updateConnection:K}=w.getState(),Z=N.type==="target",ee=(F,q)=>{p(!1),_==null||_(F,t,N.type,q)},$=F=>u==null?void 0:u(t,F),I=(F,q)=>{p(!0),d==null||d(C,t,N.type),L==null||L(F,q)};Qk.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:j,connectionRadius:M,domNode:A,handleId:N.id,nodeId:N.nodeId,nodeLookup:U,isTarget:Z,edgeUpdaterType:N.type,lib:D,flowId:H,cancelConnection:B,panBy:Q,isValidConnection:(...F)=>{var q,V;return((V=(q=w.getState()).isValidConnection)==null?void 0:V.call(q,...F))??!0},onConnect:$,onConnectStart:I,onConnectEnd:(...F)=>{var q,V;return(V=(q=w.getState()).onConnectEnd)==null?void 0:V.call(q,...F)},onReconnectEnd:ee,updateConnection:K,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),y=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>m(!0),b=()=>m(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(CO,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:b,type:"source"}),(e===!0||e==="target")&&f.jsx(CO,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:y,onMouseEnter:x,onMouseOut:b,type:"target"})]})}function lQn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,rfId:w,edgeTypes:k,noPanClassName:v,onError:y,disableKeyboardA11y:x}){let b=$n(be=>be.edgeLookup.get(e));const C=$n(be=>be.defaultEdgeOptions);b=C?{...C,...b}:b;let N=b.type||"default",z=(k==null?void 0:k[N])||wO[N];z===void 0&&(y==null||y("011",Wo.error011(N)),N="default",z=(k==null?void 0:k.default)||wO.default);const A=!!(b.focusable||n&&typeof b.focusable>"u"),j=typeof _<"u"&&(b.reconnectable||t&&typeof b.reconnectable>"u"),M=!!(b.selectable||r&&typeof b.selectable>"u"),D=T.useRef(null),[L,B]=T.useState(!1),[U,H]=T.useState(!1),Q=Dr(),{zIndex:K=b.zIndex,sourceX:Z,sourceY:ee,targetX:$,targetY:I,sourcePosition:F,targetPosition:q}=$n(T.useCallback(be=>{const Ee=be.nodeLookup.get(b.source),Fe=be.nodeLookup.get(b.target);if(!Ee||!Fe)return kO;const Ye=eKn({id:e,sourceNode:Ee,targetNode:Fe,sourceHandle:b.sourceHandle||null,targetHandle:b.targetHandle||null,connectionMode:be.connectionMode,onError:y}),Me=VVn({selected:b.selected,zIndex:b.zIndex,sourceNode:Ee,targetNode:Fe,elevateOnSelect:be.elevateEdgesOnSelect,zIndexMode:be.zIndexMode});return{...Ye||kO,zIndex:Me}},[b.source,b.target,b.sourceHandle,b.targetHandle,b.selected,b.zIndex]),Mr),V=T.useMemo(()=>b.markerStart?`url('#${Kk(b.markerStart,w)}')`:void 0,[b.markerStart,w]),ie=T.useMemo(()=>b.markerEnd?`url('#${Kk(b.markerEnd,w)}')`:void 0,[b.markerEnd,w]);if(b.hidden||Z===null||ee===null||$===null||I===null)return null;const oe=be=>{var Me;const{addSelectedEdges:Ee,unselectNodesAndEdges:Fe,multiSelectionActive:Ye}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),b.selected&&Ye?(Fe({nodes:[],edges:[b]}),(Me=D.current)==null||Me.blur()):Ee([e])),s&&s(be,b)},ce=i?be=>{i(be,{...b})}:void 0,ne=a?be=>{a(be,{...b})}:void 0,G=o?be=>{o(be,{...b})}:void 0,ae=c?be=>{c(be,{...b})}:void 0,le=u?be=>{u(be,{...b})}:void 0,ge=be=>{var Ee;if(!x&&$U.includes(be.key)&&M){const{unselectNodesAndEdges:Fe,addSelectedEdges:Ye}=Q.getState();be.key==="Escape"?((Ee=D.current)==null||Ee.blur(),Fe({edges:[b]})):Ye([e])}};return f.jsx("svg",{style:{zIndex:K},children:f.jsxs("g",{className:Cs(["react-flow__edge",`react-flow__edge-${N}`,b.className,v,{selected:b.selected,animated:b.animated,inactive:!M&&!s,updating:L,selectable:M}]),onClick:oe,onDoubleClick:ce,onContextMenu:ne,onMouseEnter:G,onMouseMove:ae,onMouseLeave:le,onKeyDown:A?ge:void 0,tabIndex:A?0:void 0,role:b.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":b.ariaLabel===null?void 0:b.ariaLabel||`Edge from ${b.source} to ${b.target}`,"aria-describedby":A?`${gG}-${w}`:void 0,ref:D,...b.domAttributes,children:[!U&&f.jsx(z,{id:e,source:b.source,target:b.target,type:b.type,selected:b.selected,animated:b.animated,selectable:M,deletable:b.deletable??!0,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,sourceX:Z,sourceY:ee,targetX:$,targetY:I,sourcePosition:F,targetPosition:q,data:b.data,style:b.style,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerStart:V,markerEnd:ie,pathOptions:"pathOptions"in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth}),j&&f.jsx(cQn,{edge:b,isReconnectable:j,reconnectRadius:d,onReconnect:_,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:ee,targetX:$,targetY:I,sourcePosition:F,targetPosition:q,setUpdateHover:B,setReconnecting:H})]})})}var uQn=T.memo(lQn);const _Qn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function HG({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:_,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,onError:b}=$n(_Qn,Mr),C=QWn(n);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(eQn,{defaultColor:e,rfId:t}),C.map(N=>f.jsx(uQn,{id:N,edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:_,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,rfId:t,onError:b,edgeTypes:r,disableKeyboardA11y:k},N))]})}HG.displayName="EdgeRenderer";const fQn=T.memo(HG),dQn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function hQn({children:e}){const n=$n(dQn);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function pQn(e){const n=f7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const mQn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function gQn(e){const n=$n(mQn),t=Dr();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function vQn(e){return e.connection.inProgress?{...e.connection,to:vg(e.connection.to,e.transform)}:{...e.connection}}function bQn(e){return vQn}function yQn(e){const n=bQn();return $n(n,Mr)}const xQn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function wQn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=$n(xQn,Mr);return!(i&&s&&c)?null:f.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Cs(["react-flow__connection",FU(o)]),children:f.jsx(qG,{style:n,type:t,CustomComponent:r,isValid:o})})})}const qG=({style:e,type:n=$u.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:d,toHandle:_,toPosition:p,pointer:m}=yQn();if(!s)return;if(t)return f.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:FU(r),toNode:d,toHandle:_,pointer:m});let w="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case $u.Bezier:[w]=eG(k);break;case $u.SimpleBezier:[w]=AG(k);break;case $u.Step:[w]=Vk({...k,borderRadius:0});break;case $u.SmoothStep:[w]=Vk(k);break;default:[w]=nG(k)}return f.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};qG.displayName="ConnectionLine";const kQn={};function EO(e=kQn){T.useRef(e),Dr(),T.useEffect(()=>{},[e])}function SQn(){Dr(),T.useRef(!1),T.useEffect(()=>{},[])}function UG({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:_,onSelectionStart:p,onSelectionEnd:m,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:y,selectionKeyCode:x,selectionOnDrag:b,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:A,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:L,translateExtent:B,minZoom:U,maxZoom:H,preventScrolling:Q,defaultMarkerColor:K,zoomOnScroll:Z,zoomOnPinch:ee,panOnScroll:$,panOnScrollSpeed:I,panOnScrollMode:F,zoomOnDoubleClick:q,panOnDrag:V,autoPanOnSelection:ie,onPaneClick:oe,onPaneMouseEnter:ce,onPaneMouseMove:ne,onPaneMouseLeave:G,onPaneScroll:ae,onPaneContextMenu:le,paneClickDistance:ge,nodeClickDistance:be,onEdgeContextMenu:Ee,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Me,reconnectRadius:Ue,onReconnect:dt,onReconnectStart:wt,onReconnectEnd:Ft,noDragClassName:Ht,noWheelClassName:qt,noPanClassName:$e,disableKeyboardA11y:ot,nodeExtent:Ce,rfId:me,viewport:ze,onViewportChange:He}){return EO(e),EO(n),SQn(),pQn(t),gQn(ze),f.jsx(BWn,{onPaneClick:oe,onPaneMouseEnter:ce,onPaneMouseMove:ne,onPaneMouseLeave:G,onPaneContextMenu:le,onPaneScroll:ae,paneClickDistance:ge,deleteKeyCode:j,selectionKeyCode:x,selectionOnDrag:b,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:A,elementsSelectable:D,zoomOnScroll:Z,zoomOnPinch:ee,zoomOnDoubleClick:q,panOnScroll:$,panOnScrollSpeed:I,panOnScrollMode:F,panOnDrag:V,autoPanOnSelection:ie,defaultViewport:L,translateExtent:B,minZoom:U,maxZoom:H,onSelectionContextMenu:_,preventScrolling:Q,noDragClassName:Ht,noWheelClassName:qt,noPanClassName:$e,disableKeyboardA11y:ot,onViewportChange:He,isControlledViewport:!!ze,children:f.jsxs(hQn,{children:[f.jsx(fQn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:dt,onReconnectStart:wt,onReconnectEnd:Ft,onlyRenderVisibleElements:M,onEdgeContextMenu:Ee,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Me,reconnectRadius:Ue,defaultMarkerColor:K,noPanClassName:$e,disableKeyboardA11y:ot,rfId:me}),f.jsx(wQn,{style:k,type:w,component:v,containerStyle:y}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(WWn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:be,onlyRenderVisibleElements:M,noPanClassName:$e,noDragClassName:Ht,disableKeyboardA11y:ot,nodeExtent:Ce,rfId:me}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}UG.displayName="GraphView";const CQn=T.memo(UG),EQn=KU(),NO=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:_,zIndexMode:p="basic"}={})=>{const m=new Map,w=new Map,k=new Map,v=new Map,y=r??n??[],x=t??e??[],b=d??[0,0],C=_??Sm;iG(k,v,y);const{nodesInitialized:N}=Wk(x,m,w,{nodeOrigin:b,nodeExtent:C,zIndexMode:p});let z=[0,0,1];if(a&&s&&i){const A=mg(m,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:j,y:M,zoom:D}=i7(A,s,i,c,u,(o==null?void 0:o.padding)??.1);z=[j,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:z,nodes:x,nodesInitialized:N,nodeLookup:m,parentLookup:w,edges:y,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Sm,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Yh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:b,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:o,fitViewResolver:null,connection:{...PU},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:EQn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BU,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},NQn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:_,zIndexMode:p})=>IKn((m,w)=>{async function k(){const{nodeLookup:v,panZoom:y,fitViewOptions:x,fitViewResolver:b,width:C,height:N,minZoom:z,maxZoom:A}=w();y&&(await BVn({nodes:v,width:C,height:N,panZoom:y,minZoom:z,maxZoom:A},x),b==null||b.resolve(!0),m({fitViewResolver:null}))}return{...NO({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:_,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:y,parentLookup:x,nodeOrigin:b,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:z,nodesSelectionActive:A}=w(),{nodesInitialized:j,hasSelectedNodes:M}=Wk(v,y,x,{nodeOrigin:b,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z}),D=A&&M;N&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:y,edgeLookup:x}=w();iG(y,x,v),m({edges:v})},setDefaultNodesAndEdges:(v,y)=>{if(v){const{setNodes:x}=w();x(v),m({hasDefaultNodes:!0})}if(y){const{setEdges:x}=w();x(y),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:y,nodeLookup:x,parentLookup:b,domNode:C,nodeOrigin:N,nodeExtent:z,debug:A,fitViewQueued:j,zIndexMode:M}=w(),{changes:D,updatedInternals:L}=cKn(v,x,b,C,N,z,M);L&&(sKn(x,b,{nodeOrigin:N,nodeExtent:z,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(A&&console.log("React Flow: trigger node changes",D),y==null||y(D)))},updateNodePositions:(v,y=!1)=>{const x=[];let b=[];const{nodeLookup:C,triggerNodeChanges:N,connection:z,updateConnection:A,onNodesChangeMiddlewareMap:j}=w();for(const[M,D]of v){const L=C.get(M),B=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&(D!=null&&D.position)),U={id:M,type:"position",position:B?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:y};if(L&&z.inProgress&&z.fromNode.id===L.id){const H=Hf(L,z.fromHandle,Dt.Left,!0);A({...z,from:H})}B&&L.parentId&&x.push({id:M,parentId:L.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),b.push(U)}if(x.length>0){const{parentLookup:M,nodeOrigin:D}=w(),L=_7(x,C,M,D);b.push(...L)}for(const M of j.values())b=M(b);N(b)},triggerNodeChanges:v=>{const{onNodesChange:y,setNodes:x,nodes:b,hasDefaultNodes:C,debug:N}=w();if(v!=null&&v.length){if(C){const z=sWn(v,b);x(z)}N&&console.log("React Flow: trigger node changes",v),y==null||y(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:y,setEdges:x,edges:b,hasDefaultEdges:C,debug:N}=w();if(v!=null&&v.length){if(C){const z=iWn(v,b);x(z)}N&&console.log("React Flow: trigger edge changes",v),y==null||y(v)}},addSelectedNodes:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:b,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(y){const z=v.map(A=>X_(A,!0));C(z);return}C(rh(b,new Set([...v]),!0)),N(rh(x))},addSelectedEdges:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:b,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(y){const z=v.map(A=>X_(A,!0));N(z);return}N(rh(x,new Set([...v]))),C(rh(b,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:y}={})=>{const{edges:x,nodes:b,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:z}=w(),A=v||b,j=y||x,M=[];for(const L of A){if(!L.selected)continue;const B=C.get(L.id);B&&(B.selected=!1),M.push(X_(L.id,!1))}const D=[];for(const L of j)L.selected&&D.push(X_(L.id,!1));N(M),z(D)},setMinZoom:v=>{const{panZoom:y,maxZoom:x}=w();y==null||y.setScaleExtent([v,x]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:y,minZoom:x}=w();y==null||y.setScaleExtent([x,v]),m({maxZoom:v})},setTranslateExtent:v=>{var y;(y=w().panZoom)==null||y.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:y,triggerNodeChanges:x,triggerEdgeChanges:b,elementsSelectable:C}=w();if(!C)return;const N=y.reduce((A,j)=>j.selected?[...A,X_(j.id,!1)]:A,[]),z=v.reduce((A,j)=>j.selected?[...A,X_(j.id,!1)]:A,[]);x(N),b(z)},setNodeExtent:v=>{const{nodes:y,nodeLookup:x,parentLookup:b,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:z,zIndexMode:A}=w();v[0][0]===z[0][0]&&v[0][1]===z[0][1]&&v[1][0]===z[1][0]&&v[1][1]===z[1][1]||(Wk(y,x,b,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:y,width:x,height:b,panZoom:C,translateExtent:N}=w();return lKn({delta:v,panZoom:C,transform:y,translateExtent:N,width:x,height:b})},setCenter:async(v,y,x)=>{const{width:b,height:C,maxZoom:N,panZoom:z}=w();if(!z)return!1;const A=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:N;return await z.setViewport({x:b/2-v*A,y:C/2-y*A,zoom:A},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{m({connection:{...PU}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...NO()})}},Object.is);function zQn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:_,zIndexMode:p,children:m}){const[w]=T.useState(()=>NQn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:d,nodeExtent:_,zIndexMode:p}));return f.jsx($Kn,{value:w,children:f.jsx(_Wn,{children:f.jsx(EWn,{children:m})})})}function jQn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:_,nodeExtent:p,zIndexMode:m}){return T.useContext(yx)?f.jsx(f.Fragment,{children:e}):f.jsx(zQn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:_,nodeExtent:p,zIndexMode:m,children:e})}const AQn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function TQn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:_,onMoveEnd:p,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:b,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,onNodeDragStart:A,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:L,onDelete:B,onSelectionChange:U,onSelectionDragStart:H,onSelectionDrag:Q,onSelectionDragStop:K,onSelectionContextMenu:Z,onSelectionStart:ee,onSelectionEnd:$,onBeforeDelete:I,connectionMode:F,connectionLineType:q=$u.Bezier,connectionLineStyle:V,connectionLineComponent:ie,connectionLineContainerStyle:oe,deleteKeyCode:ce="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:G=!1,selectionMode:ae=Cm.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ge=Nm()?"Meta":"Control",zoomActivationKeyCode:be=Nm()?"Meta":"Control",snapToGrid:Ee,snapGrid:Fe,onlyRenderVisibleElements:Ye=!1,selectNodesOnDrag:Me,nodesDraggable:Ue,autoPanOnNodeFocus:dt,nodesConnectable:wt,nodesFocusable:Ft,nodeOrigin:Ht=vG,edgesFocusable:qt,edgesReconnectable:$e,elementsSelectable:ot=!0,defaultViewport:Ce=YKn,minZoom:me=.5,maxZoom:ze=2,translateExtent:He=Sm,preventScrolling:We=!0,nodeExtent:ct,defaultMarkerColor:St="#b1b1b7",zoomOnScroll:Be=!0,zoomOnPinch:un=!0,panOnScroll:Vt=!1,panOnScrollSpeed:_n=.5,panOnScrollMode:Gt=kf.Free,zoomOnDoubleClick:cn=!0,panOnDrag:Tt=!0,onPaneClick:$t,onPaneMouseEnter:Lr,onPaneMouseMove:mr,onPaneMouseLeave:Gr,onPaneScroll:Jt,onPaneContextMenu:Gn,paneClickDistance:ls=1,nodeClickDistance:ut=0,children:fn,onReconnect:yn,onReconnectStart:Tn,onReconnectEnd:Vn,onEdgeContextMenu:dn,onEdgeDoubleClick:Dn,onEdgeMouseEnter:Kn,onEdgeMouseMove:Et,onEdgeMouseLeave:Rt,reconnectRadius:Pn=10,onNodesChange:rs,onEdgesChange:Wt,noDragClassName:rr="nodrag",noWheelClassName:Wn="nowheel",noPanClassName:zr="nopan",fitView:Es,fitViewOptions:Vr,connectOnClick:gr,attributionPosition:Qe,proOptions:pt,defaultEdgeOptions:pn,elevateNodesOnSelect:xn=!0,elevateEdgesOnSelect:Rn=!1,disableKeyboardA11y:_r=!1,autoPanOnConnect:sr,autoPanOnNodeDrag:Ln,autoPanOnSelection:us=!0,autoPanSpeed:Ns,connectionRadius:Ir,isValidConnection:Kr,onError:Yo,style:Xc,id:ia,nodeDragThreshold:Zl,connectionDragThreshold:bi,viewport:Ii,onViewportChange:zs,width:kr,height:Fs,colorMode:yi="light",debug:ri,onScroll:xi,ariaLabelConfig:si,zIndexMode:js="basic",...ss},Zo){const aa=ia||"1",vr=tWn(yi),wi=T.useCallback(oa=>{oa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),xi==null||xi(oa)},[xi]);return f.jsx("div",{"data-testid":"rf__wrapper",...ss,onScroll:wi,style:{...Xc,...AQn},ref:Zo,className:Cs(["react-flow",s,vr]),id:ia,role:"application",children:f.jsxs(jQn,{nodes:e,edges:n,width:kr,height:Fs,fitView:Es,fitViewOptions:Vr,minZoom:me,maxZoom:ze,nodeOrigin:Ht,nodeExtent:ct,zIndexMode:js,children:[f.jsx(eWn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:y,nodesDraggable:Ue,autoPanOnNodeFocus:dt,nodesConnectable:wt,nodesFocusable:Ft,edgesFocusable:qt,edgesReconnectable:$e,elementsSelectable:ot,elevateNodesOnSelect:xn,elevateEdgesOnSelect:Rn,minZoom:me,maxZoom:ze,nodeExtent:ct,onNodesChange:rs,onEdgesChange:Wt,snapToGrid:Ee,snapGrid:Fe,connectionMode:F,translateExtent:He,connectOnClick:gr,defaultEdgeOptions:pn,fitView:Es,fitViewOptions:Vr,onNodesDelete:D,onEdgesDelete:L,onDelete:B,onNodeDragStart:A,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:H,onSelectionDragStop:K,onMove:d,onMoveStart:_,onMoveEnd:p,noPanClassName:zr,nodeOrigin:Ht,rfId:aa,autoPanOnConnect:sr,autoPanOnNodeDrag:Ln,autoPanSpeed:Ns,onError:Yo,connectionRadius:Ir,isValidConnection:Kr,selectNodesOnDrag:Me,nodeDragThreshold:Zl,connectionDragThreshold:bi,onBeforeDelete:I,debug:ri,ariaLabelConfig:si,zIndexMode:js}),f.jsx(CQn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:b,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,nodeTypes:i,edgeTypes:a,connectionLineType:q,connectionLineStyle:V,connectionLineComponent:ie,connectionLineContainerStyle:oe,selectionKeyCode:ne,selectionOnDrag:G,selectionMode:ae,deleteKeyCode:ce,multiSelectionKeyCode:ge,panActivationKeyCode:le,zoomActivationKeyCode:be,onlyRenderVisibleElements:Ye,defaultViewport:Ce,translateExtent:He,minZoom:me,maxZoom:ze,preventScrolling:We,zoomOnScroll:Be,zoomOnPinch:un,zoomOnDoubleClick:cn,panOnScroll:Vt,panOnScrollSpeed:_n,panOnScrollMode:Gt,panOnDrag:Tt,autoPanOnSelection:us,onPaneClick:$t,onPaneMouseEnter:Lr,onPaneMouseMove:mr,onPaneMouseLeave:Gr,onPaneScroll:Jt,onPaneContextMenu:Gn,paneClickDistance:ls,nodeClickDistance:ut,onSelectionContextMenu:Z,onSelectionStart:ee,onSelectionEnd:$,onReconnect:yn,onReconnectStart:Tn,onReconnectEnd:Vn,onEdgeContextMenu:dn,onEdgeDoubleClick:Dn,onEdgeMouseEnter:Kn,onEdgeMouseMove:Et,onEdgeMouseLeave:Rt,reconnectRadius:Pn,defaultMarkerColor:St,noDragClassName:rr,noWheelClassName:Wn,noPanClassName:zr,rfId:aa,disableKeyboardA11y:_r,nodeExtent:ct,viewport:Ii,onViewportChange:zs}),f.jsx(XKn,{onSelectionChange:U}),fn,f.jsx(GKn,{proOptions:pt,position:Qe}),f.jsx(UKn,{rfId:aa,disableKeyboardA11y:_r})]})})}var RQn=yG(TQn);function MQn({dimensions:e,lineWidth:n,variant:t,className:r}){return f.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Cs(["react-flow__background-pattern",t,r])})}function OQn({radius:e,className:n}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Cs(["react-flow__background-pattern","dots",n])})}var Hl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Hl||(Hl={}));const DQn={[Hl.Dots]:1,[Hl.Lines]:1,[Hl.Cross]:6},LQn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function GG({id:e,variant:n=Hl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:d}){const _=T.useRef(null),{transform:p,patternId:m}=$n(LQn,Mr),w=r||DQn[n],k=n===Hl.Dots,v=n===Hl.Cross,y=Array.isArray(t)?t:[t,t],x=[y[0]*p[2]||1,y[1]*p[2]||1],b=w*p[2],C=Array.isArray(i)?i:[i,i],N=v?[b,b]:x,z=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],A=`${m}${e||""}`;return f.jsxs("svg",{className:Cs(["react-flow__background",u]),style:{...c,...wx,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:_,"data-testid":"rf__background",children:[f.jsx("pattern",{id:A,x:p[0]%x[0],y:p[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:k?f.jsx(OQn,{radius:b/2,className:d}):f.jsx(MQn,{dimensions:N,lineWidth:s,variant:n,className:d})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}GG.displayName="Background";const IQn=T.memo(GG);function $Qn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function BQn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function PQn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function FQn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function HQn(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function lv({children:e,className:n,...t}){return f.jsx("button",{type:"button",className:Cs(["react-flow__controls-button",n]),...t,children:e})}const qQn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function VG({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:d,position:_="bottom-left",orientation:p="vertical","aria-label":m}){const w=Dr(),{isInteractive:k,minZoomReached:v,maxZoomReached:y,ariaLabelConfig:x}=$n(qQn,Mr),{zoomIn:b,zoomOut:C,fitView:N}=f7(),z=()=>{b(),i==null||i()},A=()=>{C(),a==null||a()},j=()=>{N(s),o==null||o()},M=()=>{w.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},D=p==="horizontal"?"horizontal":"vertical";return f.jsxs(xx,{className:Cs(["react-flow__controls",D,u]),position:_,style:e,"data-testid":"rf__controls","aria-label":m??x["controls.ariaLabel"],children:[n&&f.jsxs(f.Fragment,{children:[f.jsx(lv,{onClick:z,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:y,children:f.jsx($Qn,{})}),f.jsx(lv,{onClick:A,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:v,children:f.jsx(BQn,{})})]}),t&&f.jsx(lv,{className:"react-flow__controls-fitview",onClick:j,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:f.jsx(PQn,{})}),r&&f.jsx(lv,{className:"react-flow__controls-interactive",onClick:M,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?f.jsx(HQn,{}):f.jsx(FQn,{})}),d]})}VG.displayName="Controls";T.memo(VG);function UQn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:d,shapeRendering:_,selected:p,onClick:m}){const{background:w,backgroundColor:k}=i||{},v=a||w||k;return f.jsx("rect",{className:Cs(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:d,ry:d,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:_,onClick:m?y=>m(y,e):void 0})}const GQn=T.memo(UQn),VQn=e=>e.nodes.map(n=>n.id),e3=e=>e instanceof Function?e:()=>e;function KQn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=GQn,onClick:a}){const o=$n(VQn,Mr),c=e3(n),u=e3(e),d=e3(t),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:o.map(p=>f.jsx(QQn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:_},p))})}function WQn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:d,y:_,width:p,height:m}=$n(w=>{const k=w.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:y,y:x}=k.internals.positionAbsolute,{width:b,height:C}=Yl(v);return{node:v,x:y,y:x,width:b,height:C}},Mr);return!u||u.hidden||!WU(u)?null:f.jsx(o,{x:d,y:_,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:s,strokeColor:t(u),strokeWidth:i,shapeRendering:a,onClick:c,id:u.id})}const QQn=T.memo(WQn);var XQn=T.memo(KQn);const YQn=200,ZQn=150,JQn=e=>!e.hidden,eXn=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?GU(mg(e.nodeLookup,{filter:JQn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},tXn="react-flow__minimap-desc";function KG({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:_,position:p="bottom-right",onClick:m,onNodeClick:w,pannable:k=!1,zoomable:v=!1,ariaLabel:y,inversePan:x,zoomStep:b=1,offsetScale:C=5}){const N=Dr(),z=T.useRef(null),{boundingRect:A,viewBB:j,rfId:M,panZoom:D,translateExtent:L,flowWidth:B,flowHeight:U,ariaLabelConfig:H}=$n(eXn,Mr),Q=(e==null?void 0:e.width)??YQn,K=(e==null?void 0:e.height)??ZQn,Z=A.width/Q,ee=A.height/K,$=Math.max(Z,ee),I=$*Q,F=$*K,q=C*$,V=A.x-(I-A.width)/2-q,ie=A.y-(F-A.height)/2-q,oe=I+q*2,ce=F+q*2,ne=`${tXn}-${M}`,G=T.useRef(0),ae=T.useRef();G.current=$,T.useEffect(()=>{if(z.current&&D)return ae.current=vKn({domNode:z.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>G.current}),()=>{var Ee;(Ee=ae.current)==null||Ee.destroy()}},[D]),T.useEffect(()=>{var Ee;(Ee=ae.current)==null||Ee.update({translateExtent:L,width:B,height:U,inversePan:x,pannable:k,zoomStep:b,zoomable:v})},[k,v,x,b,L,B,U]);const le=m?Ee=>{var Me;const[Fe,Ye]=((Me=ae.current)==null?void 0:Me.pointer(Ee))||[0,0];m(Ee,{x:Fe,y:Ye})}:void 0,ge=w?T.useCallback((Ee,Fe)=>{const Ye=N.getState().nodeLookup.get(Fe).internals.userNode;w(Ee,Ye)},[]):void 0,be=y??H["minimap.ariaLabel"];return f.jsx(xx,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof _=="number"?_*$:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof t=="string"?t:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:Cs(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:Q,height:K,viewBox:`${V} ${ie} ${oe} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ne,ref:z,onClick:le,children:[be&&f.jsx("title",{id:ne,children:be}),f.jsx(XQn,{onClick:ge,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-q},${ie-q}h${oe+q*2}v${ce+q*2}h${-oe-q*2}z - M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}KG.displayName="MiniMap";T.memo(KG);const nXn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,rXn={[ep.Line]:"right",[ep.Handle]:"bottom-right"};function sXn({nodeId:e,position:n,variant:t=ep.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:_=!1,resizeDirection:p,autoScale:m=!0,shouldResize:w,onResizeStart:k,onResize:v,onResizeEnd:y}){const x=SG(),b=typeof e=="string"?e:x,C=Dr(),N=T.useRef(null),z=t===ep.Handle,A=$n(T.useCallback(nXn(z&&m),[z,m]),Mr),j=T.useRef(null),M=n??rXn[t];T.useEffect(()=>{if(!(!N.current||!b))return j.current||(j.current=TKn({domNode:N.current,nodeId:b,getStoreItems:()=>{const{nodeLookup:L,transform:B,snapGrid:U,snapToGrid:H,nodeOrigin:Q,domNode:K}=C.getState();return{nodeLookup:L,transform:B,snapGrid:U,snapToGrid:H,nodeOrigin:Q,paneDomNode:K}},onChange:(L,B)=>{const{triggerNodeChanges:U,nodeLookup:H,parentLookup:Q,nodeOrigin:K}=C.getState(),Z=[],ee={x:L.x,y:L.y},$=H.get(b);if($&&$.expandParent&&$.parentId){const I=$.origin??K,F=L.width??$.measured.width??0,q=L.height??$.measured.height??0,V={id:$.id,parentId:$.parentId,rect:{width:F,height:q,...QU({x:L.x??$.position.x,y:L.y??$.position.y},{width:F,height:q},$.parentId,H,I)}},ie=_7([V],H,Q,K);Z.push(...ie),ee.x=L.x?Math.max(I[0]*F,L.x):void 0,ee.y=L.y?Math.max(I[1]*q,L.y):void 0}if(ee.x!==void 0&&ee.y!==void 0){const I={id:b,type:"position",position:{...ee}};Z.push(I)}if(L.width!==void 0&&L.height!==void 0){const F={id:b,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};Z.push(F)}for(const I of B){const F={...I,type:"position"};Z.push(F)}U(Z)},onEnd:({width:L,height:B})=>{const U={id:b,type:"dimensions",resizing:!1,dimensions:{width:L,height:B}};C.getState().triggerNodeChanges([U])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:_,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:y,shouldResize:w}),()=>{var L;(L=j.current)==null||L.destroy()}},[M,o,c,u,d,_,k,v,y,w]);const D=M.split("-");return f.jsx("div",{className:Cs(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:A,...a&&{[z?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(sXn);function iXn(){const[e,n]=T.useState(0),[t,r]=T.useState(0);return{ref:T.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),c=new MutationObserver(a);return o.observe(i),c.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const uv=8;function aXn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function d(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",d),d(),()=>window.removeEventListener("resize",d)},[]);let o=0,c=0,u=0;if(e){const{distance:d}=e;switch(e.anchor){case"left":o=e.x-t-d,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+d,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+d;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-d;break}const _=o,p=c;o=Math.min(Math.max(o,uv),i-t-uv),c=Math.min(Math.max(c,uv),s-r-uv),u=e.anchor==="left"||e.anchor==="right"?p-c:_-o}return{x:o,y:c,arrowAdjustment:u}}const t3=380,n3=12,oXn=350,cXn=150,Yk=new EventTarget;function lXn(){Yk.dispatchEvent(new Event("move"))}function uXn(e,n){const[t,r]=T.useState(null),s=T.useRef(void 0),i=T.useRef(void 0);T.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return Yk.addEventListener("move",u),()=>{Yk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var _;if(!u)return u;const d=((_=e.current)==null?void 0:_.getBoundingClientRect())??null;return d&&u.x===d.x&&u.y===d.y&&u.width===d.width&&u.height===d.height?u:d})},[e,n]);const a=T.useCallback(()=>{window.clearTimeout(i.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var u;r(((u=e.current)==null?void 0:u.getBoundingClientRect())??null)},oXn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),cXn)},[]),c=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function _Xn(e){const n=new Date(e),t=n.getFullYear()===new Date().getFullYear()?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"};return n.toLocaleDateString(E(),t)}function fXn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=iXn(),d=s.right+n3+t3<=window.innerWidth,_=s.x-n3-t3>=0,p=d?"right":_?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:w}=aXn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:n3},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ft({...N8n(k??""),enabled:!!k,subscribed:!!k}),y=T.useMemo(()=>{if(!v)return null;const B=v;let U=B.diff;if(B.truncated){const Z=U.lastIndexOf(` +`)),d=u.reduce((f,p)=>f.concat(...p),[]);return[u,d]}return[[],[]]},[e]);return T.useEffect(()=>{const c=(n==null?void 0:n.target)??uO,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var v,y;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&YU(m))return!1;const k=fO(m.code,o);if(i.current.add(m[k]),_O(a,i.current,!1)){const x=((y=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:y[0])||m.target,b=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!b)&&m.preventDefault(),r(!0)}},f=m=>{const w=fO(m.code,o);_O(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(m[w]),m.key==="Meta"&&i.current.clear(),s.current=!1},p=()=>{i.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function _O(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function fO(e,n){return n.includes(e)?"code":"key"}const CWn=()=>{const e=Lr();return T.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??i},t),!0):!1},getViewport:()=>{const[n,t,r]=e.getState().transform;return{x:n,y:t,zoom:r}},setCenter:async(n,t,r)=>e.getState().setCenter(n,t,r),fitBounds:async(n,t)=>{const{width:r,height:s,minZoom:i,maxZoom:a,panZoom:o}=e.getState(),c=i7(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(c,{duration:t==null?void 0:t.duration,ease:t==null?void 0:t.ease,interpolate:t==null?void 0:t.interpolate}),!0):!1},screenToFlowPosition:(n,t={})=>{const{transform:r,snapGrid:s,snapToGrid:i,domNode:a}=e.getState();if(!a)return n;const{x:o,y:c}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-c},d=t.snapGrid??s,f=t.snapToGrid??i;return bg(u,r,f,d)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Jh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function bG(e,n){const t=[],r=new Map,s=[];for(const i of e)if(i.type==="add"){s.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const a=r.get(i.id);a?a.push(i):r.set(i.id,[i])}for(const i of n){const a=r.get(i.id);if(!a){t.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){t.push({...a[0].item});continue}const o={...i};for(const c of a)EWn(c,o);t.push(o)}return s.length&&s.forEach(i=>{i.index!==void 0?t.splice(i.index,0,{...i.item}):t.push({...i.item})}),t}function EWn(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function NWn(e,n){return bG(e,n)}function zWn(e,n){return bG(e,n)}function X_(e,n){return{id:e,type:"select",selected:n}}function rh(e,n=new Set,t=!1){const r=[];for(const[s,i]of e){const a=n.has(s);!(i.selected===void 0&&!a)&&i.selected!==a&&(t&&(i.selected=a),r.push(X_(i.id,a)))}return r}function dO({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const o=n.get(a.id),c=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;c!==void 0&&c!==a&&t.push({id:a.id,item:a,type:"replace"}),c===void 0&&t.push({item:a,type:"add",index:i})}for(const[i]of n)r.get(i)===void 0&&t.push({id:i,type:"remove"});return t}function hO(e){return{id:e.id,type:"remove"}}const jWn=KU();function AWn(e,n,t={}){return bKn(e,n,{...t,onError:t.onError??jWn})}const pO=e=>sKn(e),TWn=e=>HU(e);function yG(e){return T.forwardRef(e)}const RWn=typeof window<"u"?T.useLayoutEffect:T.useEffect;function mO(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>MWn(()=>t(s=>s+BigInt(1))));return RWn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function MWn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const xG=T.createContext(null);function OWn({children:e}){const n=Lr(),t=T.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:w}=n.getState();let k=c;for(const y of o)k=typeof y=="function"?y(k):y;let v=dO({items:k,lookup:p});for(const y of w.values())v=y(v);d&&u(k),v.length>0?f==null||f(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:x,setNodes:b}=n.getState();y&&b(x)})},[]),r=mO(t),s=T.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const w of o)m=typeof w=="function"?w(m):w;d?u(m):f&&f(dO({items:m,lookup:p}))},[]),i=mO(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return _.jsx(xG.Provider,{value:a,children:e})}function DWn(){const e=T.useContext(xG);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const LWn=e=>!!e.panZoom;function f7(){const e=CWn(),n=Lr(),t=DWn(),r=$n(LWn),s=T.useMemo(()=>{const i=f=>n.getState().nodeLookup.get(f),a=f=>{t.nodeQueue.push(f)},o=f=>{t.edgeQueue.push(f)},c=f=>{var y,x;const{nodeLookup:p,nodeOrigin:m}=n.getState(),w=pO(f)?f:p.get(f.id),k=w.parentId?QU(w.position,w.measured,w.parentId,p,m):w.position,v={...w,position:k,width:((y=w.measured)==null?void 0:y.width)??w.width,height:((x=w.measured)==null?void 0:x.height)??w.height};return Nm(v)},u=(f,p,m={replace:!1})=>{a(w=>w.map(k=>{if(k.id===f){const v=typeof p=="function"?p(k):p;return m.replace&&pO(v)?v:{...k,...v}}return k}))},d=(f,p,m={replace:!1})=>{o(w=>w.map(k=>{if(k.id===f){const v=typeof p=="function"?p(k):p;return m.replace&&TWn(v)?v:{...k,...v}}return k}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=i(f))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(p=>({...p}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:a,setEdges:o,addNodes:f=>{const p=Array.isArray(f)?f:[f];t.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=n.getState(),[w,k,v]=m;return{nodes:f.map(y=>({...y})),edges:p.map(y=>({...y})),viewport:{x:w,y:k,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:w,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:y,triggerEdgeChanges:x,onDelete:b,onBeforeDelete:C}=n.getState(),{nodes:N,edges:z}=await lKn({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:w,onBeforeDelete:C}),A=z.length>0,j=N.length>0;if(A){const M=z.map(hO);v==null||v(z),x(M)}if(j){const M=N.map(hO);k==null||k(N),y(M)}return(j||A)&&(b==null||b({nodes:N,edges:z})),{deletedNodes:N,deletedEdges:z}},getIntersectingNodes:(f,p=!0,m)=>{const w=UM(f),k=w?f:c(f),v=m!==void 0;return k?(m||n.getState().nodes).filter(y=>{const x=n.getState().nodeLookup.get(y.id);if(x&&!w&&(y.id===f.id||!x.internals.positionAbsolute))return!1;const b=Nm(v?y:x),C=Qb(b,k);return p&&C>0||C>=b.width*b.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const k=UM(f)?f:c(f);if(!k)return!1;const v=Qb(k,p);return m&&v>0||v>=p.width*p.height||v>=k.width*k.height},updateNode:u,updateNodeData:(f,p,m={replace:!1})=>{u(f,w=>{const k=typeof p=="function"?p(w):p;return m.replace?{...w,data:k}:{...w,data:{...w.data,...k}}},m)},updateEdge:d,updateEdgeData:(f,p,m={replace:!1})=>{d(f,w=>{const k=typeof p=="function"?p(w):p;return m.replace?{...w,data:k}:{...w,data:{...w.data,...k}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return iKn(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>{var w;return Array.from(((w=n.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:m})=>{var w;return Array.from(((w=n.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:w.values())??[])},fitView:async f=>{const p=n.getState().fitViewResolver??fKn();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return T.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const gO=e=>e.selected,IWn=typeof window<"u"?window:void 0;function $Wn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Lr(),{deleteElements:r}=f7(),s=jm(e,{actInsideInputWithModifier:!1}),i=jm(n,{target:IWn});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(gO),edges:a.filter(gO)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function BWn(e){const n=Lr();T.useEffect(()=>{const t=()=>{var s,i,a,o;if(!e.current||!(((i=(s=e.current).checkVisibility)==null?void 0:i.call(s))??!0))return!1;const r=a7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",Wo.error004())),n.setState({width:r.width||500,height:r.height||500})};if(e.current){t(),window.addEventListener("resize",t);const r=new ResizeObserver(()=>t());return r.observe(e.current),()=>{window.removeEventListener("resize",t),r&&e.current&&r.unobserve(e.current)}}},[])}const kx={position:"absolute",width:"100%",height:"100%",top:0,left:0},PWn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function FWn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=kf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:w,noWheelClassName:k,noPanClassName:v,onViewportChange:y,isControlledViewport:x,paneClickDistance:b,selectionOnDrag:C}){const N=Lr(),z=T.useRef(null),{userSelectionActive:A,lib:j,connectionInProgress:M}=$n(PWn,Or),D=jm(p),L=T.useRef();BWn(z);const B=T.useCallback(U=>{y==null||y({x:U[0],y:U[1],zoom:U[2]}),x||N.setState({transform:U})},[y,x]);return T.useEffect(()=>{if(z.current){L.current=QKn({domNode:z.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:K=>N.setState(Z=>Z.paneDragging===K?Z:{paneDragging:K}),onPanZoomStart:(K,Z)=>{const{onViewportChangeStart:ee,onMoveStart:$}=N.getState();$==null||$(K,Z),ee==null||ee(Z)},onPanZoom:(K,Z)=>{const{onViewportChange:ee,onMove:$}=N.getState();$==null||$(K,Z),ee==null||ee(Z)},onPanZoomEnd:(K,Z)=>{const{onViewportChangeEnd:ee,onMoveEnd:$}=N.getState();$==null||$(K,Z),ee==null||ee(Z)}});const{x:U,y:H,zoom:Q}=L.current.getViewport();return N.setState({panZoom:L.current,transform:[U,H,Q],domNode:z.current.closest(".react-flow")}),()=>{var K;(K=L.current)==null||K.destroy()}}},[]),T.useEffect(()=>{var U;(U=L.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:v,userSelectionActive:A,noWheelClassName:k,lib:j,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:b})},[e,n,t,r,s,i,a,o,D,m,v,A,k,j,B,M,C,b]),_.jsx("div",{className:"react-flow__renderer",ref:z,style:kx,children:w})}const HWn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function qWn(){const{userSelectionActive:e,userSelectionRect:n}=$n(HWn,Or);return e&&n?_.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const J4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},UWn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function GWn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=Em.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:d,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:w,children:k}){const v=T.useRef(0),y=Lr(),{userSelectionActive:x,elementsSelectable:b,dragging:C,panBy:N,autoPanSpeed:z}=$n(UWn,Or),A=b&&(e||x),j=T.useRef(null),M=T.useRef(),D=T.useRef(new Set),L=T.useRef(new Set),B=T.useRef(!1),U=T.useRef(!1),H=T.useRef({x:0,y:0}),Q=T.useRef(!1),K=G=>{if(U.current||B.current||y.getState().connection.inProgress){U.current=!1,B.current=!1;return}u==null||u(G),y.getState().resetSelectedElements(),y.setState({nodesSelectionActive:!1})},Z=G=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){G.preventDefault();return}d==null||d(G)},ee=f?G=>f(G):void 0,$=G=>{U.current&&(G.stopPropagation(),U.current=!1)},I=G=>{var He,ht;const{domNode:ae,transform:le}=y.getState();if(M.current=ae==null?void 0:ae.getBoundingClientRect(),!M.current)return;const me=G.target===j.current;if(!me&&!!G.target.closest(".nokey")||!e||!(a&&me||n)||G.button!==0||!G.isPrimary)return;(ht=(He=G.target)==null?void 0:He.setPointerCapture)==null||ht.call(He,G.pointerId),U.current=!1;const{x:Fe,y:We}=Uo(G.nativeEvent,M.current),Oe=bg({x:Fe,y:We},le);y.setState({userSelectionRect:{width:0,height:0,startX:Oe.x,startY:Oe.y,x:Fe,y:We}}),me||(G.stopPropagation(),G.preventDefault())};function F(G,ae){const{userSelectionRect:le}=y.getState();if(!le)return;const{transform:me,nodeLookup:ve,edgeLookup:Ee,connectionLookup:Fe,triggerNodeChanges:We,triggerEdgeChanges:Oe,defaultEdgeOptions:He}=y.getState(),ht={x:le.startX,y:le.startY},{x:xt,y:Kt}=Jh(ht,me),Ut={startX:ht.x,startY:ht.y,x:Gct.id)),L.current=new Set;const ot=(He==null?void 0:He.selectable)??!0;for(const ct of D.current){const ye=Fe.get(ct);if(ye)for(const{edgeId:Be}of ye.values()){const Ke=Ee.get(Be);Ke&&(Ke.selectable??ot)&&L.current.add(Be)}}if(!GM(Ht,D.current)){const ct=rh(ve,D.current,!0);We(ct)}if(!GM($e,L.current)){const ct=rh(Ee,L.current);Oe(ct)}y.setState({userSelectionRect:Ut,userSelectionActive:!0,nodesSelectionActive:!1})}function q(){if(!s||!M.current)return;const[G,ae]=s7(H.current,M.current,z);N({x:G,y:ae}).then(le=>{if(!U.current||!le){v.current=requestAnimationFrame(q);return}const{x:me,y:ve}=H.current;F(me,ve),v.current=requestAnimationFrame(q)})}const V=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};T.useEffect(()=>()=>V(),[]);const ie=G=>{const{userSelectionRect:ae,transform:le,resetSelectedElements:me}=y.getState();if(!M.current||!ae)return;const{x:ve,y:Ee}=Uo(G.nativeEvent,M.current);H.current={x:ve,y:Ee};const Fe=Jh({x:ae.startX,y:ae.startY},le);if(!U.current){const We=n?0:i;if(Math.hypot(ve-Fe.x,Ee-Fe.y)<=We)return;me(),o==null||o(G)}U.current=!0,Q.current||(q(),Q.current=!0),F(ve,Ee)},oe=G=>{var ae,le;if(!A){G.target===j.current&&y.getState().connection.inProgress&&(B.current=!0);return}G.button===0&&((le=(ae=G.target)==null?void 0:ae.releasePointerCapture)==null||le.call(ae,G.pointerId),!x&&G.target===j.current&&y.getState().userSelectionRect&&(K==null||K(G)),y.setState({userSelectionActive:!1,userSelectionRect:null}),U.current&&(c==null||c(G),y.setState({nodesSelectionActive:D.current.size>0})),V())},ce=G=>{var ae,le;(le=(ae=G.target)==null?void 0:ae.releasePointerCapture)==null||le.call(ae,G.pointerId),V()},ne=r===!0||Array.isArray(r)&&r.includes(0);return _.jsxs("div",{className:Cs(["react-flow__pane",{draggable:ne,dragging:C,selection:e}]),onClick:A?void 0:J4(K,j),onContextMenu:J4(Z,j),onWheel:J4(ee,j),onPointerEnter:A?void 0:p,onPointerMove:A?ie:m,onPointerUp:oe,onPointerCancel:A?ce:void 0,onPointerDownCapture:A?I:void 0,onClickCapture:A?$:void 0,onPointerLeave:w,ref:j,style:kx,children:[k,_.jsx(qWn,{})]})}function Xk({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:c}=n.getState(),u=o.get(e);if(!u){c==null||c("012",Wo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):s([e])}function wG({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Lr(),[c,u]=T.useState(!1),d=T.useRef();return T.useEffect(()=>{d.current=DKn({getStoreItems:()=>o.getState(),onNodeMouseDown:f=>{Xk({id:f,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!d.current))return d.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var f;(f=d.current)==null||f.destroy()}},[t,r,n,i,e,s,a]),c}const VWn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function kG(){const e=Lr();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,p=VWn(a),m=s?i[0]:5,w=s?i[1]:5,k=t.direction.x*m*t.factor,v=t.direction.y*w*t.factor;for(const[,y]of u){if(!p(y))continue;let x={x:y.internals.positionAbsolute.x+k,y:y.internals.positionAbsolute.y+v};s&&(x=vg(x,i));const{position:b,positionAbsolute:C}=qU({nodeId:y.id,nextPosition:x,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:o});y.position=b,y.internals.positionAbsolute=C,f.set(y.id,y)}c(f)},[])}const d7=T.createContext(null),KWn=d7.Provider;d7.Consumer;const SG=()=>T.useContext(d7),WWn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),CG=T.createContext(null);function QWn({children:e}){const n=$n(WWn,Or);return _.jsx(CG.Provider,{value:n,children:e})}function XWn(){const e=T.useContext(CG);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const YWn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},ZWn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return YWn;const d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===t;return{connectingFrom:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===n&&(o==null?void 0:o.type)===t,connectingTo:d,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Yh.Strict?(o==null?void 0:o.type)!==t:e!==(o==null?void 0:o.nodeId)||n!==(o==null?void 0:o.id),connectionInProcess:!!o,clickConnectionInProcess:!!s,valid:d&&u}};function JWn({type:e="source",position:n=It.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:d,onTouchStart:f,...p},m){var Q,K;const w=a||null,k=e==="target",v=Lr(),y=SG(),{connectOnClick:x,noPanClassName:b,rfId:C}=XWn(),{connectingFrom:N,connectingTo:z,clickConnecting:A,isPossibleEndHandle:j,connectionInProcess:M,clickConnectionInProcess:D,valid:L}=$n(ZWn(y,w,e),Or);y||(K=(Q=v.getState()).onError)==null||K.call(Q,"010",Wo.error010());const B=Z=>{const{defaultEdgeOptions:ee,onConnect:$,hasDefaultEdges:I}=v.getState(),F={...ee,...Z};if(I){const{edges:q,setEdges:V,onError:ie}=v.getState();V(AWn(F,q,{onError:ie}))}$==null||$(F),o==null||o(F)},U=Z=>{if(!y)return;const ee=ZU(Z.nativeEvent);if(s&&(ee&&Z.button===0||!ee)){const $=v.getState();Qk.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:w,nodeId:y,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...I)=>{var F,q;return(q=(F=v.getState()).onConnectEnd)==null?void 0:q.call(F,...I)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...I)=>{var F,q;return((q=(F=v.getState()).isValidConnection)==null?void 0:q.call(F,...I))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}ee?d==null||d(Z):f==null||f(Z)},H=Z=>{const{onClickConnectStart:ee,onClickConnectEnd:$,connectionClickStartHandle:I,connectionMode:F,isValidConnection:q,lib:V,rfId:ie,nodeLookup:oe,connection:ce}=v.getState();if(!y||!I&&!s)return;if(!I){ee==null||ee(Z.nativeEvent,{nodeId:y,handleId:w,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,id:w}});return}const ne=XU(Z.target),G=t||q,{connection:ae,isValid:le}=Qk.isValid(Z.nativeEvent,{handle:{nodeId:y,id:w,type:e},connectionMode:F,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:G,flowId:ie,doc:ne,lib:V,nodeLookup:oe});le&&ae&&B(ae);const me=structuredClone(ce);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,$==null||$(Z,me),v.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":w,"data-nodeid":y,"data-handlepos":n,"data-id":`${C}-${y}-${w}-${e}`,className:Cs(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",b,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:N,connectingto:z,valid:L,connectionindicator:r&&(!M||j)&&(M||D?i:s)}]),onMouseDown:U,onTouchStart:U,onClick:x?H:void 0,ref:m,...p,children:c})}const Pc=T.memo(yG(JWn));function eQn({data:e,isConnectable:n,sourcePosition:t=It.Bottom}){return _.jsxs(_.Fragment,{children:[e==null?void 0:e.label,_.jsx(Pc,{type:"source",position:t,isConnectable:n})]})}function tQn({data:e,isConnectable:n,targetPosition:t=It.Top,sourcePosition:r=It.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(Pc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,_.jsx(Pc,{type:"source",position:r,isConnectable:n})]})}function nQn(){return null}function rQn({data:e,isConnectable:n,targetPosition:t=It.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(Pc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Xb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},vO={input:eQn,default:tQn,output:rQn,group:nQn};function sQn(e){var n,t,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((t=e.style)==null?void 0:t.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const iQn=e=>{const{width:n,height:t,x:r,y:s}=gg(e.nodeLookup,{filter:i=>!!i.selected});return{width:qo(n)?n:null,height:qo(t)?t:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function aQn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Lr(),{width:s,height:i,transformString:a,userSelectionActive:o}=$n(iQn,Or),c=kG(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const d=!o&&s!==null&&i!==null;if(wG({nodeRef:u,disabled:!d}),!d)return null;const f=e?m=>{const w=r.getState().nodes.filter(k=>k.selected);e(m,w)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Xb,m.key)&&(m.preventDefault(),c({direction:Xb[m.key],factor:m.shiftKey?4:1}))};return _.jsx("div",{className:Cs(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:_.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const bO=typeof window<"u"?window:void 0,oQn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function EG({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:b,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:A,panOnDrag:j,autoPanOnSelection:M,defaultViewport:D,translateExtent:L,minZoom:B,maxZoom:U,preventScrolling:H,onSelectionContextMenu:Q,noWheelClassName:K,noPanClassName:Z,disableKeyboardA11y:ee,onViewportChange:$,isControlledViewport:I}){const{nodesSelectionActive:F,userSelectionActive:q}=$n(oQn,Or),V=jm(u,{target:bO}),ie=jm(k,{target:bO}),oe=ie||j,ce=ie||C,ne=d&&oe!==!0,G=V||q||ne;return $Wn({deleteKeyCode:c,multiSelectionKeyCode:w}),_.jsx(FWn,{onPaneContextMenu:i,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:b,panOnScroll:ce,panOnScrollSpeed:N,panOnScrollMode:z,zoomOnDoubleClick:A,panOnDrag:!V&&oe,defaultViewport:D,translateExtent:L,minZoom:B,maxZoom:U,zoomActivationKeyCode:v,preventScrolling:H,noWheelClassName:K,noPanClassName:Z,onViewportChange:$,isControlledViewport:I,paneClickDistance:o,selectionOnDrag:ne,children:_.jsxs(GWn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:oe,autoPanOnSelection:M,isSelecting:!!G,selectionMode:f,selectionKeyPressed:V,paneClickDistance:o,selectionOnDrag:ne,children:[e,F&&_.jsx(aQn,{onSelectionContextMenu:Q,noPanClassName:Z,disableKeyboardA11y:ee})]})})}EG.displayName="FlowRenderer";const cQn=T.memo(EG),lQn=e=>n=>e?r7(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(t=>t.id):Array.from(n.nodeLookup.keys());function uQn(e){return $n(T.useCallback(lQn(e),[e]),Or)}const _Qn=e=>e.updateNodeInternals;function fQn(){const e=$n(_Qn),[n]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const i=s.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:s.target,force:!0})}),e(r)}));return T.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function dQn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Lr(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),c=T.useRef(e.targetPosition),u=T.useRef(n),d=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!d||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[d,e.hidden]),T.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),T.useEffect(()=>{if(i.current){const f=u.current!==n,p=o.current!==e.sourcePosition,m=c.current!==e.targetPosition;(f||p||m)&&(u.current=n,o.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),i}function hQn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:w,rfId:k,nodeTypes:v,nodeClickDistance:y,onError:x}){const{node:b,internals:C,isParent:N}=$n(G=>{const ae=G.nodeLookup.get(e),le=G.parentLookup.has(e);return{node:ae,internals:ae.internals,isParent:le}},Or);let z=b.type||"default",A=(v==null?void 0:v[z])||vO[z];A===void 0&&(x==null||x("003",Wo.error003(z)),z="default",A=(v==null?void 0:v.default)||vO.default);const j=!!(b.draggable||o&&typeof b.draggable>"u"),M=!!(b.selectable||c&&typeof b.selectable>"u"),D=!!(b.connectable||u&&typeof b.connectable>"u"),L=!!(b.focusable||d&&typeof b.focusable>"u"),B=Lr(),U=WU(b),H=dQn({node:b,nodeType:z,hasDimensions:U,resizeObserver:f}),Q=wG({nodeRef:H,disabled:b.hidden||!j,noDragClassName:p,handleSelector:b.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:y}),K=kG();if(b.hidden)return null;const Z=Yl(b),ee=sQn(b),$=M||j||n||t||r||s,I=t?G=>t(G,{...C.userNode}):void 0,F=r?G=>r(G,{...C.userNode}):void 0,q=s?G=>s(G,{...C.userNode}):void 0,V=i?G=>i(G,{...C.userNode}):void 0,ie=a?G=>a(G,{...C.userNode}):void 0,oe=G=>{const{selectNodesOnDrag:ae,nodeDragThreshold:le}=B.getState();M&&(!ae||!j||le>0)&&Xk({id:e,store:B,nodeRef:H}),n&&n(G,{...C.userNode})},ce=G=>{if(!(YU(G.nativeEvent)||w)){if($U.includes(G.key)&&M){const ae=G.key==="Escape";Xk({id:e,store:B,unselect:ae,nodeRef:H})}else if(j&&b.selected&&Object.prototype.hasOwnProperty.call(Xb,G.key)){G.preventDefault();const{ariaLabelConfig:ae}=B.getState();B.setState({ariaLiveMessage:ae["node.a11yDescription.ariaLiveMessage"]({direction:G.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),K({direction:Xb[G.key],factor:G.shiftKey?4:1})}}},ne=()=>{var Fe;if(w||!((Fe=H.current)!=null&&Fe.matches(":focus-visible")))return;const{transform:G,width:ae,height:le,autoPanOnNodeFocus:me,setCenter:ve}=B.getState();if(!me)return;r7(new Map([[e,b]]),{x:0,y:0,width:ae,height:le},G,!0).length>0||ve(b.position.x+Z.width/2,b.position.y+Z.height/2,{zoom:G[2]})};return _.jsx("div",{className:Cs(["react-flow__node",`react-flow__node-${z}`,{[m]:j},b.className,{selected:b.selected,selectable:M,parent:N,draggable:j,dragging:Q}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:U?"visible":"hidden",...b.style,...ee},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:F,onMouseLeave:q,onContextMenu:V,onClick:oe,onDoubleClick:ie,onKeyDown:L?ce:void 0,tabIndex:L?0:void 0,onFocus:L?ne:void 0,role:b.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${mG}-${k}`,"aria-label":b.ariaLabel,...b.domAttributes,children:_.jsx(KWn,{value:e,children:_.jsx(A,{id:e,data:b.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:b.selected??!1,selectable:M,draggable:j,deletable:b.deletable??!0,isConnectable:D,sourcePosition:b.sourcePosition,targetPosition:b.targetPosition,dragging:Q,dragHandle:b.dragHandle,zIndex:C.z,parentId:b.parentId,...Z})})})}var pQn=T.memo(hQn);const mQn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function NG(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=$n(mQn,Or),a=uQn(e.onlyRenderVisibleElements),o=fQn();return _.jsx("div",{className:"react-flow__nodes",style:kx,children:a.map(c=>_.jsx(pQn,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}NG.displayName="NodeRenderer";const gQn=T.memo(NG);function vQn(e){return $n(T.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const i=t.nodeLookup.get(s.source),a=t.nodeLookup.get(s.target);i&&a&&mKn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Or)}const bQn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return _.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},yQn=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return _.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},yO={[Kb.Arrow]:bQn,[Kb.ArrowClosed]:yQn};function xQn(e){const n=Lr();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(yO,e)?yO[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",Wo.error009(e)),null)},[e])}const wQn=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const c=xQn(n);return c?_.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0",children:_.jsx(c,{color:t,strokeWidth:a})}):null},zG=({defaultColor:e,rfId:n})=>{const t=$n(i=>i.edges),r=$n(i=>i.defaultEdgeOptions),s=T.useMemo(()=>SKn(t,{id:n,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[t,r,n,e]);return s.length?_.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:_.jsx("defs",{children:s.map(i=>_.jsx(wQn,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};zG.displayName="MarkerDefinitions";var kQn=T.memo(zG);function jG({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...d}){const[f,p]=T.useState({x:1,y:0,width:0,height:0}),m=Cs(["react-flow__edge-textwrapper",u]),w=T.useRef(null);return T.useEffect(()=>{if(w.current){const k=w.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?_.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...d,children:[s&&_.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),_.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:w,style:r,children:t}),c]}):null}jG.displayName="EdgeText";const SQn=T.memo(jG);function Sx({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...d,d:e,fill:"none",className:Cs(["react-flow__edge-path",d.className])}),u?_.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&qo(n)&&qo(t)?_.jsx(SQn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function xO({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===It.Left||e===It.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function AG({sourceX:e,sourceY:n,sourcePosition:t=It.Bottom,targetX:r,targetY:s,targetPosition:i=It.Top}){const[a,o]=xO({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=xO({pos:i,x1:r,y1:s,x2:e,y2:n}),[d,f,p,m]=JU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${o} ${c},${u} ${r},${s}`,d,f,p,m]}function TG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})=>{const[x,b,C]=AG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return _.jsx(Sx,{id:N,path:x,labelX:b,labelY:C,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})})}const CQn=TG({isInternal:!1}),RG=TG({isInternal:!0});CQn.displayName="SimpleBezierEdge";RG.displayName="SimpleBezierEdgeInternal";function MG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:m=It.Bottom,targetPosition:w=It.Top,markerEnd:k,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[b,C,N]=Vk({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:w,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),z=e.isInternal?void 0:n;return _.jsx(Sx,{id:z,path:b,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:k,markerStart:v,interactionWidth:x})})}const OG=MG({isInternal:!1}),DG=MG({isInternal:!0});OG.displayName="SmoothStepEdge";DG.displayName="SmoothStepEdgeInternal";function LG(e){return T.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return _.jsx(OG,{...t,id:r,pathOptions:T.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const EQn=LG({isInternal:!1}),IG=LG({isInternal:!0});EQn.displayName="StepEdge";IG.displayName="StepEdgeInternal";function $G(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})=>{const[v,y,x]=nG({sourceX:t,sourceY:r,targetX:s,targetY:i}),b=e.isInternal?void 0:n;return _.jsx(Sx,{id:b,path:v,labelX:y,labelY:x,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})})}const NQn=$G({isInternal:!1}),BG=$G({isInternal:!0});NQn.displayName="StraightEdge";BG.displayName="StraightEdgeInternal";function PG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=It.Bottom,targetPosition:o=It.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[b,C,N]=eG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:y==null?void 0:y.curvature}),z=e.isInternal?void 0:n;return _.jsx(Sx,{id:z,path:b,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:x})})}const zQn=PG({isInternal:!1}),FG=PG({isInternal:!0});zQn.displayName="BezierEdge";FG.displayName="BezierEdgeInternal";const wO={default:FG,straight:BG,step:IG,smoothstep:DG,simplebezier:RG},kO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},jQn=(e,n,t)=>t===It.Left?e-n:t===It.Right?e+n:e,AQn=(e,n,t)=>t===It.Top?e-n:t===It.Bottom?e+n:e,SO="react-flow__edgeupdater";function CO({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return _.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:Cs([SO,`${SO}-${o}`]),cx:jQn(n,r,e),cy:AQn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function TQn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const w=Lr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:A,connectionMode:j,connectionRadius:M,lib:D,onConnectStart:L,cancelConnection:B,nodeLookup:U,rfId:H,panBy:Q,updateConnection:K}=w.getState(),Z=N.type==="target",ee=(F,q)=>{p(!1),f==null||f(F,t,N.type,q)},$=F=>u==null?void 0:u(t,F),I=(F,q)=>{p(!0),d==null||d(C,t,N.type),L==null||L(F,q)};Qk.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:j,connectionRadius:M,domNode:A,handleId:N.id,nodeId:N.nodeId,nodeLookup:U,isTarget:Z,edgeUpdaterType:N.type,lib:D,flowId:H,cancelConnection:B,panBy:Q,isValidConnection:(...F)=>{var q,V;return((V=(q=w.getState()).isValidConnection)==null?void 0:V.call(q,...F))??!0},onConnect:$,onConnectStart:I,onConnectEnd:(...F)=>{var q,V;return(V=(q=w.getState()).onConnectEnd)==null?void 0:V.call(q,...F)},onReconnectEnd:ee,updateConnection:K,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},v=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),y=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>m(!0),b=()=>m(!1);return _.jsxs(_.Fragment,{children:[(e===!0||e==="source")&&_.jsx(CO,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:b,type:"source"}),(e===!0||e==="target")&&_.jsx(CO,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:y,onMouseEnter:x,onMouseOut:b,type:"target"})]})}function RQn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:w,edgeTypes:k,noPanClassName:v,onError:y,disableKeyboardA11y:x}){let b=$n(ve=>ve.edgeLookup.get(e));const C=$n(ve=>ve.defaultEdgeOptions);b=C?{...C,...b}:b;let N=b.type||"default",z=(k==null?void 0:k[N])||wO[N];z===void 0&&(y==null||y("011",Wo.error011(N)),N="default",z=(k==null?void 0:k.default)||wO.default);const A=!!(b.focusable||n&&typeof b.focusable>"u"),j=typeof f<"u"&&(b.reconnectable||t&&typeof b.reconnectable>"u"),M=!!(b.selectable||r&&typeof b.selectable>"u"),D=T.useRef(null),[L,B]=T.useState(!1),[U,H]=T.useState(!1),Q=Lr(),{zIndex:K=b.zIndex,sourceX:Z,sourceY:ee,targetX:$,targetY:I,sourcePosition:F,targetPosition:q}=$n(T.useCallback(ve=>{const Ee=ve.nodeLookup.get(b.source),Fe=ve.nodeLookup.get(b.target);if(!Ee||!Fe)return kO;const We=kKn({id:e,sourceNode:Ee,targetNode:Fe,sourceHandle:b.sourceHandle||null,targetHandle:b.targetHandle||null,connectionMode:ve.connectionMode,onError:y}),Oe=pKn({selected:b.selected,zIndex:b.zIndex,sourceNode:Ee,targetNode:Fe,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode});return{...We||kO,zIndex:Oe}},[b.source,b.target,b.sourceHandle,b.targetHandle,b.selected,b.zIndex]),Or),V=T.useMemo(()=>b.markerStart?`url('#${Kk(b.markerStart,w)}')`:void 0,[b.markerStart,w]),ie=T.useMemo(()=>b.markerEnd?`url('#${Kk(b.markerEnd,w)}')`:void 0,[b.markerEnd,w]);if(b.hidden||Z===null||ee===null||$===null||I===null)return null;const oe=ve=>{var Oe;const{addSelectedEdges:Ee,unselectNodesAndEdges:Fe,multiSelectionActive:We}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),b.selected&&We?(Fe({nodes:[],edges:[b]}),(Oe=D.current)==null||Oe.blur()):Ee([e])),s&&s(ve,b)},ce=i?ve=>{i(ve,{...b})}:void 0,ne=a?ve=>{a(ve,{...b})}:void 0,G=o?ve=>{o(ve,{...b})}:void 0,ae=c?ve=>{c(ve,{...b})}:void 0,le=u?ve=>{u(ve,{...b})}:void 0,me=ve=>{var Ee;if(!x&&$U.includes(ve.key)&&M){const{unselectNodesAndEdges:Fe,addSelectedEdges:We}=Q.getState();ve.key==="Escape"?((Ee=D.current)==null||Ee.blur(),Fe({edges:[b]})):We([e])}};return _.jsx("svg",{style:{zIndex:K},children:_.jsxs("g",{className:Cs(["react-flow__edge",`react-flow__edge-${N}`,b.className,v,{selected:b.selected,animated:b.animated,inactive:!M&&!s,updating:L,selectable:M}]),onClick:oe,onDoubleClick:ce,onContextMenu:ne,onMouseEnter:G,onMouseMove:ae,onMouseLeave:le,onKeyDown:A?me:void 0,tabIndex:A?0:void 0,role:b.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":b.ariaLabel===null?void 0:b.ariaLabel||`Edge from ${b.source} to ${b.target}`,"aria-describedby":A?`${gG}-${w}`:void 0,ref:D,...b.domAttributes,children:[!U&&_.jsx(z,{id:e,source:b.source,target:b.target,type:b.type,selected:b.selected,animated:b.animated,selectable:M,deletable:b.deletable??!0,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,sourceX:Z,sourceY:ee,targetX:$,targetY:I,sourcePosition:F,targetPosition:q,data:b.data,style:b.style,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerStart:V,markerEnd:ie,pathOptions:"pathOptions"in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth}),j&&_.jsx(TQn,{edge:b,isReconnectable:j,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:ee,targetX:$,targetY:I,sourcePosition:F,targetPosition:q,setUpdateHover:B,setReconnecting:H})]})})}var MQn=T.memo(RQn);const OQn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function HG({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,onError:b}=$n(OQn,Or),C=vQn(n);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(kQn,{defaultColor:e,rfId:t}),C.map(N=>_.jsx(MQn,{id:N,edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,rfId:t,onError:b,edgeTypes:r,disableKeyboardA11y:k},N))]})}HG.displayName="EdgeRenderer";const DQn=T.memo(HG),LQn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function IQn({children:e}){const n=$n(LQn);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function $Qn(e){const n=f7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const BQn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function PQn(e){const n=$n(BQn),t=Lr();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function FQn(e){return e.connection.inProgress?{...e.connection,to:bg(e.connection.to,e.transform)}:{...e.connection}}function HQn(e){return FQn}function qQn(e){const n=HQn();return $n(n,Or)}const UQn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function GQn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=$n(UQn,Or);return!(i&&s&&c)?null:_.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:Cs(["react-flow__connection",FU(o)]),children:_.jsx(qG,{style:n,type:t,CustomComponent:r,isValid:o})})})}const qG=({style:e,type:n=$u.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:p,pointer:m}=qQn();if(!s)return;if(t)return _.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:FU(r),toNode:d,toHandle:f,pointer:m});let w="";const k={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case $u.Bezier:[w]=eG(k);break;case $u.SimpleBezier:[w]=AG(k);break;case $u.Step:[w]=Vk({...k,borderRadius:0});break;case $u.SmoothStep:[w]=Vk(k);break;default:[w]=nG(k)}return _.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};qG.displayName="ConnectionLine";const VQn={};function EO(e=VQn){T.useRef(e),Lr(),T.useEffect(()=>{},[e])}function KQn(){Lr(),T.useRef(!1),T.useEffect(()=>{},[])}function UG({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:y,selectionKeyCode:x,selectionOnDrag:b,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:A,deleteKeyCode:j,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:L,translateExtent:B,minZoom:U,maxZoom:H,preventScrolling:Q,defaultMarkerColor:K,zoomOnScroll:Z,zoomOnPinch:ee,panOnScroll:$,panOnScrollSpeed:I,panOnScrollMode:F,zoomOnDoubleClick:q,panOnDrag:V,autoPanOnSelection:ie,onPaneClick:oe,onPaneMouseEnter:ce,onPaneMouseMove:ne,onPaneMouseLeave:G,onPaneScroll:ae,onPaneContextMenu:le,paneClickDistance:me,nodeClickDistance:ve,onEdgeContextMenu:Ee,onEdgeMouseEnter:Fe,onEdgeMouseMove:We,onEdgeMouseLeave:Oe,reconnectRadius:He,onReconnect:ht,onReconnectStart:xt,onReconnectEnd:Kt,noDragClassName:Ut,noWheelClassName:Ht,noPanClassName:$e,disableKeyboardA11y:ot,nodeExtent:ct,rfId:ye,viewport:Be,onViewportChange:Ke}){return EO(e),EO(n),KQn(),$Qn(t),PQn(Be),_.jsx(cQn,{onPaneClick:oe,onPaneMouseEnter:ce,onPaneMouseMove:ne,onPaneMouseLeave:G,onPaneContextMenu:le,onPaneScroll:ae,paneClickDistance:me,deleteKeyCode:j,selectionKeyCode:x,selectionOnDrag:b,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:z,zoomActivationKeyCode:A,elementsSelectable:D,zoomOnScroll:Z,zoomOnPinch:ee,zoomOnDoubleClick:q,panOnScroll:$,panOnScrollSpeed:I,panOnScrollMode:F,panOnDrag:V,autoPanOnSelection:ie,defaultViewport:L,translateExtent:B,minZoom:U,maxZoom:H,onSelectionContextMenu:f,preventScrolling:Q,noDragClassName:Ut,noWheelClassName:Ht,noPanClassName:$e,disableKeyboardA11y:ot,onViewportChange:Ke,isControlledViewport:!!Be,children:_.jsxs(IQn,{children:[_.jsx(DQn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:ht,onReconnectStart:xt,onReconnectEnd:Kt,onlyRenderVisibleElements:M,onEdgeContextMenu:Ee,onEdgeMouseEnter:Fe,onEdgeMouseMove:We,onEdgeMouseLeave:Oe,reconnectRadius:He,defaultMarkerColor:K,noPanClassName:$e,disableKeyboardA11y:ot,rfId:ye}),_.jsx(GQn,{style:k,type:w,component:v,containerStyle:y}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(gQn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:ve,onlyRenderVisibleElements:M,noPanClassName:$e,noDragClassName:Ut,disableKeyboardA11y:ot,nodeExtent:ct,rfId:ye}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}UG.displayName="GraphView";const WQn=T.memo(UG),QQn=KU(),NO=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,w=new Map,k=new Map,v=new Map,y=r??n??[],x=t??e??[],b=d??[0,0],C=f??Cm;iG(k,v,y);const{nodesInitialized:N}=Wk(x,m,w,{nodeOrigin:b,nodeExtent:C,zIndexMode:p});let z=[0,0,1];if(a&&s&&i){const A=gg(m,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:j,y:M,zoom:D}=i7(A,s,i,c,u,(o==null?void 0:o.padding)??.1);z=[j,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:z,nodes:x,nodesInitialized:N,nodeLookup:m,parentLookup:w,edges:y,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Cm,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Yh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:b,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:o,fitViewResolver:null,connection:{...PU},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:QQn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BU,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},XQn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>aWn((m,w)=>{async function k(){const{nodeLookup:v,panZoom:y,fitViewOptions:x,fitViewResolver:b,width:C,height:N,minZoom:z,maxZoom:A}=w();y&&(await cKn({nodes:v,width:C,height:N,panZoom:y,minZoom:z,maxZoom:A},x),b==null||b.resolve(!0),m({fitViewResolver:null}))}return{...NO({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:y,parentLookup:x,nodeOrigin:b,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:z,nodesSelectionActive:A}=w(),{nodesInitialized:j,hasSelectedNodes:M}=Wk(v,y,x,{nodeOrigin:b,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z}),D=A&&M;N&&j?(k(),m({nodes:v,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:j,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:y,edgeLookup:x}=w();iG(y,x,v),m({edges:v})},setDefaultNodesAndEdges:(v,y)=>{if(v){const{setNodes:x}=w();x(v),m({hasDefaultNodes:!0})}if(y){const{setEdges:x}=w();x(y),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:y,nodeLookup:x,parentLookup:b,domNode:C,nodeOrigin:N,nodeExtent:z,debug:A,fitViewQueued:j,zIndexMode:M}=w(),{changes:D,updatedInternals:L}=TKn(v,x,b,C,N,z,M);L&&(NKn(x,b,{nodeOrigin:N,nodeExtent:z,zIndexMode:M}),j?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(A&&console.log("React Flow: trigger node changes",D),y==null||y(D)))},updateNodePositions:(v,y=!1)=>{const x=[];let b=[];const{nodeLookup:C,triggerNodeChanges:N,connection:z,updateConnection:A,onNodesChangeMiddlewareMap:j}=w();for(const[M,D]of v){const L=C.get(M),B=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&(D!=null&&D.position)),U={id:M,type:"position",position:B?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:y};if(L&&z.inProgress&&z.fromNode.id===L.id){const H=Hf(L,z.fromHandle,It.Left,!0);A({...z,from:H})}B&&L.parentId&&x.push({id:M,parentId:L.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),b.push(U)}if(x.length>0){const{parentLookup:M,nodeOrigin:D}=w(),L=_7(x,C,M,D);b.push(...L)}for(const M of j.values())b=M(b);N(b)},triggerNodeChanges:v=>{const{onNodesChange:y,setNodes:x,nodes:b,hasDefaultNodes:C,debug:N}=w();if(v!=null&&v.length){if(C){const z=NWn(v,b);x(z)}N&&console.log("React Flow: trigger node changes",v),y==null||y(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:y,setEdges:x,edges:b,hasDefaultEdges:C,debug:N}=w();if(v!=null&&v.length){if(C){const z=zWn(v,b);x(z)}N&&console.log("React Flow: trigger edge changes",v),y==null||y(v)}},addSelectedNodes:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:b,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(y){const z=v.map(A=>X_(A,!0));C(z);return}C(rh(b,new Set([...v]),!0)),N(rh(x))},addSelectedEdges:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:b,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(y){const z=v.map(A=>X_(A,!0));N(z);return}N(rh(x,new Set([...v]))),C(rh(b,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:y}={})=>{const{edges:x,nodes:b,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:z}=w(),A=v||b,j=y||x,M=[];for(const L of A){if(!L.selected)continue;const B=C.get(L.id);B&&(B.selected=!1),M.push(X_(L.id,!1))}const D=[];for(const L of j)L.selected&&D.push(X_(L.id,!1));N(M),z(D)},setMinZoom:v=>{const{panZoom:y,maxZoom:x}=w();y==null||y.setScaleExtent([v,x]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:y,minZoom:x}=w();y==null||y.setScaleExtent([x,v]),m({maxZoom:v})},setTranslateExtent:v=>{var y;(y=w().panZoom)==null||y.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:y,triggerNodeChanges:x,triggerEdgeChanges:b,elementsSelectable:C}=w();if(!C)return;const N=y.reduce((A,j)=>j.selected?[...A,X_(j.id,!1)]:A,[]),z=v.reduce((A,j)=>j.selected?[...A,X_(j.id,!1)]:A,[]);x(N),b(z)},setNodeExtent:v=>{const{nodes:y,nodeLookup:x,parentLookup:b,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:z,zIndexMode:A}=w();v[0][0]===z[0][0]&&v[0][1]===z[0][1]&&v[1][0]===z[1][0]&&v[1][1]===z[1][1]||(Wk(y,x,b,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:y,width:x,height:b,panZoom:C,translateExtent:N}=w();return RKn({delta:v,panZoom:C,transform:y,translateExtent:N,width:x,height:b})},setCenter:async(v,y,x)=>{const{width:b,height:C,maxZoom:N,panZoom:z}=w();if(!z)return!1;const A=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:N;return await z.setViewport({x:b/2-v*A,y:C/2-y*A,zoom:A},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{m({connection:{...PU}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...NO()})}},Object.is);function YQn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:m}){const[w]=T.useState(()=>XQn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return _.jsx(oWn,{value:w,children:_.jsx(OWn,{children:_.jsx(QWn,{children:m})})})}function ZQn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return T.useContext(xx)?_.jsx(_.Fragment,{children:e}):_.jsx(YQn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const JQn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function eXn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:b,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,onNodeDragStart:A,onNodeDrag:j,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:L,onDelete:B,onSelectionChange:U,onSelectionDragStart:H,onSelectionDrag:Q,onSelectionDragStop:K,onSelectionContextMenu:Z,onSelectionStart:ee,onSelectionEnd:$,onBeforeDelete:I,connectionMode:F,connectionLineType:q=$u.Bezier,connectionLineStyle:V,connectionLineComponent:ie,connectionLineContainerStyle:oe,deleteKeyCode:ce="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:G=!1,selectionMode:ae=Em.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:me=zm()?"Meta":"Control",zoomActivationKeyCode:ve=zm()?"Meta":"Control",snapToGrid:Ee,snapGrid:Fe,onlyRenderVisibleElements:We=!1,selectNodesOnDrag:Oe,nodesDraggable:He,autoPanOnNodeFocus:ht,nodesConnectable:xt,nodesFocusable:Kt,nodeOrigin:Ut=vG,edgesFocusable:Ht,edgesReconnectable:$e,elementsSelectable:ot=!0,defaultViewport:ct=yWn,minZoom:ye=.5,maxZoom:Be=2,translateExtent:Ke=Cm,preventScrolling:Ce=!0,nodeExtent:Ye,defaultMarkerColor:lt="#b1b1b7",zoomOnScroll:je=!0,zoomOnPinch:Gt=!0,panOnScroll:Mt=!1,panOnScrollSpeed:Jt=.5,panOnScrollMode:rn=kf.Free,zoomOnDoubleClick:nn=!0,panOnDrag:Nt=!0,onPaneClick:wt,onPaneMouseEnter:Bn,onPaneMouseMove:gr,onPaneMouseLeave:Gr,onPaneScroll:en,onPaneContextMenu:Vn,paneClickDistance:ls=1,nodeClickDistance:_t=0,children:fn,onReconnect:yn,onReconnectStart:Tn,onReconnectEnd:Kn,onEdgeContextMenu:dn,onEdgeDoubleClick:Dn,onEdgeMouseEnter:Wn,onEdgeMouseMove:zt,onEdgeMouseLeave:Ot,reconnectRadius:Fn=10,onNodesChange:rs,onEdgesChange:Wt,noDragClassName:sr="nodrag",noWheelClassName:Qn="nowheel",noPanClassName:jr="nopan",fitView:Es,fitViewOptions:Vr,connectOnClick:vr,attributionPosition:Qe,proOptions:mt,defaultEdgeOptions:mn,elevateNodesOnSelect:xn=!0,elevateEdgesOnSelect:Rn=!1,disableKeyboardA11y:fr=!1,autoPanOnConnect:ir,autoPanOnNodeDrag:Ln,autoPanOnSelection:us=!0,autoPanSpeed:Ns,connectionRadius:Ir,isValidConnection:Kr,onError:Yo,style:Xc,id:ia,nodeDragThreshold:Zl,connectionDragThreshold:bi,viewport:Ii,onViewportChange:zs,width:Sr,height:Fs,colorMode:yi="light",debug:ri,onScroll:xi,ariaLabelConfig:si,zIndexMode:js="basic",...ss},Zo){const aa=ia||"1",br=SWn(yi),wi=T.useCallback(oa=>{oa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),xi==null||xi(oa)},[xi]);return _.jsx("div",{"data-testid":"rf__wrapper",...ss,onScroll:wi,style:{...Xc,...JQn},ref:Zo,className:Cs(["react-flow",s,br]),id:ia,role:"application",children:_.jsxs(ZQn,{nodes:e,edges:n,width:Sr,height:Fs,fitView:Es,fitViewOptions:Vr,minZoom:ye,maxZoom:Be,nodeOrigin:Ut,nodeExtent:Ye,zIndexMode:js,children:[_.jsx(kWn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:y,nodesDraggable:He,autoPanOnNodeFocus:ht,nodesConnectable:xt,nodesFocusable:Kt,edgesFocusable:Ht,edgesReconnectable:$e,elementsSelectable:ot,elevateNodesOnSelect:xn,elevateEdgesOnSelect:Rn,minZoom:ye,maxZoom:Be,nodeExtent:Ye,onNodesChange:rs,onEdgesChange:Wt,snapToGrid:Ee,snapGrid:Fe,connectionMode:F,translateExtent:Ke,connectOnClick:vr,defaultEdgeOptions:mn,fitView:Es,fitViewOptions:Vr,onNodesDelete:D,onEdgesDelete:L,onDelete:B,onNodeDragStart:A,onNodeDrag:j,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:H,onSelectionDragStop:K,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:jr,nodeOrigin:Ut,rfId:aa,autoPanOnConnect:ir,autoPanOnNodeDrag:Ln,autoPanSpeed:Ns,onError:Yo,connectionRadius:Ir,isValidConnection:Kr,selectNodesOnDrag:Oe,nodeDragThreshold:Zl,connectionDragThreshold:bi,onBeforeDelete:I,debug:ri,ariaLabelConfig:si,zIndexMode:js}),_.jsx(WQn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:b,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:z,nodeTypes:i,edgeTypes:a,connectionLineType:q,connectionLineStyle:V,connectionLineComponent:ie,connectionLineContainerStyle:oe,selectionKeyCode:ne,selectionOnDrag:G,selectionMode:ae,deleteKeyCode:ce,multiSelectionKeyCode:me,panActivationKeyCode:le,zoomActivationKeyCode:ve,onlyRenderVisibleElements:We,defaultViewport:ct,translateExtent:Ke,minZoom:ye,maxZoom:Be,preventScrolling:Ce,zoomOnScroll:je,zoomOnPinch:Gt,zoomOnDoubleClick:nn,panOnScroll:Mt,panOnScrollSpeed:Jt,panOnScrollMode:rn,panOnDrag:Nt,autoPanOnSelection:us,onPaneClick:wt,onPaneMouseEnter:Bn,onPaneMouseMove:gr,onPaneMouseLeave:Gr,onPaneScroll:en,onPaneContextMenu:Vn,paneClickDistance:ls,nodeClickDistance:_t,onSelectionContextMenu:Z,onSelectionStart:ee,onSelectionEnd:$,onReconnect:yn,onReconnectStart:Tn,onReconnectEnd:Kn,onEdgeContextMenu:dn,onEdgeDoubleClick:Dn,onEdgeMouseEnter:Wn,onEdgeMouseMove:zt,onEdgeMouseLeave:Ot,reconnectRadius:Fn,defaultMarkerColor:lt,noDragClassName:sr,noWheelClassName:Qn,noPanClassName:jr,rfId:aa,disableKeyboardA11y:fr,nodeExtent:Ye,viewport:Ii,onViewportChange:zs}),_.jsx(bWn,{onSelectionChange:U}),fn,_.jsx(hWn,{proOptions:mt,position:Qe}),_.jsx(dWn,{rfId:aa,disableKeyboardA11y:fr})]})})}var tXn=yG(eXn);function nXn({dimensions:e,lineWidth:n,variant:t,className:r}){return _.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Cs(["react-flow__background-pattern",t,r])})}function rXn({radius:e,className:n}){return _.jsx("circle",{cx:e,cy:e,r:e,className:Cs(["react-flow__background-pattern","dots",n])})}var Hl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Hl||(Hl={}));const sXn={[Hl.Dots]:1,[Hl.Lines]:1,[Hl.Cross]:6},iXn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function GG({id:e,variant:n=Hl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:d}){const f=T.useRef(null),{transform:p,patternId:m}=$n(iXn,Or),w=r||sXn[n],k=n===Hl.Dots,v=n===Hl.Cross,y=Array.isArray(t)?t:[t,t],x=[y[0]*p[2]||1,y[1]*p[2]||1],b=w*p[2],C=Array.isArray(i)?i:[i,i],N=v?[b,b]:x,z=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],A=`${m}${e||""}`;return _.jsxs("svg",{className:Cs(["react-flow__background",u]),style:{...c,...kx,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[_.jsx("pattern",{id:A,x:p[0]%x[0],y:p[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:k?_.jsx(rXn,{radius:b/2,className:d}):_.jsx(nXn,{dimensions:N,lineWidth:s,variant:n,className:d})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}GG.displayName="Background";const aXn=T.memo(GG);function oXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:_.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function cXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function lXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:_.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function uXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function _Xn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function uv({children:e,className:n,...t}){return _.jsx("button",{type:"button",className:Cs(["react-flow__controls-button",n]),...t,children:e})}const fXn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function VG({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const w=Lr(),{isInteractive:k,minZoomReached:v,maxZoomReached:y,ariaLabelConfig:x}=$n(fXn,Or),{zoomIn:b,zoomOut:C,fitView:N}=f7(),z=()=>{b(),i==null||i()},A=()=>{C(),a==null||a()},j=()=>{N(s),o==null||o()},M=()=>{w.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},D=p==="horizontal"?"horizontal":"vertical";return _.jsxs(wx,{className:Cs(["react-flow__controls",D,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??x["controls.ariaLabel"],children:[n&&_.jsxs(_.Fragment,{children:[_.jsx(uv,{onClick:z,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:y,children:_.jsx(oXn,{})}),_.jsx(uv,{onClick:A,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:v,children:_.jsx(cXn,{})})]}),t&&_.jsx(uv,{className:"react-flow__controls-fitview",onClick:j,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:_.jsx(lXn,{})}),r&&_.jsx(uv,{className:"react-flow__controls-interactive",onClick:M,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?_.jsx(_Xn,{}):_.jsx(uXn,{})}),d]})}VG.displayName="Controls";T.memo(VG);function dXn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:p,onClick:m}){const{background:w,backgroundColor:k}=i||{},v=a||w||k;return _.jsx("rect",{className:Cs(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:d,ry:d,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:f,onClick:m?y=>m(y,e):void 0})}const hXn=T.memo(dXn),pXn=e=>e.nodes.map(n=>n.id),e3=e=>e instanceof Function?e:()=>e;function mXn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=hXn,onClick:a}){const o=$n(pXn,Or),c=e3(n),u=e3(e),d=e3(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:o.map(p=>_.jsx(vXn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function gXn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:d,y:f,width:p,height:m}=$n(w=>{const k=w.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const v=k.internals.userNode,{x:y,y:x}=k.internals.positionAbsolute,{width:b,height:C}=Yl(v);return{node:v,x:y,y:x,width:b,height:C}},Or);return!u||u.hidden||!WU(u)?null:_.jsx(o,{x:d,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:s,strokeColor:t(u),strokeWidth:i,shapeRendering:a,onClick:c,id:u.id})}const vXn=T.memo(gXn);var bXn=T.memo(mXn);const yXn=200,xXn=150,wXn=e=>!e.hidden,kXn=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?GU(gg(e.nodeLookup,{filter:wXn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},SXn="react-flow__minimap-desc";function KG({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:w,pannable:k=!1,zoomable:v=!1,ariaLabel:y,inversePan:x,zoomStep:b=1,offsetScale:C=5}){const N=Lr(),z=T.useRef(null),{boundingRect:A,viewBB:j,rfId:M,panZoom:D,translateExtent:L,flowWidth:B,flowHeight:U,ariaLabelConfig:H}=$n(kXn,Or),Q=(e==null?void 0:e.width)??yXn,K=(e==null?void 0:e.height)??xXn,Z=A.width/Q,ee=A.height/K,$=Math.max(Z,ee),I=$*Q,F=$*K,q=C*$,V=A.x-(I-A.width)/2-q,ie=A.y-(F-A.height)/2-q,oe=I+q*2,ce=F+q*2,ne=`${SXn}-${M}`,G=T.useRef(0),ae=T.useRef();G.current=$,T.useEffect(()=>{if(z.current&&D)return ae.current=FKn({domNode:z.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>G.current}),()=>{var Ee;(Ee=ae.current)==null||Ee.destroy()}},[D]),T.useEffect(()=>{var Ee;(Ee=ae.current)==null||Ee.update({translateExtent:L,width:B,height:U,inversePan:x,pannable:k,zoomStep:b,zoomable:v})},[k,v,x,b,L,B,U]);const le=m?Ee=>{var Oe;const[Fe,We]=((Oe=ae.current)==null?void 0:Oe.pointer(Ee))||[0,0];m(Ee,{x:Fe,y:We})}:void 0,me=w?T.useCallback((Ee,Fe)=>{const We=N.getState().nodeLookup.get(Fe).internals.userNode;w(Ee,We)},[]):void 0,ve=y??H["minimap.ariaLabel"];return _.jsx(wx,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*$:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof t=="string"?t:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:Cs(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:Q,height:K,viewBox:`${V} ${ie} ${oe} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ne,ref:z,onClick:le,children:[ve&&_.jsx("title",{id:ne,children:ve}),_.jsx(bXn,{onClick:me,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-q},${ie-q}h${oe+q*2}v${ce+q*2}h${-oe-q*2}z + M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}KG.displayName="MiniMap";T.memo(KG);const CXn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,EXn={[ep.Line]:"right",[ep.Handle]:"bottom-right"};function NXn({nodeId:e,position:n,variant:t=ep.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:w,onResizeStart:k,onResize:v,onResizeEnd:y}){const x=SG(),b=typeof e=="string"?e:x,C=Lr(),N=T.useRef(null),z=t===ep.Handle,A=$n(T.useCallback(CXn(z&&m),[z,m]),Or),j=T.useRef(null),M=n??EXn[t];T.useEffect(()=>{if(!(!N.current||!b))return j.current||(j.current=eWn({domNode:N.current,nodeId:b,getStoreItems:()=>{const{nodeLookup:L,transform:B,snapGrid:U,snapToGrid:H,nodeOrigin:Q,domNode:K}=C.getState();return{nodeLookup:L,transform:B,snapGrid:U,snapToGrid:H,nodeOrigin:Q,paneDomNode:K}},onChange:(L,B)=>{const{triggerNodeChanges:U,nodeLookup:H,parentLookup:Q,nodeOrigin:K}=C.getState(),Z=[],ee={x:L.x,y:L.y},$=H.get(b);if($&&$.expandParent&&$.parentId){const I=$.origin??K,F=L.width??$.measured.width??0,q=L.height??$.measured.height??0,V={id:$.id,parentId:$.parentId,rect:{width:F,height:q,...QU({x:L.x??$.position.x,y:L.y??$.position.y},{width:F,height:q},$.parentId,H,I)}},ie=_7([V],H,Q,K);Z.push(...ie),ee.x=L.x?Math.max(I[0]*F,L.x):void 0,ee.y=L.y?Math.max(I[1]*q,L.y):void 0}if(ee.x!==void 0&&ee.y!==void 0){const I={id:b,type:"position",position:{...ee}};Z.push(I)}if(L.width!==void 0&&L.height!==void 0){const F={id:b,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};Z.push(F)}for(const I of B){const F={...I,type:"position"};Z.push(F)}U(Z)},onEnd:({width:L,height:B})=>{const U={id:b,type:"dimensions",resizing:!1,dimensions:{width:L,height:B}};C.getState().triggerNodeChanges([U])}})),j.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:y,shouldResize:w}),()=>{var L;(L=j.current)==null||L.destroy()}},[M,o,c,u,d,f,k,v,y,w]);const D=M.split("-");return _.jsx("div",{className:Cs(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:A,...a&&{[z?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(NXn);function zXn(){const[e,n]=T.useState(0),[t,r]=T.useState(0);return{ref:T.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),c=new MutationObserver(a);return o.observe(i),c.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const _v=8;function jXn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function d(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",d),d(),()=>window.removeEventListener("resize",d)},[]);let o=0,c=0,u=0;if(e){const{distance:d}=e;switch(e.anchor){case"left":o=e.x-t-d,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+d,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+d;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-d;break}const f=o,p=c;o=Math.min(Math.max(o,_v),i-t-_v),c=Math.min(Math.max(c,_v),s-r-_v),u=e.anchor==="left"||e.anchor==="right"?p-c:f-o}return{x:o,y:c,arrowAdjustment:u}}const t3=380,n3=12,AXn=350,TXn=150,Yk=new EventTarget;function RXn(){Yk.dispatchEvent(new Event("move"))}function MXn(e,n){const[t,r]=T.useState(null),s=T.useRef(void 0),i=T.useRef(void 0);T.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return Yk.addEventListener("move",u),()=>{Yk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var f;if(!u)return u;const d=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return d&&u.x===d.x&&u.y===d.y&&u.width===d.width&&u.height===d.height?u:d})},[e,n]);const a=T.useCallback(()=>{window.clearTimeout(i.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var u;r(((u=e.current)==null?void 0:u.getBoundingClientRect())??null)},AXn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),TXn)},[]),c=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function OXn(e){const n=new Date(e),t=n.getFullYear()===new Date().getFullYear()?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"};return n.toLocaleDateString(E(),t)}function DXn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=zXn(),d=s.right+n3+t3<=window.innerWidth,f=s.x-n3-t3>=0,p=d?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:w}=jXn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:n3},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=dt({...X8n(k??""),enabled:!!k,subscribed:!!k}),y=T.useMemo(()=>{if(!v)return null;const B=v;let U=B.diff;if(B.truncated){const Z=U.lastIndexOf(` diff --git `);U=Z!==-1?U.slice(0,Z+1):U.slice(0,U.lastIndexOf(` -`)+1)}let H=[];try{H=U.trim()?R5(U):[]}catch{return null}if(B.truncated&&H.every(Z=>Z.hunks.length===0))return null;let Q=0,K=0;for(const Z of H){const ee=By(Z);Q+=ee.additions,K+=ee.deletions}return{fileCount:H.length,additions:Q,deletions:K,truncated:B.truncated}},[v]),x={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?x.done+=1:B.status==="failed"?x.failed+=1:B.status==="cancelled"?x.cancelled+=1:x.live+=1;const b=t?J0((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,N=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,z=SI(n),A=T.useRef(null),[j,M]=T.useState(!1),[D,L]=T.useState(!1);return T.useEffect(()=>{M(!1)},[N]),T.useEffect(()=>{const B=A.current;B&&L(B.scrollHeight>B.clientHeight+1)},[N,j]),ni.createPortal(f.jsxs("div",{ref:u.ref,className:"exp-hover-card fixed z-60 bg-background border border-border rounded-lg shadow-menu py-3.5 px-4 text-sm text-text [&_.hc-head]:flex [&_.hc-head]:items-baseline [&_.hc-head]:justify-between [&_.hc-head]:gap-2.5 [&_.hc-slug]:text-sm [&_.hc-slug]:font-semibold [&_.hc-slug]:min-w-0 [&_.hc-slug]:overflow-hidden [&_.hc-slug]:text-ellipsis [&_.hc-slug]:whitespace-nowrap [&_.hc-title]:mt-[3px] [&_.hc-title]:text-text [&_.hc-actions]:flex [&_.hc-actions]:items-center [&_.hc-actions]:gap-1.5 [&_.hc-actions]:mt-2.5 [&_.hc-actions_button]:inline-flex [&_.hc-actions_button]:items-center [&_.hc-actions_button]:justify-center [&_.hc-actions_button]:gap-[5px] [&_.hc-actions_button]:min-w-21 [&_.hc-actions_button]:py-1.5 [&_.hc-actions_button]:px-2.5 [&_.hc-actions_button]:border [&_.hc-actions_button]:border-border [&_.hc-actions_button]:rounded-md [&_.hc-actions_button]:bg-background [&_.hc-actions_button]:text-text [&_.hc-actions_button]:text-sm [&_.hc-actions_button]:font-medium [&_.hc-actions_button:hover]:border-border-hover-strong [&_.hc-actions_button:hover]:bg-canvas [&_.hc-body]:mt-2.5 [&_.hc-body]:border-t [&_.hc-body]:border-t-border-variant [&_.hc-body]:pt-2.5 [&_.hc-body]:leading-[1.6] [&_.hc-body]:whitespace-pre-line [&_.hc-body]:line-clamp-10 [&_.hc-body.expanded]:block [&_.hc-body.expanded]:line-clamp-none [&_.hc-body.expanded]:max-h-[45vh] [&_.hc-body.expanded]:overflow-y-auto [&_.hc-body.expanded]:overflow-x-hidden [&_.hc-body.expanded]:pb-1 [&_.hc-toggle]:mt-1 [&_.hc-toggle]:text-sm [&_.hc-toggle]:font-medium [&_.hc-toggle]:text-muted [&_.hc-toggle:hover]:text-text [&_.hc-failure]:mt-2 [&_.hc-failure]:text-accent-red [&_.hc-failure]:line-clamp-3 [&_.hc-monitoring]:mt-2 [&_.hc-monitoring]:text-accent-amber [&_.hc-monitoring]:line-clamp-3 [&_.hc-stats]:mt-2.5 [&_.hc-stats]:border-t [&_.hc-stats]:border-t-border-variant [&_.hc-stats]:pt-2.5 [&_.hc-stats]:flex [&_.hc-stats]:items-center [&_.hc-stats]:gap-3 [&_.hc-stats]:flex-wrap [&_.hc-stats]:text-xs [&_.hc-stats]:text-text [&_.hc-git]:mt-2.5 [&_.hc-git]:pt-2 [&_.hc-git]:border-t [&_.hc-git]:border-t-border-variant [&_.hc-git]:text-xs [&_.hc-git]:text-text [&_.hc-git]:flex [&_.hc-git]:flex-col [&_.hc-git]:gap-1 [&_.hc-git-row]:flex [&_.hc-git-row]:items-center [&_.hc-git-row]:gap-2.5 [&_.hc-git-row]:flex-wrap [&_.hc-git-row]:min-w-0 [&_.hc-branch]:inline-flex [&_.hc-branch]:items-center [&_.hc-branch]:gap-1 [&_.hc-branch]:min-w-0 [&_.hc-branch]:overflow-hidden [&_.hc-branch]:text-ellipsis [&_.hc-branch]:whitespace-nowrap [&_.hc-foot]:mt-2 [&_.hc-foot]:flex [&_.hc-foot]:items-center [&_.hc-foot]:justify-between [&_.hc-foot]:gap-2.5 [&_.hc-foot]:text-xs [&_.hc-foot]:text-muted [&_.hc-foot_.hc-command]:min-w-0 [&_.hc-foot_.hc-command]:overflow-hidden [&_.hc-foot_.hc-command]:text-ellipsis [&_.hc-foot_.hc-command]:whitespace-nowrap",style:{width:t3,left:m,top:w,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:c,children:[f.jsxs("div",{className:"hc-head",children:[f.jsx("span",{className:"hc-slug",children:e.slug}),f.jsx(Pl,{status:t?Aa(t):"idle"})]}),e.title&&f.jsx("div",{className:"hc-title",children:e.title}),f.jsxs("div",{className:"hc-actions",children:[i&&f.jsxs("button",{type:"button",...ns(i),children:[f.jsx(Ko,{size:13}),oLe()]}),f.jsxs("button",{type:"button",...ns(a),children:[f.jsx(fy,{size:13}),PDe()]})]}),N&&f.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:A,children:N}),N&&(D||j)&&f.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>M(B=>!B),children:j?zS():I3()}),C&&f.jsx("div",{className:"hc-failure",children:C}),z&&f.jsx("div",{className:"hc-monitoring",title:z,children:z}),f.jsxs("div",{className:"hc-stats",children:[f.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?eZe():oZe({count:ln(n.length)}),...x.done>0?[fYe({count:ln(x.done)})]:[],...x.failed>0?[bYe({count:ln(x.failed)})]:[],...x.cancelled>0?[iYe({count:ln(x.cancelled)})]:[],...x.live>0?[PYe({count:ln(x.live)})]:[]])}),t&&BS(t.backend)&&f.jsx(eC,{backend:t.backend}),b&&f.jsx("span",{children:b}),t&&f.jsx("span",{children:Dc(t.createdAt)})]}),f.jsxs("div",{className:"hc-git",children:[f.jsxs("div",{className:"hc-git-row",children:[f.jsxs("span",{className:"hc-branch",title:e.branchName,children:[f.jsx(tg,{size:12}),e.branchName]}),r&&f.jsxs("span",{children:[eLe()," ",f.jsx("span",{children:r})]})]}),y&&y.fileCount>0&&f.jsx("div",{className:"hc-git-row",title:y.truncated?SY({parent:Ae(r??"parent")}):gY({parent:Ae(r??"parent")}),children:f.jsxs("span",{children:[y.truncated&&"≥ ",f.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",y.additions]})," ",f.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",y.deletions]})," · ",y.fileCount===1&&!y.truncated?KYe():y.truncated?MYe({count:ln(y.fileCount)}):EYe({count:ln(y.fileCount)})]})})]}),f.jsxs("div",{className:"hc-foot",children:[f.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),f.jsxs("span",{children:[KDe()," ",_Xn(e.createdAt)]})]})]}),document.body)}const zO=["empty-state absolute inset-0 flex flex-col items-center","justify-center p-6 text-center text-subtext [&_p]:max-w-[46ch]","[&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal [&_p]:text-balance","[&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal","[&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg","[&_p.empty-state-hint]:text-subtext empty-state-cta gap-1.5"].join(" "),dXn=264,hXn=132,Bv=44,pXn=72,mXn=148,gXn=44,vXn=160,bXn=64;function yXn(e){const n=new Map(e.map(i=>[i.id,{exp:i,children:[]}])),t=[];for(const i of e){const a=n.get(i.id),o=i.parentExperimentId?n.get(i.parentExperimentId):void 0;o?o.children.push(a):t.push(a)}const r=(i,a)=>i.exp.createdAt-a.exp.createdAt,s=i=>{i.children.sort(r),i.children.forEach(s)};return t.sort(r),t.forEach(s),t}function xXn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,d)=>u+r(d),0);return t.set(o,c),c},s=new Map,i=o=>{const c=s.get(o)??(n(o)||o.children.some(i));return s.set(o,c),c};function a(o){if(n(o)){const d=[];let _=0;for(const p of o.children)i(p)?d.push(...a(p)):_+=r(p);return _>0&&d.push({kind:"elided",id:`el-${o.exp.id}`,count:_,children:[]}),[{kind:"exp",exp:o.exp,children:d}]}if(!i(o))return[];let c=0;const u=[];return(function d(_){c+=1;for(const p of _.children)n(p)?u.push(...a(p)):i(p)?d(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function wXn(e){function n(t){if(t.kind!=="exp"||!t.exp.archived)return{...t,children:t.children.map(n)};let r=0;const s=[];function i(a){r+=1;for(const o of a.children)o.kind==="exp"&&o.exp.archived?i(o):s.push(n(o))}return i(t),{kind:"archived",id:`ar-${t.exp.id}`,rootId:t.exp.id,count:r,children:s}}return e.map(n)}function Zk(e){return e.kind==="exp"?dXn:e.kind==="archived"?vXn:mXn}function kXn(e){return e.kind==="exp"?hXn:gXn}function _v(e){return e.kind==="exp"?e.exp.id:e.id}function Pv(e){if(e.children.length===0)return Zk(e);const n=e.children.reduce((t,r)=>t+Pv(r),0)+Bv*(e.children.length-1);return Math.max(Zk(e),n)}function SXn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const CXn=T.memo(function({data:n}){d_();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:d,onArchive:_,actions:p}=n,m=r?Aa(r):void 0,w=m==="running"||m==="starting"||m==="cancelling",k=i?Pmn():w?Kgn():El(),v=s.slice(-8),y=T.useRef(null),x=uXn(y,n);return f.jsxs("div",{ref:y,className:`exp-node w-66 border border-border rounded-md bg-background py-2.5 px-3 shadow-tree text-sm transition-[box-shadow] duration-120 ease-standard [&:hover]:shadow-tree-hover [&.live]:border-accent-teal [&.live]:shadow-tree-live [&_.node-overview-link]:block [&_.node-overview-link]:w-full [&_.node-overview-link]:p-0 [&_.node-overview-link]:border-0 [&_.node-overview-link]:bg-transparent [&_.node-overview-link]:text-inherit [&_.node-overview-link]:[font:inherit] [&_.node-overview-link]:text-start [&_.node-overview-link]:cursor-pointer [&_.node-overview-link:hover_.node-slug]:underline [&_.node-overview-link:hover_.node-slug]:underline-offset-[3px] [&_.node-overview-link:focus-visible]:outline-2 [&_.node-overview-link:focus-visible]:outline-solid [&_.node-overview-link:focus-visible]:outline-accent [&_.node-overview-link:focus-visible]:outline-offset-4 [&_.node-overview-link:focus-visible]:rounded-xs [&_.node-eyebrow]:flex [&_.node-eyebrow]:items-center [&_.node-eyebrow]:justify-between [&_.node-eyebrow]:gap-2 [&_.node-eyebrow]:mb-1.5 [&_.node-eyebrow]:text-xs [&_.node-eyebrow]:font-medium [&_.node-eyebrow]:text-muted [&_.node-head]:flex [&_.node-head]:items-center [&_.node-head]:gap-[7px] [&_.node-head]:min-w-0 [&_.node-status]:w-2 [&_.node-status]:h-2 [&_.node-status]:rounded-full [&_.node-status]:shrink-0 [&_.node-slug]:text-sm [&_.node-slug]:font-semibold [&_.node-slug]:text-text [&_.node-slug]:flex-1 [&_.node-slug]:min-w-0 [&_.node-slug]:overflow-hidden [&_.node-slug]:text-ellipsis [&_.node-slug]:whitespace-nowrap [&_.node-title]:mt-1 [&_.node-title]:text-text [&_.node-title]:text-sm [&_.node-title]:line-clamp-2 [&_.node-meta]:mt-2 [&_.node-meta]:flex [&_.node-meta]:items-center [&_.node-meta]:gap-2 [&_.node-meta]:text-xs [&_.node-meta]:text-muted [&_.node-actions]:mt-2 [&_.node-actions]:pt-1.5 [&_.node-actions]:border-t [&_.node-actions]:border-t-border-variant [&_.node-actions]:flex [&_.node-actions]:items-center [&_.node-actions]:gap-[3px] [&_.node-action]:inline-flex [&_.node-action]:items-center [&_.node-action]:gap-[5px] [&_.node-action]:py-[3px] [&_.node-action]:px-1.5 [&_.node-action]:text-sm [&_.node-action]:font-medium [&_.node-action]:text-text [&_.node-action]:rounded-sm [&_.node-action]:no-underline [&_.node-action:hover]:text-text [&_.node-action:hover]:bg-surface [&_.node-action-ext]:ms-auto [&_.node-action-ext]:py-[3px] [&_.node-action-ext]:px-[5px] ${w?"live":""} ${t.archived?"opacity-80":""}`,onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,children:[f.jsx(Pc,{type:"target",position:Dt.Top}),f.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...ns(b=>u(t.id,"overview",b)),children:[f.jsxs("div",{className:"node-eyebrow",children:[f.jsx("span",{children:t.archived?vI():k}),f.jsx(Pl,{status:m??"idle"})]}),f.jsx("div",{className:"node-head",children:f.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&f.jsx("div",{className:"node-title",children:t.title||t.description}),f.jsxs("div",{className:"node-meta",children:[f.jsx("span",{children:tvn()}),v.length>0?f.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:v.map(b=>f.jsx("span",{className:`run-sq w-[9px] h-[9px] shrink-0 [&.pass]:bg-accent-green [&.fail]:border-[1.5px] [&.fail]:border-danger-outline [&.live]:bg-accent-teal [&.live]:animate-[or-pulse_1.2s_ease-in-out_infinite] [&.other]:border-[1.5px] [&.other]:border-border ${SXn(Aa(b))}`,title:H6(Aa(b))},b.id))}):f.jsx("span",{children:F1n()}),f.jsx("span",{className:"flex-1"}),r&&f.jsx("span",{children:Dc(r.createdAt)})]})]}),f.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&f.jsxs("button",{className:"node-action",title:W1n(),...ns(b=>u(t.id,"terminal",b)),children:[f.jsx(Ko,{size:13}),yI()]}),f.jsxs("button",{className:"node-action",title:ZD({branch:Ae(t.branchName)}),...ns(b=>d(t.id,t.branchName,"files",b)),children:[f.jsx(fy,{size:13}),h1n()]}),o&&c&&f.jsx("a",{className:"node-action",title:M3({name:Ae(t.branchName)}),"aria-label":M3({name:Ae(t.branchName)}),href:cy(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:f.jsx(J6,{size:13})}),f.jsx(oU,{id:t.id,name:t.slug,actions:p,onArchive:_,compact:!0})]}),f.jsx(Pc,{type:"source",position:Dt.Bottom}),x.rect&&f.jsx(fXn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:x.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>d(t.id,t.branchName,"files",b),onMouseEnter:x.keepOpen,onMouseLeave:x.onMouseLeave})]})}),EXn=T.memo(function({data:n}){d_();const{rootId:t,count:r,onRestoreRegion:s}=n,i=T.useRef(null),a=ra(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const d=i.current.getBoundingClientRect(),_=window.innerHeight-d.bottom>=44;c({top:_?d.bottom+4:Math.max(4,d.top-44),left:Math.max(4,Math.min(d.left,window.innerWidth-232))})}a.setOpen(d=>!d)};return f.jsxs("div",{className:"archived-node w-40 h-11",children:[f.jsx(Pc,{type:"target",position:Dt.Top}),f.jsxs("button",{type:"button",ref:i,className:"nodrag w-full h-full flex items-center justify-center gap-2 px-3 border border-border rounded-full bg-background text-text text-sm font-medium whitespace-nowrap transition-[background-color,border-color] duration-120 ease-standard hover:bg-surface hover:border-text","aria-haspopup":"menu","aria-expanded":a.open,onClick:u,children:[f.jsx(bSn,{size:15,className:"shrink-0 text-subtext","aria-hidden":"true"}),f.jsx("span",{children:Mmn({count:ln(r)})})]}),f.jsx(Pc,{type:"source",position:Dt.Bottom}),a.open&&ni.createPortal(f.jsx("div",{ref:a.ref,className:"option-menu fixed z-70 min-w-56 rounded-lg border border-border bg-background p-1.5 shadow-menu",style:o,children:f.jsx(on,{onClick:()=>{a.setOpen(!1),s(t)},children:r===1?bI():Ngn({count:ln(r)})})}),document.body)]})}),NXn=T.memo(function({data:n}){d_();const{count:t,onShowProjectScope:r}=n;return f.jsxs("div",{className:"elided-node w-37 h-11 flex items-center gap-2 py-1.5 px-2.5 border border-dashed border-border rounded-md bg-hover-faint text-muted text-sm font-medium text-start transition-[border-color,color] duration-120 ease-standard [&:hover]:border-text [&:hover]:text-text [&_.elided-node-label]:flex [&_.elided-node-label]:flex-col [&_.elided-node-label]:leading-[1.3] [&_.elided-node-sub]:text-muted",role:"button",tabIndex:0,title:cvn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[f.jsx(Pc,{type:"target",position:Dt.Top}),f.jsx(ip,{size:14}),f.jsxs("span",{className:"elided-node-label",children:[t===1?dgn():Jmn({count:ln(t)}),f.jsx("span",{className:"elided-node-sub",children:agn()})]}),f.jsx(Pc,{type:"source",position:Dt.Bottom})]})}),zXn={exp:CXn,archived:EXn,elided:NXn},WG={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},jXn={...WG.style,strokeDasharray:"4 4"};function AXn({experiments:e,archiveActions:n,showArchived:t,runs:r,project:s,onOpenView:i,onOpenCode:a,onArchive:o,agentSessionId:c,onShowProjectScope:u,onRestoreRegion:d,viewport:_,onViewportChange:p}){const{nodes:m,edges:w}=T.useMemo(()=>{const k=new Map;for(const j of r){const M=k.get(j.experimentId);M?M.push(j):k.set(j.experimentId,[j])}for(const j of k.values())j.sort((M,D)=>M.createdAt-D.createdAt);const v=[],y=[],x=j=>!c||j.exp.chatSessionId===c,b=xXn(yXn(e),x),C=t?b:wXn(b),N=new Map(e.map(j=>[j.id,j.slug]));function z(j,M,D){const L=M-Zk(j)/2;if(j.kind==="exp"){const H=k.get(j.exp.id)??[];v.push({id:j.exp.id,type:"exp",position:{x:L,y:D},data:{exp:j.exp,latestRun:H[H.length-1]??null,runs:H,isBaseline:!j.exp.parentExperimentId,parentSlug:j.exp.parentExperimentId?N.get(j.exp.parentExperimentId)??null:null,githubOwner:s.githubEnabled?s.githubOwner:"",githubRepo:s.githubEnabled?s.githubRepo:"",onOpenView:i,onOpenCode:a,onArchive:o,actions:n.get(j.exp.id)}})}else j.kind==="archived"?v.push({id:j.id,type:"archived",position:{x:L,y:D},data:{rootId:j.rootId,count:j.count,onRestoreRegion:d}}):v.push({id:j.id,type:"elided",position:{x:L,y:D},data:{count:j.count,onShowProjectScope:u}});if(j.children.length===0)return;const B=j.children.reduce((H,Q)=>H+Pv(Q),0)+Bv*(j.children.length-1);let U=M-B/2;for(const H of j.children){const Q=Pv(H),K=j.kind!=="exp"||H.kind!=="exp"||j.exp.archived||H.exp.archived;y.push({id:`e-${_v(j)}-${_v(H)}`,source:_v(j),target:_v(H),...K?{style:jXn}:{}}),z(H,U+Q/2,D+kXn(j)+(H.kind==="archived"?bXn:pXn)),U+=Q+Bv}}let A=0;for(const j of C){const M=Pv(j);z(j,A+M/2,0),A+=M+Bv}return{nodes:v,edges:y}},[e,n,t,r,i,a,o,s.githubOwner,s.githubRepo,s.githubEnabled,c,u,d]);return e.length===0?f.jsxs("div",{className:zO,children:[f.jsx("p",{className:"empty-state-title",children:O1n()}),f.jsx("p",{className:"empty-state-hint",children:o1n()})]}):m.length===0&&c?f.jsxs("div",{className:zO,children:[f.jsx("p",{className:"empty-state-title",children:N1n()}),f.jsx("p",{className:"empty-state-hint",children:e1n()})]}):f.jsx(RQn,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-archived.selectable]:cursor-pointer [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:m,edges:w,nodeTypes:zXn,defaultEdgeOptions:WG,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:lXn,onMoveEnd:(k,v)=>{k&&p(v)},minZoom:.15,defaultViewport:_??void 0,fitView:_===null,fitViewOptions:{padding:.25,maxZoom:1},children:f.jsx(IQn,{variant:Hl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},c??"project")}const fv=["empty-state absolute inset-0 flex flex-col items-center","justify-center gap-2.5 p-6 text-center text-subtext","[&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal","[&_p]:text-balance [&_p.empty-state-title]:text-2xl","[&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text","[&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext"].join(" ");function TXn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RXn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(i.startsWith("artifacts/"))return i=i.slice(10),i?{path:i,source:"artifacts"}:null;if(i==="~"||i.startsWith("~/")||pC(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[w,k]=[m(i),m(p)];return w===k?"":w.startsWith(`${k}/`)?w.slice(k.length).replace(/^\/+/,""):null},d=i.startsWith("/")&&c?u(c):null,_=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(d!==null)return d?{path:d,source:"artifacts"}:null;if(_!==null)i=_;else{const p=s?TXn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),w=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||w?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};w?(a=w[1],i=w[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function MXn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const OXn=10,jO=1448,DXn=80,LXn=48;function AO(e,n){const t=e.findIndex(s=>s.id===n.id);if(t<0)return[...e,n];const r=e.slice();return r[t]=n,r}function TO(e){const n=T.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}const w0=e=>Ae(e instanceof Error?e.message:String(e));function IXn({runtime:e,projectId:n,pane:t}){var _d,cc,j_;const r=vn({mutationFn:own}),s=Oi(),i=UD({select:Y=>Y.location}),a=Mf(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",c=T.useRef(null),u=T.useRef(n);u.current!==n&&(u.current=n,c.current=null);const d=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=d);const _=t!==void 0,p=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[m,w]=T.useState(null),[k,v]=T.useState(0),y=`${i.href} +`)+1)}let H=[];try{H=U.trim()?R5(U):[]}catch{return null}if(B.truncated&&H.every(Z=>Z.hunks.length===0))return null;let Q=0,K=0;for(const Z of H){const ee=Py(Z);Q+=ee.additions,K+=ee.deletions}return{fileCount:H.length,additions:Q,deletions:K,truncated:B.truncated}},[v]),x={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?x.done+=1:B.status==="failed"?x.failed+=1:B.status==="cancelled"?x.cancelled+=1:x.live+=1;const b=t?em((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,N=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,z=SI(n),A=T.useRef(null),[j,M]=T.useState(!1),[D,L]=T.useState(!1);return T.useEffect(()=>{M(!1)},[N]),T.useEffect(()=>{const B=A.current;B&&L(B.scrollHeight>B.clientHeight+1)},[N,j]),ni.createPortal(_.jsxs("div",{ref:u.ref,className:"exp-hover-card fixed z-60 bg-background border border-border rounded-lg shadow-menu py-3.5 px-4 text-sm text-text [&_.hc-head]:flex [&_.hc-head]:items-baseline [&_.hc-head]:justify-between [&_.hc-head]:gap-2.5 [&_.hc-slug]:text-sm [&_.hc-slug]:font-semibold [&_.hc-slug]:min-w-0 [&_.hc-slug]:overflow-hidden [&_.hc-slug]:text-ellipsis [&_.hc-slug]:whitespace-nowrap [&_.hc-title]:mt-[3px] [&_.hc-title]:text-text [&_.hc-actions]:flex [&_.hc-actions]:items-center [&_.hc-actions]:gap-1.5 [&_.hc-actions]:mt-2.5 [&_.hc-actions_button]:inline-flex [&_.hc-actions_button]:items-center [&_.hc-actions_button]:justify-center [&_.hc-actions_button]:gap-[5px] [&_.hc-actions_button]:min-w-21 [&_.hc-actions_button]:py-1.5 [&_.hc-actions_button]:px-2.5 [&_.hc-actions_button]:border [&_.hc-actions_button]:border-border [&_.hc-actions_button]:rounded-md [&_.hc-actions_button]:bg-background [&_.hc-actions_button]:text-text [&_.hc-actions_button]:text-sm [&_.hc-actions_button]:font-medium [&_.hc-actions_button:hover]:border-border-hover-strong [&_.hc-actions_button:hover]:bg-canvas [&_.hc-body]:mt-2.5 [&_.hc-body]:border-t [&_.hc-body]:border-t-border-variant [&_.hc-body]:pt-2.5 [&_.hc-body]:leading-[1.6] [&_.hc-body]:whitespace-pre-line [&_.hc-body]:line-clamp-10 [&_.hc-body.expanded]:block [&_.hc-body.expanded]:line-clamp-none [&_.hc-body.expanded]:max-h-[45vh] [&_.hc-body.expanded]:overflow-y-auto [&_.hc-body.expanded]:overflow-x-hidden [&_.hc-body.expanded]:pb-1 [&_.hc-toggle]:mt-1 [&_.hc-toggle]:text-sm [&_.hc-toggle]:font-medium [&_.hc-toggle]:text-muted [&_.hc-toggle:hover]:text-text [&_.hc-failure]:mt-2 [&_.hc-failure]:text-accent-red [&_.hc-failure]:line-clamp-3 [&_.hc-monitoring]:mt-2 [&_.hc-monitoring]:text-accent-amber [&_.hc-monitoring]:line-clamp-3 [&_.hc-stats]:mt-2.5 [&_.hc-stats]:border-t [&_.hc-stats]:border-t-border-variant [&_.hc-stats]:pt-2.5 [&_.hc-stats]:flex [&_.hc-stats]:items-center [&_.hc-stats]:gap-3 [&_.hc-stats]:flex-wrap [&_.hc-stats]:text-xs [&_.hc-stats]:text-text [&_.hc-git]:mt-2.5 [&_.hc-git]:pt-2 [&_.hc-git]:border-t [&_.hc-git]:border-t-border-variant [&_.hc-git]:text-xs [&_.hc-git]:text-text [&_.hc-git]:flex [&_.hc-git]:flex-col [&_.hc-git]:gap-1 [&_.hc-git-row]:flex [&_.hc-git-row]:items-center [&_.hc-git-row]:gap-2.5 [&_.hc-git-row]:flex-wrap [&_.hc-git-row]:min-w-0 [&_.hc-branch]:inline-flex [&_.hc-branch]:items-center [&_.hc-branch]:gap-1 [&_.hc-branch]:min-w-0 [&_.hc-branch]:overflow-hidden [&_.hc-branch]:text-ellipsis [&_.hc-branch]:whitespace-nowrap [&_.hc-foot]:mt-2 [&_.hc-foot]:flex [&_.hc-foot]:items-center [&_.hc-foot]:justify-between [&_.hc-foot]:gap-2.5 [&_.hc-foot]:text-xs [&_.hc-foot]:text-muted [&_.hc-foot_.hc-command]:min-w-0 [&_.hc-foot_.hc-command]:overflow-hidden [&_.hc-foot_.hc-command]:text-ellipsis [&_.hc-foot_.hc-command]:whitespace-nowrap",style:{width:t3,left:m,top:w,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:c,children:[_.jsxs("div",{className:"hc-head",children:[_.jsx("span",{className:"hc-slug",children:e.slug}),_.jsx(Pl,{status:t?Aa(t):"idle"})]}),e.title&&_.jsx("div",{className:"hc-title",children:e.title}),_.jsxs("div",{className:"hc-actions",children:[i&&_.jsxs("button",{type:"button",...ns(i),children:[_.jsx(Ko,{size:13}),oLe()]}),_.jsxs("button",{type:"button",...ns(a),children:[_.jsx(dy,{size:13}),PDe()]})]}),N&&_.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:A,children:N}),N&&(D||j)&&_.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>M(B=>!B),children:j?zS():I3()}),C&&_.jsx("div",{className:"hc-failure",children:C}),z&&_.jsx("div",{className:"hc-monitoring",title:z,children:z}),_.jsxs("div",{className:"hc-stats",children:[_.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?eZe():oZe({count:_n(n.length)}),...x.done>0?[fYe({count:_n(x.done)})]:[],...x.failed>0?[bYe({count:_n(x.failed)})]:[],...x.cancelled>0?[iYe({count:_n(x.cancelled)})]:[],...x.live>0?[PYe({count:_n(x.live)})]:[]])}),t&&BS(t.backend)&&_.jsx(eC,{backend:t.backend}),b&&_.jsx("span",{children:b}),t&&_.jsx("span",{children:Dc(t.createdAt)})]}),_.jsxs("div",{className:"hc-git",children:[_.jsxs("div",{className:"hc-git-row",children:[_.jsxs("span",{className:"hc-branch",title:e.branchName,children:[_.jsx(ng,{size:12}),e.branchName]}),r&&_.jsxs("span",{children:[eLe()," ",_.jsx("span",{children:r})]})]}),y&&y.fileCount>0&&_.jsx("div",{className:"hc-git-row",title:y.truncated?SY({parent:Ae(r??"parent")}):gY({parent:Ae(r??"parent")}),children:_.jsxs("span",{children:[y.truncated&&"≥ ",_.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",y.additions]})," ",_.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",y.deletions]})," · ",y.fileCount===1&&!y.truncated?KYe():y.truncated?MYe({count:_n(y.fileCount)}):EYe({count:_n(y.fileCount)})]})})]}),_.jsxs("div",{className:"hc-foot",children:[_.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),_.jsxs("span",{children:[KDe()," ",OXn(e.createdAt)]})]})]}),document.body)}const zO=["empty-state absolute inset-0 flex flex-col items-center","justify-center p-6 text-center text-subtext [&_p]:max-w-[46ch]","[&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal [&_p]:text-balance","[&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal","[&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg","[&_p.empty-state-hint]:text-subtext empty-state-cta gap-1.5"].join(" "),LXn=264,IXn=132,Pv=44,$Xn=72,BXn=148,PXn=44,FXn=160,HXn=64;function qXn(e){const n=new Map(e.map(i=>[i.id,{exp:i,children:[]}])),t=[];for(const i of e){const a=n.get(i.id),o=i.parentExperimentId?n.get(i.parentExperimentId):void 0;o?o.children.push(a):t.push(a)}const r=(i,a)=>i.exp.createdAt-a.exp.createdAt,s=i=>{i.children.sort(r),i.children.forEach(s)};return t.sort(r),t.forEach(s),t}function UXn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,d)=>u+r(d),0);return t.set(o,c),c},s=new Map,i=o=>{const c=s.get(o)??(n(o)||o.children.some(i));return s.set(o,c),c};function a(o){if(n(o)){const d=[];let f=0;for(const p of o.children)i(p)?d.push(...a(p)):f+=r(p);return f>0&&d.push({kind:"elided",id:`el-${o.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:o.exp,children:d}]}if(!i(o))return[];let c=0;const u=[];return(function d(f){c+=1;for(const p of f.children)n(p)?u.push(...a(p)):i(p)?d(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function GXn(e){function n(t){if(t.kind!=="exp"||!t.exp.archived)return{...t,children:t.children.map(n)};let r=0;const s=[];function i(a){r+=1;for(const o of a.children)o.kind==="exp"&&o.exp.archived?i(o):s.push(n(o))}return i(t),{kind:"archived",id:`ar-${t.exp.id}`,rootId:t.exp.id,count:r,children:s}}return e.map(n)}function Zk(e){return e.kind==="exp"?LXn:e.kind==="archived"?FXn:BXn}function VXn(e){return e.kind==="exp"?IXn:PXn}function fv(e){return e.kind==="exp"?e.exp.id:e.id}function Fv(e){if(e.children.length===0)return Zk(e);const n=e.children.reduce((t,r)=>t+Fv(r),0)+Pv*(e.children.length-1);return Math.max(Zk(e),n)}function KXn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const WXn=T.memo(function({data:n}){d_();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:d,onArchive:f,actions:p}=n,m=r?Aa(r):void 0,w=m==="running"||m==="starting"||m==="cancelling",k=i?ogn():w?h1n():El(),v=s.slice(-8),y=T.useRef(null),x=MXn(y,n);return _.jsxs("div",{ref:y,className:`exp-node w-66 border border-border rounded-md bg-background py-2.5 px-3 shadow-tree text-sm transition-[box-shadow] duration-120 ease-standard [&:hover]:shadow-tree-hover [&.live]:border-accent-teal [&.live]:shadow-tree-live [&_.node-overview-link]:block [&_.node-overview-link]:w-full [&_.node-overview-link]:p-0 [&_.node-overview-link]:border-0 [&_.node-overview-link]:bg-transparent [&_.node-overview-link]:text-inherit [&_.node-overview-link]:[font:inherit] [&_.node-overview-link]:text-start [&_.node-overview-link]:cursor-pointer [&_.node-overview-link:hover_.node-slug]:underline [&_.node-overview-link:hover_.node-slug]:underline-offset-[3px] [&_.node-overview-link:focus-visible]:outline-2 [&_.node-overview-link:focus-visible]:outline-solid [&_.node-overview-link:focus-visible]:outline-accent [&_.node-overview-link:focus-visible]:outline-offset-4 [&_.node-overview-link:focus-visible]:rounded-xs [&_.node-eyebrow]:flex [&_.node-eyebrow]:items-center [&_.node-eyebrow]:justify-between [&_.node-eyebrow]:gap-2 [&_.node-eyebrow]:mb-1.5 [&_.node-eyebrow]:text-xs [&_.node-eyebrow]:font-medium [&_.node-eyebrow]:text-muted [&_.node-head]:flex [&_.node-head]:items-center [&_.node-head]:gap-[7px] [&_.node-head]:min-w-0 [&_.node-status]:w-2 [&_.node-status]:h-2 [&_.node-status]:rounded-full [&_.node-status]:shrink-0 [&_.node-slug]:text-sm [&_.node-slug]:font-semibold [&_.node-slug]:text-text [&_.node-slug]:flex-1 [&_.node-slug]:min-w-0 [&_.node-slug]:overflow-hidden [&_.node-slug]:text-ellipsis [&_.node-slug]:whitespace-nowrap [&_.node-title]:mt-1 [&_.node-title]:text-text [&_.node-title]:text-sm [&_.node-title]:line-clamp-2 [&_.node-meta]:mt-2 [&_.node-meta]:flex [&_.node-meta]:items-center [&_.node-meta]:gap-2 [&_.node-meta]:text-xs [&_.node-meta]:text-muted [&_.node-actions]:mt-2 [&_.node-actions]:pt-1.5 [&_.node-actions]:border-t [&_.node-actions]:border-t-border-variant [&_.node-actions]:flex [&_.node-actions]:items-center [&_.node-actions]:gap-[3px] [&_.node-action]:inline-flex [&_.node-action]:items-center [&_.node-action]:gap-[5px] [&_.node-action]:py-[3px] [&_.node-action]:px-1.5 [&_.node-action]:text-sm [&_.node-action]:font-medium [&_.node-action]:text-text [&_.node-action]:rounded-sm [&_.node-action]:no-underline [&_.node-action:hover]:text-text [&_.node-action:hover]:bg-surface [&_.node-action-ext]:ms-auto [&_.node-action-ext]:py-[3px] [&_.node-action-ext]:px-[5px] ${w?"live":""} ${t.archived?"opacity-80":""}`,onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,children:[_.jsx(Pc,{type:"target",position:It.Top}),_.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...ns(b=>u(t.id,"overview",b)),children:[_.jsxs("div",{className:"node-eyebrow",children:[_.jsx("span",{children:t.archived?vI():k}),_.jsx(Pl,{status:m??"idle"})]}),_.jsx("div",{className:"node-head",children:_.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&_.jsx("div",{className:"node-title",children:t.title||t.description}),_.jsxs("div",{className:"node-meta",children:[_.jsx("span",{children:wvn()}),v.length>0?_.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:v.map(b=>_.jsx("span",{className:`run-sq w-[9px] h-[9px] shrink-0 [&.pass]:bg-accent-green [&.fail]:border-[1.5px] [&.fail]:border-danger-outline [&.live]:bg-accent-teal [&.live]:animate-[or-pulse_1.2s_ease-in-out_infinite] [&.other]:border-[1.5px] [&.other]:border-border ${KXn(Aa(b))}`,title:H6(Aa(b))},b.id))}):_.jsx("span",{children:cvn()}),_.jsx("span",{className:"flex-1"}),r&&_.jsx("span",{children:Dc(r.createdAt)})]})]}),_.jsxs("div",{className:"node-actions",onClick:b=>b.stopPropagation(),children:[s.length>0&&_.jsxs("button",{className:"node-action",title:pvn(),...ns(b=>u(t.id,"terminal",b)),children:[_.jsx(Ko,{size:13}),yI()]}),_.jsxs("button",{className:"node-action",title:ZD({branch:Ae(t.branchName)}),...ns(b=>d(t.id,t.branchName,"files",b)),children:[_.jsx(dy,{size:13}),D1n()]}),o&&c&&_.jsx("a",{className:"node-action",title:M3({name:Ae(t.branchName)}),"aria-label":M3({name:Ae(t.branchName)}),href:ly(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:b=>b.stopPropagation(),children:_.jsx(J6,{size:13})}),_.jsx(oU,{id:t.id,name:t.slug,actions:p,onArchive:f,compact:!0})]}),_.jsx(Pc,{type:"source",position:It.Bottom}),x.rect&&_.jsx(DXn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:x.rect,onOpenLogs:s.length>0?b=>u(t.id,"terminal",b):void 0,onOpenCode:b=>d(t.id,t.branchName,"files",b),onMouseEnter:x.keepOpen,onMouseLeave:x.onMouseLeave})]})}),QXn=T.memo(function({data:n}){d_();const{rootId:t,count:r,onRestoreRegion:s}=n,i=T.useRef(null),a=ra(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const d=i.current.getBoundingClientRect(),f=window.innerHeight-d.bottom>=44;c({top:f?d.bottom+4:Math.max(4,d.top-44),left:Math.max(4,Math.min(d.left,window.innerWidth-232))})}a.setOpen(d=>!d)};return _.jsxs("div",{className:"archived-node w-40 h-11",children:[_.jsx(Pc,{type:"target",position:It.Top}),_.jsxs("button",{type:"button",ref:i,className:"nodrag w-full h-full flex items-center justify-center gap-2 px-3 border border-border rounded-full bg-background text-text text-sm font-medium whitespace-nowrap transition-[background-color,border-color] duration-120 ease-standard hover:bg-surface hover:border-text","aria-haspopup":"menu","aria-expanded":a.open,onClick:u,children:[_.jsx(FSn,{size:15,className:"shrink-0 text-subtext","aria-hidden":"true"}),_.jsx("span",{children:egn({count:_n(r)})})]}),_.jsx(Pc,{type:"source",position:It.Bottom}),a.open&&ni.createPortal(_.jsx("div",{ref:a.ref,className:"option-menu fixed z-70 min-w-56 rounded-lg border border-border bg-background p-1.5 shadow-menu",style:o,children:_.jsx(un,{onClick:()=>{a.setOpen(!1),s(t)},children:r===1?bI():Wgn({count:_n(r)})})}),document.body)]})}),XXn=T.memo(function({data:n}){d_();const{count:t,onShowProjectScope:r}=n;return _.jsxs("div",{className:"elided-node w-37 h-11 flex items-center gap-2 py-1.5 px-2.5 border border-dashed border-border rounded-md bg-hover-faint text-muted text-sm font-medium text-start transition-[border-color,color] duration-120 ease-standard [&:hover]:border-text [&:hover]:text-text [&_.elided-node-label]:flex [&_.elided-node-label]:flex-col [&_.elided-node-label]:leading-[1.3] [&_.elided-node-sub]:text-muted",role:"button",tabIndex:0,title:jvn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[_.jsx(Pc,{type:"target",position:It.Top}),_.jsx(ip,{size:14}),_.jsxs("span",{className:"elided-node-label",children:[t===1?Ogn():ygn({count:_n(t)}),_.jsx("span",{className:"elided-node-sub",children:Ngn()})]}),_.jsx(Pc,{type:"source",position:It.Bottom})]})}),YXn={exp:WXn,archived:QXn,elided:XXn},WG={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},ZXn={...WG.style,strokeDasharray:"4 4"};function JXn({experiments:e,archiveActions:n,showArchived:t,runs:r,project:s,onOpenView:i,onOpenCode:a,onArchive:o,agentSessionId:c,onShowProjectScope:u,onRestoreRegion:d,viewport:f,onViewportChange:p}){const{nodes:m,edges:w}=T.useMemo(()=>{const k=new Map;for(const j of r){const M=k.get(j.experimentId);M?M.push(j):k.set(j.experimentId,[j])}for(const j of k.values())j.sort((M,D)=>M.createdAt-D.createdAt);const v=[],y=[],x=j=>!c||j.exp.chatSessionId===c,b=UXn(qXn(e),x),C=t?b:GXn(b),N=new Map(e.map(j=>[j.id,j.slug]));function z(j,M,D){const L=M-Zk(j)/2;if(j.kind==="exp"){const H=k.get(j.exp.id)??[];v.push({id:j.exp.id,type:"exp",position:{x:L,y:D},data:{exp:j.exp,latestRun:H[H.length-1]??null,runs:H,isBaseline:!j.exp.parentExperimentId,parentSlug:j.exp.parentExperimentId?N.get(j.exp.parentExperimentId)??null:null,githubOwner:s.githubEnabled?s.githubOwner:"",githubRepo:s.githubEnabled?s.githubRepo:"",onOpenView:i,onOpenCode:a,onArchive:o,actions:n.get(j.exp.id)}})}else j.kind==="archived"?v.push({id:j.id,type:"archived",position:{x:L,y:D},data:{rootId:j.rootId,count:j.count,onRestoreRegion:d}}):v.push({id:j.id,type:"elided",position:{x:L,y:D},data:{count:j.count,onShowProjectScope:u}});if(j.children.length===0)return;const B=j.children.reduce((H,Q)=>H+Fv(Q),0)+Pv*(j.children.length-1);let U=M-B/2;for(const H of j.children){const Q=Fv(H),K=j.kind!=="exp"||H.kind!=="exp"||j.exp.archived||H.exp.archived;y.push({id:`e-${fv(j)}-${fv(H)}`,source:fv(j),target:fv(H),...K?{style:ZXn}:{}}),z(H,U+Q/2,D+VXn(j)+(H.kind==="archived"?HXn:$Xn)),U+=Q+Pv}}let A=0;for(const j of C){const M=Fv(j);z(j,A+M/2,0),A+=M+Pv}return{nodes:v,edges:y}},[e,n,t,r,i,a,o,s.githubOwner,s.githubRepo,s.githubEnabled,c,u,d]);return e.length===0?_.jsxs("div",{className:zO,children:[_.jsx("p",{className:"empty-state-title",children:tvn()}),_.jsx("p",{className:"empty-state-hint",children:z1n()})]}):m.length===0&&c?_.jsxs("div",{className:zO,children:[_.jsx("p",{className:"empty-state-title",children:W1n()}),_.jsx("p",{className:"empty-state-hint",children:x1n()})]}):_.jsx(tXn,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-archived.selectable]:cursor-pointer [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:m,edges:w,nodeTypes:YXn,defaultEdgeOptions:WG,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:RXn,onMoveEnd:(k,v)=>{k&&p(v)},minZoom:.15,defaultViewport:f??void 0,fitView:f===null,fitViewOptions:{padding:.25,maxZoom:1},children:_.jsx(aXn,{variant:Hl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},c??"project")}const dv=["empty-state absolute inset-0 flex flex-col items-center","justify-center gap-2.5 p-6 text-center text-subtext","[&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal","[&_p]:text-balance [&_p.empty-state-title]:text-2xl","[&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text","[&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext"].join(" ");function eYn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tYn(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(i.startsWith("artifacts/"))return i=i.slice(10),i?{path:i,source:"artifacts"}:null;if(i==="~"||i.startsWith("~/")||pC(i))return{path:i,source:"abs"};const u=p=>{const m=v=>v.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[w,k]=[m(i),m(p)];return w===k?"":w.startsWith(`${k}/`)?w.slice(k.length).replace(/^\/+/,""):null},d=i.startsWith("/")&&c?u(c):null,f=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(d!==null)return d?{path:d,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?eYn(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),w=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=m||w?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};w?(a=w[1],i=w[2]):k&&(i=k[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function nYn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const rYn=10,jO=1448,sYn=80,iYn=48;function AO(e,n){const t=e.findIndex(s=>s.id===n.id);if(t<0)return[...e,n];const r=e.slice();return r[t]=n,r}function TO(e){const n=T.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}const w0=e=>Ae(e instanceof Error?e.message:String(e));function aYn({runtime:e,projectId:n,pane:t}){var _d,cc,j_;const r=pn({mutationFn:zwn}),s=Oi(),i=UD({select:Y=>Y.location}),a=Mf(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",c=T.useRef(null),u=T.useRef(n);u.current!==n&&(u.current=n,c.current=null);const d=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=d);const f=t!==void 0,p=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[m,w]=T.useState(null),[k,v]=T.useState(0),y=`${i.href} ${JSON.stringify(t??null)} -${k}`,x=T.useRef({key:"",value:0});x.current.key!==y&&(x.current={key:y,value:x.current.value+1});const b=T.useMemo(()=>{const Y=t?Bo(t):"experiments";return typeof Y=="object"&&"path"in Y&&Y.line&&m!==x.current.value?{...Y,lineScrollRequest:x.current.value}:Y},[t,m,i.href,k]),C=ft(pi(n)),N=T.useMemo(()=>{var Y;return((Y=C.data)==null?void 0:Y.map(_e=>_e.id))??null},[C.data]),z=T.useRef(new Set),A=T.useRef(new Set),j=T.useRef({}),[M,D]=T.useState(0),L=T.useRef({projectId:n,activeSessionId:d,pane:t,isTask:(a==null?void 0:a.kind)==="task"});L.current={projectId:n,activeSessionId:d,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const B=T.useCallback((Y,_e=!1)=>{const we=L.current;we.projectId&&s.navigate({href:Sv(we.projectId,we.activeSessionId,Y),replace:_e})},[s]),U=T.useCallback(Y=>{const _e=Ll(Y);B(_e.kind==="file"?{..._e,line:void 0}:_e)},[B]),H=T.useCallback(()=>B(void 0),[B]),Q=T.useCallback(Y=>{(t==null?void 0:t.kind)==="experiment"&&B({...t,runId:Y??void 0})},[t,B]),K=T.useCallback(Y=>{s.navigate({href:Y?`/projects/${encodeURIComponent(Y)}`:"/projects"})},[s]),Z=T.useCallback(Y=>{var _e;if(n)if(Y==="chat"){const we=c.current;s.navigate({href:Sv(n,we,(_e=e_(Va.current,we??"new"))==null?void 0:_e.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Y==="skills"?"skills":`settings/${Y}`}`})},[s,n]),ee=d_(),{status:$}=$6(e.kind==="local"),I=T.useMemo(()=>Af(),[n]),F=ft(I),q=F.data??null,V=T.useCallback(Y=>{ts(I.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[I]),ie=T.useMemo(()=>Zm(),[n]),oe=ft(ie),ce=oe.data??null,ne=T.useCallback(Y=>{ts(ie.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[ie]),G=T.useRef(void 0);G.current=ce==null?void 0:ce.tourCompleted;const ae=[!F.data&&F.error?R0():null,!oe.data&&oe.error?ofe():null].filter(Y=>Y!==null),le=ae.length?xfe({items:new Intl.ListFormat(ee).format(ae)}):null,ge=T.useRef(null),be=ft(ub(n)),Ee=be.data??[],Fe=!be.isPending,[Ye,Me]=T.useState(!1),dt=ft(Qu(n)).data??[],wt=T.useRef(dt);wt.current=dt;const Ft=T.useRef(new Map),Ht=T.useRef(new Set),qt=T.useRef(null),$e=T.useRef(!1),ot=T.useRef(new Map),Ce=T.useRef(new Map),me=T.useRef(0),ze=T.useRef(Ee);ze.current=Ee;const We=ft(z8n(n)).data??null,[ct,St]=T.useState("table"),[Be,un]=T.useState(!1),[Vt,_n]=T.useState("project"),Gt=T.useRef(null),{open:cn,setOpen:Tt,ref:$t}=ra(Gt),[Lr,mr]=T.useState(!1),Gr=Ee.every(Y=>Y.chatSessionId),Jt=d&&Gr?Vt:"project",Gn=T.useMemo(()=>Jt!=="agent"?Ee:Ee.filter(Y=>Y.chatSessionId===d),[Ee,Jt,d]),ls=T.useMemo(()=>Gn.filter(Y=>Be||!Y.archived),[Gn,Be]),ut=T.useMemo(()=>JHn(Ee),[Ee]),fn=T.useCallback(async(Y,_e,we)=>{try{await wwn(Y,_e,we),await Ze.invalidateQueries({queryKey:ub(n).queryKey})}catch(Te){tn(Te instanceof Error?Te.message:String(Te),"error")}},[n]),yn=T.useCallback(Y=>{fn(Y,Jt==="agent"?"taskRegion":"region",!1)},[fn,Jt]),Tn=T.useMemo(()=>{if(Jt!=="agent")return dt;const Y=new Set(Gn.map(_e=>_e.id));return dt.filter(_e=>Y.has(_e.experimentId))},[dt,Gn,Jt]),[Vn,dn]=T.useState([]),[Dn,Kn]=T.useState(!1),[Et,Rt]=T.useState(!1),[Pn,rs]=T.useState(!1),[Wt,rr]=T.useState(!1),[Wn,zr]=T.useState(null),[Es,Vr]=T.useState([]),[gr,Qe]=T.useState([]),pt=T.useRef(new Map),pn=T.useRef(new Map),xn=Y=>{let _e=pn.current.get(Y);return _e||(_e=new EHn,pn.current.set(Y,_e)),_e},[Rn,_r]=T.useState([]),[sr,Ln]=T.useState([]),[us,Ns]=T.useState([]),[Ir,Kr]=T.useState([]),[Yo,Xc]=T.useState([]),[ia,Zl]=T.useState(null),[bi,Ii]=T.useState("files"),[zs,kr]=T.useState(new Set),[Fs,yi]=T.useState(!1),[ri,xi]=T.useState(null),[si,js]=T.useState(B8n),[ss,Zo]=T.useState(()=>window.innerWidth>=jO),aa=o==="chat"&&!_&&ss,[vr,wi]=T.useState(!0),[oa,qa]=T.useState(!1),Ua=T.useRef(s6()),ca=T.useRef(d);ca.current=d;const ii=T.useRef(Vn);ii.current=Vn;const Ga=T.useRef(Yo);Ga.current=Yo;const la=T.useRef(null),Ws=T.useCallback(Y=>{const _e=[...Y];Ga.current=_e,Xc(_e)},[]),ua=T.useCallback(Y=>{la.current=Y,Zl(Y)},[]),Yc=T.useCallback(Y=>{const _e=Ot(Y);Vr(De=>u0(De,_e)),Qe(De=>u0(De,_e)),_r(De=>u0(De,_e)),Ln(De=>u0(De,_e)),Kr(De=>u0(De,_e));const we=da.current;if(we&&"path"in Y){const De=ei(we,ca.current,Y);pt.current.delete(De),pn.current.delete(De),A.current.delete(De),z.current.delete(De)}const Te=ii.current.filter(De=>Ot(De)!==_e);ii.current=Te,dn(Te)},[]),or=T.useCallback(Y=>{const _e=Ot(Y),we=[...ii.current.filter(Te=>Ot(Te)!==_e),O1(Y)];ii.current=we,dn(we),U(Y)},[U]),Sr=T.useCallback((Y,_e,we)=>{const Te=Ot(Y),De=la.current,it=O$n({order:Ga.current,previewKey:De?Ot(De):null},Te,_e);it.replacedKey&&De&&typeof De!="string"&&Ot(De)===it.replacedKey&&Yc(De),Ws(it.order),it.previewKey===null?ua(null):it.previewKey===Te&&ua(O1(Y));const nt=[...ii.current.filter(zt=>Ot(zt)!==Te),O1(Y)];ii.current=nt,dn(nt),B(Ll(Y,we))},[Yc,Ws,ua,B]),_s=T.useCallback(Y=>{const _e=la.current;_e&&Ot(_e)===Ot(Y)&&ua(null)},[ua]);T.useEffect(()=>{let Y=!1;const _e=Te=>{const De=la.current,it=Te.target;if(it instanceof Element&&it.closest("input, textarea, [contenteditable='true']")!==null){Y=!1;return}if(De&&Ot(De)===Ot(Ua.current.rightTab)&&(Te.metaKey||Te.ctrlKey)&&!Te.altKey&&!Te.shiftKey&&Te.key.toLowerCase()==="k"){Te.preventDefault(),Y=!0;return}if(Y&&Te.key==="Enter"){Te.preventDefault(),Y=!1;const zt=la.current;zt&&_s(zt);return}Y=!1},we=()=>{Y=!1};return window.addEventListener("keydown",_e),window.addEventListener("blur",we),window.addEventListener("pointerdown",we),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("blur",we),window.removeEventListener("pointerdown",we)}},[_s]);const jr=T.useCallback((Y,_e)=>{const we=Ot(Y),Te=la.current;Te&&Ot(Te)===we&&ua(null);const De=D$n({order:Ga.current,previewKey:Te?Ot(Te):null},we,ii.current.map(Ot));Ws(De.order);const it=ii.current.filter(zt=>Ot(zt)!==we);if(ii.current=it,dn(it),!_e)return;const nt=De.fallbackKey?it.find(zt=>Ot(zt)===De.fallbackKey):void 0;nt?U(nt):(H(),yi(!1))},[Ws,ua,U,H]),_a=Z,Zc=T.useMemo(()=>({rightTab:O1(b),tabHistory:Vn,experimentsTabOpen:Dn,filesTabOpen:Et,artifactsTabOpen:Pn,terminalTabOpen:Wt,expTabs:Es,fileTabs:gr,planTabs:Rn,subagentTabs:sr,sideTabs:us,codeTabs:Ir,contentTabOrder:Ga.current,previewTab:la.current,filesView:bi,filesToggled:zs,selectedRunId:p,scope:Vt,panelOpen:_,panelMax:Fs,treeViewport:ri}),[b,Vn,Dn,Et,Pn,Wt,Es,gr,Rn,sr,us,Ir,Yo,ia,bi,zs,p,Vt,_,Fs,ri]);Ua.current=Zc;const v_=T.useCallback(()=>Object.fromEntries(pt.current),[]),Mt=T.useRef(void 0),Jo=T.useCallback(()=>{clearTimeout(Mt.current),Mt.current=setTimeout(()=>D(Y=>Y+1),200)},[]);T.useEffect(()=>()=>clearTimeout(Mt.current),[]);const Hs=T.useCallback((Y,_e,we)=>{if(dn(Y.tabHistory),ii.current=Y.tabHistory,Kn(Y.experimentsTabOpen),Rt(Y.filesTabOpen),rs(Y.artifactsTabOpen),rr(Y.terminalTabOpen),Vr(Y.expTabs),Qe(Y.fileTabs),_r(De=>De===Y.planTabs?De:Y.planTabs.map(it=>{var nt;return{...it,plan:((nt=De.find(zt=>zt.sessionId===it.sessionId&&zt.promptId===it.promptId))==null?void 0:nt.plan)??""}})),Ln(Y.subagentTabs),Ns(Y.sideTabs),Kr(Y.codeTabs),Ws(Y.contentTabOrder),ua(Y.previewTab),Ii(Y.filesView),kr(Y.filesToggled),_n(Y.scope),yi(Y.panelMax),xi(Y.treeViewport),mr(L.current.activeSessionId===ef&&Y.fileTabs.some(De=>H_(De,{path:Ew,source:"artifacts"}))),we){for(const[De,it]of Object.entries((_e==null?void 0:_e.scroll)??{}))pt.current.set(De,it);Object.assign(j.current,_e==null?void 0:_e.sourceModes)}const Te=L.current;if(Te.projectId)for(const De of Y.fileTabs){const it=ei(Te.projectId,Te.activeSessionId,De);A.current.has(it)||z.current.add(it)}},[Ws,ua]),{ready:ki,loaded:_t,error:Qt,retry:fa,capture:wo,workspace:Va}=t7n({projectId:ce&&N!==null&&((a==null?void 0:a.kind)!=="task"||!d||N.includes(d))?n:null,taskKey:d??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ce==null?void 0:ce.tourCompleted)===!1,state:Zc,apply:Hs,getScroll:v_,sourceModes:j.current,revision:M}),fs=T.useRef(null);T.useLayoutEffect(()=>{if(!ki||!Fe||(a==null?void 0:a.kind)!=="task")return;const Y=fs.current;(Y==null?void 0:Y.projectId)===n&&Y.taskId===d&&Y.scope!==Jt&&xi(null),fs.current={projectId:n,taskId:d,scope:Jt}},[ki,Fe,a==null?void 0:a.kind,n,d,Jt]);const Ka=T.useCallback((Y,_e)=>{var zt;const we=(_e==null?void 0:_e.projectId)??n;if(!we)return;const Te=we===n;Y&&Te&&_e!=null&&_e.replace&&d===null&&(wo(),JCn(we,Y));const De=e_(W$(we),Y??"new"),it=De?De.active:Do(we)?(zt=i6(Y??void 0,G.current===!1))==null?void 0:zt.active:void 0,nt=Te&&(_e!=null&&_e.replace)&&Y&&d===null?L.current.pane:it;s.navigate({href:Sv(we,Y,nt),replace:Te&&(_e==null?void 0:_e.replace)})},[s,n,d,wo]);T.useEffect(()=>{ki&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Va.current.lastTaskId&&(N!=null&&N.includes(Va.current.lastTaskId))&&(c.current=Va.current.lastTaskId,D(Y=>Y+1))},[ki,a==null?void 0:a.kind,Va,N]),aX({shouldBlockFn:({next:Y})=>{var _e;return((_e=Mf(Y.pathname))==null?void 0:_e.projectId)!==n&&[...pn.current.values()].some(we=>we.needsProtection)&&!vM(lz())},enableBeforeUnload:()=>[...pn.current.values()].some(Y=>Y.needsProtection)});const Jl=T.useRef(null);T.useEffect(()=>{const Y=hy(i.href);!ce||!ki||!Y||(n6.queue({lastLocation:Y,railOpen:vr,panelWidth:si,experimentsView:ct},Jl.current===Y?250:0),Jl.current=Y)},[i.href,ce,ki,vr,si,ct]);const ds=(ce==null?void 0:ce.onboardingCompleted)??!1,[ai,ec]=T.useState(!1),[ko,mn]=T.useState(null),[eu,Jc]=T.useState(0),Wr=T.useCallback(()=>ec(!0),[]),$i=T.useCallback(async Y=>{const _e=G.current===!1,we=await r.mutateAsync({tourCompleted:!0});_e&&Lu({name:"demo_welcome_choice",choice:Y}),ne(Te=>Te&&{...Te,tourCompleted:we.tourCompleted}),ec(!1),Y==="explore_demo"&&Jc(Te=>Te+1)},[]),sd=T.useCallback(async()=>{await $i("create_project"),qa(!0)},[$i]);T.useEffect(()=>{!n||!Do(n)||!ds||ce!=null&&ce.tourCompleted||Wr()},[n,ds,Wr,ce==null?void 0:ce.tourCompleted]);const wn=(q==null?void 0:q.find(Y=>Y.id===n))??null;T.useEffect(()=>{const Y=le||ce===null?null:wn==null?void 0:wn.name;document.title=Y?`${Ml(Y)} — OpenResearch`:"OpenResearch"},[le,ce,wn]);const da=T.useRef(n);da.current=n;const So=T.useCallback(Y=>{n&&Lu({name:"first_action",surface:Do(n)?"demo":"project",action:Y})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&So("open_settings")},[o,So]);const Wa=T.useCallback((Y=!1)=>{Y&&(!L.current.isTask||L.current.pane)||(So("open_experiment"),Kn(!0),B({kind:"home",view:"experiments"},Y))},[B,So]),mp=()=>{F.refetch(),oe.refetch(),C.refetch()},id=T.useRef(!1);T.useEffect(()=>{if(!ce||id.current)return;id.current=!0,ge.current=ce.preferredAgent;const Y=q$()??ce.workspace;Y&&(wi(Y.railOpen),js(Math.min(Y.panelWidth,Jd())),St(Y.experimentsView))},[ce]),T.useEffect(()=>{N&&c.current&&!N.includes(c.current)&&(c.current=null)},[N]);const b_=T.useRef(Promise.resolve()),y_=T.useRef(0),ad=T.useCallback(Y=>{const _e=++y_.current;ne(Te=>Te&&{...Te,preferredAgent:Y});const we=b_.current.then(()=>r.mutateAsync({preferredAgent:Y})).then(Te=>{ge.current=Te.preferredAgent,_e===y_.current&&ne(De=>De&&{...De,preferredAgent:Te.preferredAgent})}).catch(Te=>{throw _e===y_.current&&ne(De=>De&&{...De,preferredAgent:ge.current}),Te});return b_.current=we.catch(()=>{}),we},[]),tu=T.useRef(Promise.resolve()),od=T.useRef(0),x_=T.useCallback(Y=>{const _e=++od.current;ne(we=>we&&{...we,preferredAutonomy:Y}),tu.current=tu.current.then(()=>r.mutateAsync({preferredAutonomy:Y})).catch(()=>{_e===od.current&&oe.refetch()})},[]);T.useEffect(()=>{const Y=()=>{js(_e=>Math.min(_e,Jd())),Zo(window.innerWidth>=jO)};return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const ha=T.useCallback(Y=>{$e.current=!1,ot.current.clear(),Ce.current.clear();const _e=++me.current;Ze.fetchQuery(Qu(Y)).then(we=>{if(da.current!==Y||qt.current!==Y||me.current!==_e)return;ot.current=new Map(we.map(De=>[De.id,De]));const Te=[...Ce.current.values()].some(De=>{const it=ot.current.get(De.id);return!it||it.status!=="running"&&it.updatedAt<=De.updatedAt});Ce.current.clear();for(const De of we){const it=Ft.current.get(De.id);(!it||it.updatedAt{var it;return we.some(nt=>nt.id===De&&nt.status==="running")?De:((it=we.find(nt=>nt.status==="running"))==null?void 0:it.id)??null}),Te&&Wa(!0)}).catch(()=>{me.current===_e&&(Ce.current.clear(),Me(!0))})},[Wa]);T.useEffect(()=>{if(n)return qt.current=n,Ft.current.clear(),Ht.current.clear(),ywn(n).catch(()=>{}),ha(n),()=>{me.current++}},[ha,n]);const tc=T.useCallback(()=>{rs(!0),or("artifacts")},[or]),el=T.useCallback(()=>{rr(!0),or("terminal")},[or]),Co=d??(n?`project:${n}`:null);T.useEffect(()=>{zr(_?b==="terminal"?Co:Y=>Y===Co?Y:null:null)},[_,b,Co]),d5n({onReconnect:()=>{const Y=da.current;Y&&(qt.current=Y,Ft.current.clear(),Ht.current.clear(),ha(Y))},onRun:Y=>{if(Y.projectId!==da.current||Y.projectId!==qt.current)return;const _e=Ft.current.get(Y.id),we=Ht.current.has(Y.id);if(_e&&_e.updatedAt>Y.updatedAt||(Ft.current.set(Y.id,Y),Ht.current.add(Y.id),Do(Y.projectId)&&mn(it=>Y.status==="running"?it??Y.id:it===Y.id?null:it),Y.status!=="running"||(_e==null?void 0:_e.status)==="running"))return;const Te=ot.current.get(Y.id),De=$e.current&&(!Te||Te.status!=="running"&&Te.updatedAt<=Y.updatedAt);we&&_e||De?Wa(!0):$e.current||Ce.current.set(Y.id,Y)}});const As=T.useCallback(()=>_n("project"),[]),Bi=T.useCallback((Y,_e="overview",we="preview",Te)=>{So("open_experiment");const De={id:Y,view:_e};Vr(it=>it.some(nt=>Ow(nt,De))?it:[...it,De]),_e==="terminal"&&Do(da.current)&&js(it=>Math.max(it,pA())),Sr(De,we,Te)},[Sr]),fr=T.useCallback((Y,_e="preview")=>{const we=wt.current.filter(De=>De.id===Y||De.id.startsWith(Y)),Te=we.length===1?we[0]:null;Te&&Bi(Te.experimentId,"terminal",_e,Te.id)},[Bi]),gp=T.useMemo(()=>new Map(Ee.map(Y=>{var _e;return[Y.id,((_e=Y.title)==null?void 0:_e.trim())||Y.slug||El()]})),[Ee,ee]),tl=TO(gp),vp=T.useMemo(()=>{const Y=new Map;for(const _e of dt)Y.set(_e.id,tl.get(_e.experimentId)??El());return Y},[tl,dt,ee]),Pi=TO(vp),nu=T.useCallback(Y=>{const _e=Pi.get(Y);if(_e)return _e;const we=[...Pi].filter(([Te])=>Te.startsWith(Y));return we.length===1?we[0][1]:""},[Pi]),w_=T.useCallback(Y=>{const _e=tl.get(Y);if(_e)return _e;const we=[...tl].filter(([Te])=>Te.startsWith(Y));return we.length===1?we[0][1]:""},[tl]),nc=T.useCallback((Y,_e="preview")=>{const we=ze.current.filter(Te=>Te.id===Y||Te.id.startsWith(Y));we.length===1&&Bi(we[0].id,"overview",_e)},[Bi]),bp=T.useCallback(Y=>{const _e=Es.findIndex(we=>Ow(we,Y));_e!==-1&&(Vr(we=>we.filter((Te,De)=>De!==_e)),jr(Y,Ot(b)===Ot(Y)))},[Es,jr,b]),Eo=T.useCallback((Y,_e="preview")=>{Y.line!=null&&v(De=>De+1);const we=da.current;if(we){const De=ei(we,ca.current,Y);Ua.current.fileTabs.some(it=>H_(it,Y))||z.current.delete(De),A.current.add(De)}const Te=V$(Y);Qe(De=>{const it=De.findIndex(zt=>H_(zt,Y));if(it===-1)return[...De,Te];const nt=De.slice();return nt[it]=Te,nt}),Sr(Y,_e)},[Sr]),Qa=T.useCallback((Y,_e,we,Te,De,it)=>{const nt=q==null?void 0:q.find(Us=>Us.id===n),zt=RXn(Y,nt==null?void 0:nt.repoPath,_e,(nt==null?void 0:nt.artifactsDir)??(nt==null?void 0:nt.filesDir),nt==null?void 0:nt.slug);if(!zt)return null;const In=De?ze.current.find(Us=>Us.id===De||De.length>=6&&Us.id.startsWith(De)):void 0,Qr=we??(In==null?void 0:In.branchName),Xs=zt.source==null||zt.source==="repo";return Qr&&Xs&&(zt.ref=Qr),it&&!zt.ref&&Xs&&(zt.branchLabel=it),Te!=null&&(zt.line=Te),zt},[q,n]),pa=T.useCallback((Y,_e,we,Te,De,it,nt="preview")=>{const zt=Qa(Y,_e,we,Te,De,it);zt&&Eo(zt,nt)},[Eo,Qa]),k_=T.useCallback(Y=>Eo({path:Y,source:"artifacts"},"keepOpen"),[Eo]),ir=T.useCallback((Y,_e,we,Te,De,it="preview")=>{const nt=Qa(Y,_e,De,we,Te);nt&&Eo(nt,it)},[Eo,Qa]),hs=T.useCallback((Y,_e)=>{_s(Y),_e()},[_s]),qs=T.useCallback(Y=>{var Te;const _e=gr.findIndex(De=>H_(De,Y));if(_e===-1)return;const we=n?ei(n,d,Y):null;we&&((Te=pn.current.get(we))!=null&&Te.needsProtection)&&!vM(lz())||(Qe(De=>De.filter((it,nt)=>nt!==_e)),we&&(pt.current.delete(we),pn.current.delete(we),A.current.delete(we),z.current.delete(we),delete j.current[we]),d===ef&&H_(Y,{path:Ew,source:"artifacts"})&&mr(!1),jr(Y,Ot(b)===Ot(Y)))},[d,gr,jr,n,b]),Si=T.useCallback(Y=>{Y.lineScrollRequest!==void 0&&w(Y.lineScrollRequest)},[]),Fi=T.useCallback((Y,_e,we,Te="preview")=>{const De={kind:"plan",sessionId:_e,promptId:we,plan:Y};_r(it=>{const nt=it.findIndex(In=>In.promptId===we);if(nt===-1)return[...it,De];const zt=it.slice();return zt[nt]=De,zt}),Sr(De,Te)},[Sr]),No=T.useCallback(Y=>{const _e=Rn.findIndex(we=>we.promptId===Y.promptId);_e!==-1&&(_r(we=>we.filter((Te,De)=>De!==_e)),jr(Y,Ot(b)===Ot(Y)))},[jr,Rn,b]),S_=T.useCallback((Y,_e,we,Te="preview")=>{const De={kind:"subagent",sessionId:Y,spawnPartId:_e,label:we};Ln(it=>it.some(nt=>nt.spawnPartId===_e)?it:[...it,De]),Sr(De,Te)},[Sr]),Xa=T.useCallback(Y=>{const _e=sr.findIndex(we=>we.spawnPartId===Y.spawnPartId);_e!==-1&&(Ln(we=>we.filter((Te,De)=>De!==_e)),jr(Y,Ot(b)===Ot(Y)))},[jr,b,sr]),C_=T.useCallback(Y=>{const _e={kind:"side",sessionId:Y};Ns(we=>we.some(Te=>Te.sessionId===Y)?we:[...we,_e]),js(we=>Math.max(we,pA())),Sr(_e,"keepOpen")},[Sr]),zo=T.useCallback(Y=>{us.some(_e=>_e.sessionId===Y.sessionId)&&(Ns(_e=>_e.filter(we=>we.sessionId!==Y.sessionId)),jr(Y,Ot(b)===Ot(Y)))},[jr,b,us]);T.useEffect(()=>{const Y=C.data;if(Y)for(const _e of us)Y.some(we=>we.id===_e.sessionId)||zo(_e)},[C.data,us,zo]);const ru=T.useCallback(async(Y,_e)=>{let we;try{we=await p3n(Y)}catch(Te){tn(Qsn({error:w0(Te)}),"error");return}if(L.current.activeSessionId!==Y){n5(we.id).catch(Te=>{tn(aj({error:w0(Te)}),"error")});return}if(ts(pi(we.projectId).queryKey,Te=>Te&&[we,...Te.filter(De=>De.id!==we.id)]),C_(we.id),!!_e)try{await Ze.fetchQuery(Rc(we.id)),await r5(we.id,_e)}catch(Te){tn(w0(Te),"error")}},[C_]),rc=T.useCallback(Y=>{zo(Y),n5(Y.sessionId).catch(_e=>{tn(aj({error:w0(_e)}),"error")})},[zo]),[ma,cd]=T.useState({});T.useEffect(()=>{if(cd(nt=>{const zt=new Set(sr.map(In=>In.spawnPartId));return Object.keys(nt).every(In=>zt.has(In))?nt:Object.fromEntries(Object.entries(nt).filter(([In])=>zt.has(In)))}),sr.length===0)return;let Y=!0;const _e=new Set,we=(nt,zt,In)=>{cd(Qr=>{var Us;let Xs=Qr;for(const oi of zt)if(!(In&&_e.has(oi.spawnPartId)))for(const cu of nt){const Xr=Ib(cu.parts,oi.spawnPartId);if(!Xr)continue;In||_e.add(oi.spawnPartId);const lc={label:hFn(Xr),running:((Us=Xr.state)==null?void 0:Us.status)==="running"},ci=Xs[oi.spawnPartId];(!ci||ci.label!==lc.label||ci.running!==lc.running)&&(Xs===Qr&&(Xs={...Qr}),Xs[oi.spawnPartId]=lc);break}return Xs})};let Te=0;const De=()=>{const nt=++Te;for(const zt of new Set(sr.map(In=>In.sessionId)))Ze.fetchQuery({...Rc(zt),staleTime:0}).then(({messages:In})=>{Y&&nt===Te&&we(In,sr.filter(Qr=>Qr.sessionId===zt),!0)}).catch(()=>{})};De();const it=em(nt=>{if(nt.type==="reconnected"){_e.clear(),De();return}if(nt.type!=="message")return;const zt=sr.filter(In=>In.sessionId===nt.sessionId);zt.length&&we([nt.message],zt,!1)});return()=>{Y=!1,it()}},[sr]);const sc=T.useCallback((Y,_e,we="files",Te="preview")=>{const De={code:!0,experimentId:Y,branch:_e,view:we,toggled:new Set};Kr(it=>it.some(nt=>$d(nt,De))?it.map(nt=>$d(nt,De)?{...nt,experimentId:Y,view:we}:nt):[...it,De]),Sr(De,Te)},[Sr]),jo=T.useCallback((Y,_e)=>{Kr(we=>we.map(Te=>$d(Te,Y)?{...Te,..._e}:Te)),_e.view&&B(Ll({...Y,..._e}))},[]),nl=T.useCallback(Y=>{const _e=Ir.findIndex(we=>$d(we,Y));_e!==-1&&(Kr(we=>we.filter((Te,De)=>De!==_e)),jr(Y,Ot(b)===Ot(Y)))},[Ir,jr,b]),su=T.useCallback(()=>{Rt(!0),or("files")},[or]),Ya=T.useCallback(Y=>{Y==="experiments"?Kn(!1):Y==="files"?Rt(!1):Y==="terminal"?(rr(!1),zr(null)):rs(!1),jr(Y,b===Y)},[jr,b]),E_=Y=>{Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId);const we=document.body.style.userSelect;document.body.style.userSelect="none";const Te=Fs,De=Y.clientX,it=si;let nt=!1;function zt(){window.removeEventListener("pointermove",In),window.removeEventListener("pointerup",zt),window.removeEventListener("pointercancel",zt),document.body.style.userSelect=we}function In(Qr){if(Te){const cu=Qr.clientX-De;if(nt||cuUs+DXn){yi(!0);return}yi(!1);const oi=Math.min(Math.max(Xs,bb),Us);js(oi)}window.addEventListener("pointermove",In),window.addEventListener("pointerup",zt),window.addEventListener("pointercancel",zt)},iu=(Y,_e)=>{V(we=>we?AO(we,Y):[Y]),s.navigate({href:`/projects/${encodeURIComponent(Y.id)}${_e?"/settings/git":""}`}),_e&&tn(_e,"error")},Ts=typeof b=="object"&&"id"in b?b:null,Qn=typeof b=="object"&&"path"in b?b:null,au=(Qn==null?void 0:Qn.source)==="artifacts"&&We?bm(We.entries,Qn.path):null,yp=au?`${au.modifiedAt}:${au.size}`:null,rl=d===ef&&Lr?gr.find(Y=>H_(Y,{path:Ew,source:"artifacts"})):void 0,N_=rl?[rl]:[],ar=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,ps=ar==null?void 0:ar.sessionId,ic=ar==null?void 0:ar.promptId,ou=!!(ps&&ic&&(N!=null&&N.includes(ps))),ac=ft({...Rc(ps??""),enabled:ou,subscribed:ou}),sl=T.useMemo(()=>{var _e;if(!ps||!ic||!ac.data)return null;const Y=ac.data.messages.flatMap(we=>{const Te=Ib(we.parts,ic);return Te?[Te]:[]})[0];return{key:`${ps}:${ic}`,text:((_e=Y==null?void 0:Y.prompt)==null?void 0:_e.plan)??null}},[ps,ic,ac.data]),Rs=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,Ms=typeof b=="object"&&"kind"in b&&b.kind==="side"?b:null,oc=Ms?(_d=C.data)==null?void 0:_d.find(Y=>Y.id===Ms.sessionId):void 0,il=typeof b=="object"&&"code"in b?b:null,is=il?Ir.find(Y=>$d(Y,il))??null:null,al=new Map;for(const Y of[...Es,...gr,...Rn,...sr,...us,...Ir])al.set(Ot(Y),Y);const ld=rl?Ot(rl):null,Za=Yo.filter(Y=>Y!==ld).map(Y=>al.get(Y)).filter(XCn),Qs=Y=>ia!==null&&Ot(ia)===Ot(Y),Ao=Y=>f.jsx(gc,{active:Qn!==null&&H_(Qn,Y),label:Y.path.split("/").pop()||Y.path,icon:f.jsx(j$,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>or(Y),onPromote:()=>_s(Y),onClose:()=>qs(Y)},`file:${r6(Y)}`),Ja=Ts?Ee.find(Y=>Y.id===Ts.id)??null:null,Hi=is?Ee.find(Y=>Y.id===is.experimentId&&Y.branchName===is.branch)??null:null,ud=Y=>{var we,Te,De,it;if("path"in Y)return Ao(Y);if("id"in Y){const nt=Ee.find(zt=>zt.id===Y.id);return f.jsx(gc,{active:Ts!==null&&Ow(Ts,Y),label:nt?nt.title||nt.slug:"…",icon:Y.view==="overview"?f.jsx(TSn,{size:12,className:"shrink-0"}):f.jsx(Ko,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>or(Y),onPromote:()=>_s(Y),onClose:()=>bp(Y)},Ot(Y))}if("kind"in Y&&Y.kind==="plan")return f.jsx(gc,{active:ar!==null&&ar.promptId===Y.promptId,label:_L(),icon:f.jsx(YS,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>or(Y),onPromote:()=>_s(Y),onClose:()=>No(Y)},Ot(Y));if("kind"in Y&&Y.kind==="side"){const nt=(we=C.data)==null?void 0:we.find(zt=>zt.id===Y.sessionId);return f.jsx(gc,{active:Ms!==null&&Ms.sessionId===Y.sessionId,label:((Te=nt==null?void 0:nt.title)==null?void 0:Te.trim())||X3(),shimmer:(nt==null?void 0:nt.busy)??!1,icon:f.jsx(tm,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>or(Y),onPromote:()=>_s(Y),onClose:()=>rc(Y)},Ot(Y))}if("kind"in Y)return f.jsx(gc,{active:Rs!==null&&Rs.spawnPartId===Y.spawnPartId,label:((De=ma[Y.spawnPartId])==null?void 0:De.label)??Y.label??zfe(),shimmer:((it=ma[Y.spawnPartId])==null?void 0:it.running)??!1,icon:f.jsx(JS,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>or(Y),onPromote:()=>_s(Y),onClose:()=>Xa(Y)},Ot(Y));const _e=Ee.find(nt=>nt.id===Y.experimentId);return f.jsx(gc,{active:is!==null&&$d(is,Y),label:(_e==null?void 0:_e.slug)??Y.branch,icon:f.jsx(vo,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>or(Y),onPromote:()=>_s(Y),onClose:()=>nl(Y)},Ot(Y))};if(!a||a.kind==="resume")return null;if(le)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsxs("div",{className:fv,children:[f.jsx("p",{children:le}),f.jsx(Oe,{variant:"primary",onClick:mp,children:Ks()})]}),e.kind==="ssh"&&f.jsx(S5,{runtime:e,corner:!0})]});if(q&&!wn)return f.jsxs("div",{className:fv,children:[ho(),f.jsx(Oe,{onClick:()=>K(null),children:R0()})]});if(q===null||ce===null)return f.jsxs("div",{className:"app flex flex-col h-full",children:[f.jsx("div",{className:fv,children:f.jsx(Ct,{})}),e.kind==="ssh"&&f.jsx(S5,{runtime:e,corner:!0})]});if(!wn)return f.jsxs("div",{className:fv,children:[ho(),f.jsx(Oe,{onClick:()=>K(null),children:R0()})]});const eo=!_t&&Qt||(!C.data&&C.error?w0(C.error):null)||(a.kind==="task"&&d&&N&&!N.includes(d)?ho():null),z_=!eo&&(!_t||N===null),xp=()=>{fa(),C.refetch()},wp=f.jsx(KHn,{onCollapse:()=>wi(!1)});return f.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&f.jsx(tB,{}),e.kind==="local"&&f.jsx(RB,{status:$}),f.jsx(DB,{}),Qt&&f.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 mac-titlebar:ps-20 win-titlebar:pe-36 py-2 text-subtext",children:[f.jsx("span",{children:Qt}),f.jsx(Oe,{onClick:fa,children:Ks()})]}),f.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${aa?"workspace-card-visible":""}`,children:[n&&f.jsx(cM,{projectId:n,projectName:wn.name,contentLoading:z_,contentError:eo||null,onRetryContent:xp,railHeader:wp,railOpen:vr,onShowRail:()=>wi(!0),onNewProject:()=>qa(!0),mainView:o,onSelectMainView:_a,onOpenFile:ir,onOpenRun:fr,runExperimentName:nu,onOpenExperiment:nc,experimentName:w_,onOpenPlan:Fi,onOpenSubagent:S_,onOpenSideChat:(Y,_e)=>void ru(Y,_e),composerFocusNonce:eu,demoRunningRunId:Do(wn.id)&&d===ef?ko:null,runtime:e,onOpenDemoWelcome:wn&&Do(wn.id)?Wr:void 0,activeSessionId:d,onActiveSessionChange:Ka,preferredAgent:ce.preferredAgent,onPreferredAgentChange:ad,preferredAutonomy:ce.preferredAutonomy??Z3,onPreferredAutonomyChange:x_,children:o==="skills"?f.jsx(mHn,{}):o!=="chat"?f.jsx(qBn,{remote:e.kind==="ssh",tab:o,project:wn,onProjectUpdate:Y=>{V(_e=>_e?AO(_e,Y):[Y])},onSelectTab:_a}):null}),o==="chat"&&ki&&!eo&&f.jsx(dzn,{expanded:aa,experiments:Ee,runs:dt,onOpenExperiment:(Y,_e)=>Bi(Y,"overview","preview",_e),rightOffset:_?si+28:void 0,activeView:_&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:wn.id,onCompute:()=>_a("compute"),sessionId:d,busy:((cc=C.data)==null?void 0:cc.some(Y=>Y.id===d&&Y.busy))??!1,onChanges:()=>{Ii("changes"),su()},onFiles:()=>{Ii("files"),su()},onTerminal:el,onArtifacts:tc,onExperiments:()=>Wa(),onSideChat:d?()=>void ru(d,""):void 0}),o==="chat"&&_&&f.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 win-titlebar:mt-10 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 mac-titlebar:[&.max]:top-8 win-titlebar:[&.max]:top-10 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Fs?"max":""}`,style:Fs?void 0:{width:si},"data-onboarding":"experiments",children:[f.jsx("div",{className:`panel-resizer absolute start-0 top-0 bottom-0 w-1.5 z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover ${Fs?"cursor-e-resize":"cursor-col-resize"}`,title:Fs?gue():uue(),onPointerDown:E_}),f.jsxs("div",{className:"tabs flex items-end gap-0 pt-1 pe-1.5 pb-0 ps-2 h-10 border-b border-b-border bg-background shrink-0",children:[f.jsxs("div",{className:"tab-strip flex items-end gap-0.5 flex-1 min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[N_.map(Ao),Et&&f.jsx(gc,{active:b==="files",label:O3(),icon:f.jsx(vo,{size:12,className:"shrink-0"}),onSelect:()=>or("files"),onClose:()=>Ya("files")}),Wt&&f.jsx(gc,{active:b==="terminal",label:ib(),icon:f.jsx(Ko,{size:12,className:"shrink-0"}),onSelect:()=>or("terminal"),onClose:()=>Ya("terminal")}),Pn&&f.jsx(gc,{active:b==="artifacts",label:nL(),icon:f.jsx(QS,{size:12,className:"shrink-0"}),onSelect:()=>or("artifacts"),onClose:()=>Ya("artifacts")}),Dn&&f.jsx(gc,{active:b==="experiments",label:rL(),icon:f.jsx(Bh,{size:12,className:"shrink-0"}),onSelect:()=>or("experiments"),onClose:()=>Ya("experiments")}),Za.map(ud)]}),f.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[f.jsx(At,{title:Fs?xN():yN(),"aria-label":Fs?xN():yN(),onClick:()=>yi(Y=>!Y),children:Fs?f.jsx(F6n,{size:14}):f.jsx(D6n,{size:14})}),f.jsx(At,{title:Z0(),"aria-label":Z0(),onClick:()=>{H(),yi(!1)},children:f.jsx(ur,{size:14})})]})]}),b==="terminal"&&Wt?null:!ki||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!Fe||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Ye?f.jsx(Ca,{children:f.jsx(Ct,{})}):Ts&&(!Ja||p&&!dt.some(Y=>Y.id===p&&Y.experimentId===Ts.id))||il&&!Hi||t&&"sessionId"in t&&t.sessionId&&!(N!=null&&N.includes(t.sessionId))?f.jsx(Ca,{children:f.jsx("div",{className:"p-6 text-subtext",children:ho()})}):b==="artifacts"?f.jsx(Ca,{children:wn&&f.jsx(oHn,{project:wn,artifacts:We,onOpenFile:k_,canRenameFile:Y=>{var _e;return!((_e=pn.current.get(ei(wn.id,d,{path:Y,source:"artifacts"})))!=null&&_e.needsProtection)}},wn.id)}):b==="experiments"?f.jsxs(Ca,{children:[f.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[f.jsx("span",{className:"flex-1"}),f.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[f.jsxs("div",{className:"option-picker relative inline-flex",ref:$t,children:[f.jsx(At,{size:"small",ref:Gt,className:"experiment-scope-trigger",active:Jt==="agent",title:Lue({scope:Jt==="agent"?vN():bN()}),"aria-label":c_e(),"aria-expanded":cn,onClick:()=>Tt(Y=>!Y),children:f.jsx(h6n,{size:16,strokeWidth:2.5})}),cn&&f.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right experiment-scope-menu [&_.model-item]:whitespace-nowrap [&_.model-item:disabled]:text-muted [&_.model-item:disabled]:cursor-default [&_.model-item:disabled:hover]:bg-transparent",children:[f.jsxs(on,{"aria-pressed":Jt==="agent",disabled:!d||!Gr,title:d?Gr?void 0:p_e():j_e(),onClick:()=>{_n("agent"),Tt(!1)},children:[f.jsx("span",{children:vN()}),Jt==="agent"&&f.jsx(ti,{size:13})]}),f.jsxs(on,{"aria-pressed":Jt==="project",onClick:()=>{_n("project"),Tt(!1)},children:[f.jsx("span",{children:bN()}),Jt==="project"&&f.jsx(ti,{size:13})]}),f.jsx("div",{className:"my-1 border-t border-border-variant"}),f.jsxs(on,{"aria-pressed":Be,onClick:()=>{un(Y=>!Y),Tt(!1)},children:[f.jsx("span",{children:hfe()}),Be&&f.jsx(ti,{size:13})]})]})]}),f.jsxs("div",{className:"seg inline-flex items-center gap-0.5 rounded-md bg-hover-subtle [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default experiments-view-toggle p-0.5 [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-sm",role:"group","aria-label":que(),children:[f.jsx("button",{className:ct==="table"?"active":"","aria-pressed":ct==="table",onClick:()=>St("table"),children:Dfe()}),f.jsx("button",{className:ct==="tree"?"active":"","aria-pressed":ct==="tree",onClick:()=>St("tree"),children:Hfe()})]})]})]}),f.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:ct==="tree"?wn&&f.jsx(AXn,{experiments:Ee,archiveActions:ut,showArchived:Be,runs:Tn,project:wn,onOpenView:Bi,onOpenCode:sc,onArchive:fn,agentSessionId:Jt==="agent"?d:null,onShowProjectScope:As,onRestoreRegion:yn,viewport:ri,onViewportChange:xi}):f.jsx(eqn,{archiveActions:ut,runs:Tn,emptyHint:!Be&&Gn.length>0&&ls.length===0?P0n():Jt==="agent"&&Ee.length>0?w_e():void 0,experiments:ls,onOpen:(Y,_e)=>{Bi(Y.id,"overview",_e)},onOpenLogs:(Y,_e,we)=>{Bi(Y,"terminal",we,_e)},onOpenCode:(Y,_e)=>{const we=Ee.find(Te=>Te.id===Y);we&&sc(we.id,we.branchName,"files",_e)},onArchive:fn,onCancel:zI})})]}):b==="files"?f.jsx(Ca,{children:wn?f.jsx(KFn,{sessionId:d??void 0,project:wn,view:bi,toggled:zs,onViewChange:Ii,onToggledChange:kr,canRenameFile:Y=>{var _e;return!((_e=pn.current.get(ei(wn.id,d,{path:Y,source:"repo",sessionId:d??void 0})))!=null&&_e.needsProtection)},onOpenFile:(Y,_e,we,Te)=>pa(Y,_e,we,void 0,void 0,void 0,Te)},`files:${d??`project:${wn.id}`}`):f.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:f.jsx(dh,{children:f.jsxs("div",{className:"wt-empty flex flex-col items-center gap-2.5 py-12 px-6 text-center text-muted [&_>_svg]:text-subtext [&_p]:m-0 [&_p]:max-w-80 [&_p]:text-sm",children:[f.jsx(c6n,{size:22}),f.jsx("p",{children:efe()})]})})})}):Qn?f.jsx(Ca,{children:n&&f.jsx(VHn,{remote:e.kind==="ssh",restored:z.current.has(ei(n,d,Qn)),onRestoreActivated:()=>{const Y=ei(n,d,Qn);z.current.delete(Y),A.current.add(Y)},showSource:j.current[ei(n,d,Qn)]??!1,onShowSourceChange:Y=>{j.current[ei(n,d,Qn)]=Y,D(_e=>_e+1)},projectId:n,path:Qn.path,source:Qn.source,sessionId:Qn.source==="artifacts"?d??void 0:Qn.sessionId,gitRef:Qn.ref,line:Qn.line,branchLabel:MXn(Qn,wn==null?void 0:wn.baselineBranch),artifactVersion:yp,artifactEntries:Qn.source==="artifacts"?We==null?void 0:We.entries:void 0,bufferSession:xn(ei(n,d,Qn)),onOpenFile:(Y,_e,we,Te)=>hs(Qn,()=>pa(Y,_e,we,void 0,void 0,void 0,Te)),scrollPosition:pt.current.get(ei(n,d,Qn)),onScrollPositionChange:Y=>{pt.current.set(ei(n,d,Qn),Y),Jo()},lineScrollRequest:Qn.lineScrollRequest,onLineScrollRequestHandled:()=>Si(Qn),onEdit:()=>_s(Qn)},ei(n,d,Qn))}):ar?f.jsx(Ca,{children:f.jsx("div",{className:"pane-content flex-1 min-h-0 relative plan-tab-content overflow-y-auto bg-background py-4.5 px-6 [&_.md]:max-w-readable",children:f.jsx($c,{text:(sl==null?void 0:sl.key)===`${ar.sessionId}:${ar.promptId}`?sl.text??ho():((j_=Rn.find(Y=>Y.promptId===ar.promptId))==null?void 0:j_.plan)||sL(),onOpenFile:(Y,_e,we,Te,De)=>hs(ar,()=>pa(Y,ar.sessionId,Te,_e,we,void 0,De))})})}):Ms&&n?f.jsx(Ca,{children:oc?f.jsx("div",{className:"flex min-h-0 flex-1",children:f.jsx(cM,{embedded:!0,projectId:n,projectName:(wn==null?void 0:wn.name)??"",railOpen:!1,onShowRail:()=>wi(!0),mainView:"chat",onSelectMainView:_a,onOpenFile:(Y,_e,we,Te,De,it)=>hs(Ms,()=>ir(Y,_e,we,Te,De,it)),onOpenRun:(Y,_e)=>hs(Ms,()=>fr(Y,_e)),runExperimentName:nu,onOpenExperiment:(Y,_e)=>hs(Ms,()=>nc(Y,_e)),experimentName:w_,onOpenPlan:(Y,_e,we,Te)=>hs(Ms,()=>Fi(Y,_e,we,Te)),onOpenSubagent:(Y,_e,we,Te)=>hs(Ms,()=>S_(Y,_e,we,Te)),runtime:e,activeSessionId:Ms.sessionId,onOpenSideChat:(Y,_e)=>void ru(Y,_e),onActiveSessionChange:(Y,_e)=>{var Te;const we=!((Te=Ze.getQueryData(pi(n).queryKey))!=null&&Te.some(De=>De.id===Ms.sessionId));Y===null&&we?zo(Ms):Ka(Y,_e)},preferredAgent:ce.preferredAgent,onPreferredAgentChange:ad,preferredAutonomy:ce.preferredAutonomy??Z3,onPreferredAutonomyChange:x_},Ms.sessionId)}):f.jsx("div",{className:"p-6 text-sm text-muted",children:gI()})}):Rs?f.jsx(RFn,{projectId:n,sessionId:Rs.sessionId,spawnPartId:Rs.spawnPartId,onOpenFile:(Y,_e,we,Te,De)=>hs(Rs,()=>ir(Y,Rs.sessionId,_e,we,Te,De)),onOpenRun:(Y,_e)=>hs(Rs,()=>fr(Y,_e)),runExperimentName:nu,onOpenExperiment:(Y,_e)=>hs(Rs,()=>nc(Y,_e)),experimentName:w_,onOpenSubagent:(Y,_e,we)=>hs(Rs,()=>S_(Rs.sessionId,Y,_e,we))},Rs.spawnPartId):is?f.jsx(Ca,{children:n&&wn&&is&&Hi&&f.jsx(VFn,{projectId:n,project:wn,experiment:Hi,view:is.view,toggled:is.toggled,onViewChange:Y=>jo(is,{view:Y}),onToggledChange:Y=>jo(is,{toggled:Y}),onOpenFile:(Y,_e,we,Te)=>hs(is,()=>pa(Y,_e,we,void 0,void 0,Hi.branchName,Te))},`code:${is.branch}`)}):f.jsx(Ca,{children:Ts&&Ja&&wn&&f.jsx(xHn,{experiment:Ja,project:wn,view:Ts.view,runs:dt,selectedRunId:p,onSelectRun:Q,parentExperiment:Ee.find(Y=>Y.id===Ja.parentExperimentId)??null,onOpenView:(Y,_e,we)=>{hs(Ts,()=>Bi(Ja.id,Y,we,_e))},onOpenCode:(Y,_e)=>hs(Ts,()=>sc(Ja.id,Ja.branchName,Y,_e))},`${Ts.id}:${Ts.view}`)}),Wt&&Wn!==null&&Wn===Co&&wn&&f.jsx(Ca,{className:b==="terminal"?void 0:"hidden",children:f.jsx(pzn,{projectId:wn.id,sessionId:d,active:b==="terminal"},Co)})]})]}),oa&&f.jsx(ZHn,{remote:e.kind==="ssh",onClose:()=>qa(!1),onCreated:(Y,_e)=>{qa(!1),iu(Y,_e)}}),ai&&wn&&Do(wn.id)&&f.jsx(tqn,{onClose:$i,onCreateProject:sd})]})}const Jk=Fc()({validateSearch:e=>({pane:e6(e.pane)}),beforeLoad:({location:e})=>{if(!Mf(e.pathname))throw MW()},component:$Xn});function $Xn(){const{projectId:e}=Jk.useParams(),{pane:n}=Jk.useSearch(),t=Oi(),r=UD({select:s=>s.location});return T.useEffect(()=>{const s=BXn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),f.jsxs(f.Fragment,{children:[f.jsx(Q0,{}),f.jsx(IXn,{projectId:e,pane:n,runtime:Q$()})]})}function BXn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&e6(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const QG=Fc()({component:PXn});function PXn(){const{projectId:e}=QG.useParams();return f.jsx(x8n,{projectId:e})}const FXn=Fc()({}),HXn=Fc()({}),qXn=Fc()({}),UXn=Fc()({}),GXn=k8n.update({id:"/",path:"/",getParentRoute:()=>gy}),h7=S8n.update({id:"/projects",path:"/projects",getParentRoute:()=>gy}),VXn=C8n.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>gy}),KXn=E8n.update({id:"/",path:"/",getParentRoute:()=>h7}),pp=Jk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>h7}),WXn=QG.update({id:"/",path:"/",getParentRoute:()=>pp}),QXn=FXn.update({id:"/skills",path:"/skills",getParentRoute:()=>pp}),XXn=HXn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>pp}),YXn=qXn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>pp}),ZXn=UXn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>pp}),JXn={ProjectsProjectIdSkillsRoute:QXn,ProjectsProjectIdIndexRoute:WXn,ProjectsProjectIdSettingsTabRoute:XXn,ProjectsProjectIdTasksSessionIdRoute:YXn,ProjectsProjectIdTasksNewRoute:ZXn},eYn=pp._addFileChildren(JXn),tYn={ProjectsProjectIdRoute:eYn,ProjectsIndexRoute:KXn},nYn=h7._addFileChildren(tYn),rYn={IndexRoute:GXn,ProjectsRoute:nYn,RemoteLaunchRoute:VXn},sYn=gy._addFileChildren(rYn)._addFileTypes(),iYn=tX({routeTree:sYn,context:{queryClient:Ze},trailingSlash:"never",defaultPendingComponent:B6,defaultErrorComponent:P6,defaultNotFoundComponent:y8n}),dv={minimize:"",maximize:"",restore:"",close:""};function aYn(e){const n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-maximized"]}),()=>n.disconnect()}function XG(e){var n;(n=window.ipc)==null||n.postMessage(`titlebar:${e}`)}function r3(e){return n=>{n.button===0&&(n.preventDefault(),XG(`resize:${e}`))}}function s3({label:e,glyph:n,message:t,className:r}){return f.jsx("button",{className:`inline-flex h-8 w-11.5 items-center justify-center text-xs text-text font-['Segoe_Fluent_Icons','Segoe_MDL2_Assets'] ${r}`,tabIndex:-1,title:e,"aria-label":e,onClick:()=>XG(t),children:n})}function oYn(){const e=T.useSyncExternalStore(aYn,()=>document.documentElement.hasAttribute("data-maximized"));return f.jsxs(f.Fragment,{children:[!e&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-x-0 top-0 z-300 h-1 cursor-ns-resize",onMouseDown:r3("n")}),f.jsx("div",{className:"fixed start-0 top-0 z-300 size-2 cursor-nwse-resize",onMouseDown:r3("nw")}),f.jsx("div",{className:"fixed end-0 top-0 z-300 size-2 cursor-nesw-resize",onMouseDown:r3("ne")})]}),f.jsxs("div",{className:"fixed end-0 top-0 z-300 flex",children:[f.jsx(s3,{label:Iyn(),glyph:dv.minimize,message:"minimize",className:"hover:bg-panel"}),f.jsx(s3,{label:e?Uyn():Ayn(),glyph:e?dv.restore:dv.maximize,message:"zoom",className:"hover:bg-panel"}),f.jsx(s3,{label:kyn(),glyph:dv.close,message:"close",className:"hover:bg-accent-red hover:text-white"})]})]})}const YG=E();document.documentElement.lang=YG;document.documentElement.dir="ltr";BI(YG);lW.createRoot(document.getElementById("root")).render(f.jsxs(T.StrictMode,{children:[f.jsxs(bK,{client:Ze,children:[f.jsx(sX,{router:iYn}),!1]}),f.jsx(uSn,{}),e$&&f.jsx(oYn,{})]}));export{qc as C,At as I,$b as M,Qf as P,D$ as S,q6n as a,vz as b,at as c,qr as d,WFn as e,ln as f,E as g,ni as h,bz as i,f as j,T as r}; +${k}`,x=T.useRef({key:"",value:0});x.current.key!==y&&(x.current={key:y,value:x.current.value+1});const b=T.useMemo(()=>{const Y=t?Bo(t):"experiments";return typeof Y=="object"&&"path"in Y&&Y.line&&m!==x.current.value?{...Y,lineScrollRequest:x.current.value}:Y},[t,m,i.href,k]),C=dt(pi(n)),N=T.useMemo(()=>{var Y;return((Y=C.data)==null?void 0:Y.map(_e=>_e.id))??null},[C.data]),z=T.useRef(new Set),A=T.useRef(new Set),j=T.useRef({}),[M,D]=T.useState(0),L=T.useRef({projectId:n,activeSessionId:d,pane:t,isTask:(a==null?void 0:a.kind)==="task"});L.current={projectId:n,activeSessionId:d,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const B=T.useCallback((Y,_e=!1)=>{const we=L.current;we.projectId&&s.navigate({href:Cv(we.projectId,we.activeSessionId,Y),replace:_e})},[s]),U=T.useCallback(Y=>{const _e=Ll(Y);B(_e.kind==="file"?{..._e,line:void 0}:_e)},[B]),H=T.useCallback(()=>B(void 0),[B]),Q=T.useCallback(Y=>{(t==null?void 0:t.kind)==="experiment"&&B({...t,runId:Y??void 0})},[t,B]),K=T.useCallback(Y=>{s.navigate({href:Y?`/projects/${encodeURIComponent(Y)}`:"/projects"})},[s]),Z=T.useCallback(Y=>{var _e;if(n)if(Y==="chat"){const we=c.current;s.navigate({href:Cv(n,we,(_e=e_(Va.current,we??"new"))==null?void 0:_e.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Y==="skills"?"skills":`settings/${Y}`}`})},[s,n]),ee=d_(),{status:$}=$6(e.kind==="local"),I=T.useMemo(()=>Af(),[n]),F=dt(I),q=F.data??null,V=T.useCallback(Y=>{ts(I.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[I]),ie=T.useMemo(()=>Jm(),[n]),oe=dt(ie),ce=oe.data??null,ne=T.useCallback(Y=>{ts(ie.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[ie]),G=T.useRef(void 0);G.current=ce==null?void 0:ce.tourCompleted;const ae=[!F.data&&F.error?M0():null,!oe.data&&oe.error?ofe():null].filter(Y=>Y!==null),le=ae.length?xfe({items:new Intl.ListFormat(ee).format(ae)}):null,me=T.useRef(null),ve=dt(_b(n)),Ee=ve.data??[],Fe=!ve.isPending,[We,Oe]=T.useState(!1),ht=dt(Qu(n)).data??[],xt=T.useRef(ht);xt.current=ht;const Kt=T.useRef(new Map),Ut=T.useRef(new Set),Ht=T.useRef(null),$e=T.useRef(!1),ot=T.useRef(new Map),ct=T.useRef(new Map),ye=T.useRef(0),Be=T.useRef(Ee);Be.current=Ee;const Ce=dt(Y8n(n)).data??null,[Ye,lt]=T.useState("table"),[je,Gt]=T.useState(!1),[Mt,Jt]=T.useState("project"),rn=T.useRef(null),{open:nn,setOpen:Nt,ref:wt}=ra(rn),[Bn,gr]=T.useState(!1),Gr=Ee.every(Y=>Y.chatSessionId),en=d&&Gr?Mt:"project",Vn=T.useMemo(()=>en!=="agent"?Ee:Ee.filter(Y=>Y.chatSessionId===d),[Ee,en,d]),ls=T.useMemo(()=>Vn.filter(Y=>je||!Y.archived),[Vn,je]),_t=T.useMemo(()=>wqn(Ee),[Ee]),fn=T.useCallback(async(Y,_e,we)=>{try{await Uwn(Y,_e,we),await Ze.invalidateQueries({queryKey:_b(n).queryKey})}catch(Te){sn(Te instanceof Error?Te.message:String(Te),"error")}},[n]),yn=T.useCallback(Y=>{fn(Y,en==="agent"?"taskRegion":"region",!1)},[fn,en]),Tn=T.useMemo(()=>{if(en!=="agent")return ht;const Y=new Set(Vn.map(_e=>_e.id));return ht.filter(_e=>Y.has(_e.experimentId))},[ht,Vn,en]),[Kn,dn]=T.useState([]),[Dn,Wn]=T.useState(!1),[zt,Ot]=T.useState(!1),[Fn,rs]=T.useState(!1),[Wt,sr]=T.useState(!1),[Qn,jr]=T.useState(null),[Es,Vr]=T.useState([]),[vr,Qe]=T.useState([]),mt=T.useRef(new Map),mn=T.useRef(new Map),xn=Y=>{let _e=mn.current.get(Y);return _e||(_e=new QHn,mn.current.set(Y,_e)),_e},[Rn,fr]=T.useState([]),[ir,Ln]=T.useState([]),[us,Ns]=T.useState([]),[Ir,Kr]=T.useState([]),[Yo,Xc]=T.useState([]),[ia,Zl]=T.useState(null),[bi,Ii]=T.useState("files"),[zs,Sr]=T.useState(new Set),[Fs,yi]=T.useState(!1),[ri,xi]=T.useState(null),[si,js]=T.useState(c9n),[ss,Zo]=T.useState(()=>window.innerWidth>=jO),aa=o==="chat"&&!f&&ss,[br,wi]=T.useState(!0),[oa,qa]=T.useState(!1),Ua=T.useRef(s6()),ca=T.useRef(d);ca.current=d;const ii=T.useRef(Kn);ii.current=Kn;const Ga=T.useRef(Yo);Ga.current=Yo;const la=T.useRef(null),Ws=T.useCallback(Y=>{const _e=[...Y];Ga.current=_e,Xc(_e)},[]),ua=T.useCallback(Y=>{la.current=Y,Zl(Y)},[]),Yc=T.useCallback(Y=>{const _e=Lt(Y);Vr(De=>u0(De,_e)),Qe(De=>u0(De,_e)),fr(De=>u0(De,_e)),Ln(De=>u0(De,_e)),Kr(De=>u0(De,_e));const we=da.current;if(we&&"path"in Y){const De=ei(we,ca.current,Y);mt.current.delete(De),mn.current.delete(De),A.current.delete(De),z.current.delete(De)}const Te=ii.current.filter(De=>Lt(De)!==_e);ii.current=Te,dn(Te)},[]),cr=T.useCallback(Y=>{const _e=Lt(Y),we=[...ii.current.filter(Te=>Lt(Te)!==_e),D1(Y)];ii.current=we,dn(we),U(Y)},[U]),Cr=T.useCallback((Y,_e,we)=>{const Te=Lt(Y),De=la.current,it=rBn({order:Ga.current,previewKey:De?Lt(De):null},Te,_e);it.replacedKey&&De&&typeof De!="string"&&Lt(De)===it.replacedKey&&Yc(De),Ws(it.order),it.previewKey===null?ua(null):it.previewKey===Te&&ua(D1(Y));const nt=[...ii.current.filter(At=>Lt(At)!==Te),D1(Y)];ii.current=nt,dn(nt),B(Ll(Y,we))},[Yc,Ws,ua,B]),_s=T.useCallback(Y=>{const _e=la.current;_e&&Lt(_e)===Lt(Y)&&ua(null)},[ua]);T.useEffect(()=>{let Y=!1;const _e=Te=>{const De=la.current,it=Te.target;if(it instanceof Element&&it.closest("input, textarea, [contenteditable='true']")!==null){Y=!1;return}if(De&&Lt(De)===Lt(Ua.current.rightTab)&&(Te.metaKey||Te.ctrlKey)&&!Te.altKey&&!Te.shiftKey&&Te.key.toLowerCase()==="k"){Te.preventDefault(),Y=!0;return}if(Y&&Te.key==="Enter"){Te.preventDefault(),Y=!1;const At=la.current;At&&_s(At);return}Y=!1},we=()=>{Y=!1};return window.addEventListener("keydown",_e),window.addEventListener("blur",we),window.addEventListener("pointerdown",we),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("blur",we),window.removeEventListener("pointerdown",we)}},[_s]);const Ar=T.useCallback((Y,_e)=>{const we=Lt(Y),Te=la.current;Te&&Lt(Te)===we&&ua(null);const De=sBn({order:Ga.current,previewKey:Te?Lt(Te):null},we,ii.current.map(Lt));Ws(De.order);const it=ii.current.filter(At=>Lt(At)!==we);if(ii.current=it,dn(it),!_e)return;const nt=De.fallbackKey?it.find(At=>Lt(At)===De.fallbackKey):void 0;nt?U(nt):(H(),yi(!1))},[Ws,ua,U,H]),_a=Z,Zc=T.useMemo(()=>({rightTab:D1(b),tabHistory:Kn,experimentsTabOpen:Dn,filesTabOpen:zt,artifactsTabOpen:Fn,terminalTabOpen:Wt,expTabs:Es,fileTabs:vr,planTabs:Rn,subagentTabs:ir,sideTabs:us,codeTabs:Ir,contentTabOrder:Ga.current,previewTab:la.current,filesView:bi,filesToggled:zs,selectedRunId:p,scope:Mt,panelOpen:f,panelMax:Fs,treeViewport:ri}),[b,Kn,Dn,zt,Fn,Wt,Es,vr,Rn,ir,us,Ir,Yo,ia,bi,zs,p,Mt,f,Fs,ri]);Ua.current=Zc;const v_=T.useCallback(()=>Object.fromEntries(mt.current),[]),Dt=T.useRef(void 0),Jo=T.useCallback(()=>{clearTimeout(Dt.current),Dt.current=setTimeout(()=>D(Y=>Y+1),200)},[]);T.useEffect(()=>()=>clearTimeout(Dt.current),[]);const Hs=T.useCallback((Y,_e,we)=>{if(dn(Y.tabHistory),ii.current=Y.tabHistory,Wn(Y.experimentsTabOpen),Ot(Y.filesTabOpen),rs(Y.artifactsTabOpen),sr(Y.terminalTabOpen),Vr(Y.expTabs),Qe(Y.fileTabs),fr(De=>De===Y.planTabs?De:Y.planTabs.map(it=>{var nt;return{...it,plan:((nt=De.find(At=>At.sessionId===it.sessionId&&At.promptId===it.promptId))==null?void 0:nt.plan)??""}})),Ln(Y.subagentTabs),Ns(Y.sideTabs),Kr(Y.codeTabs),Ws(Y.contentTabOrder),ua(Y.previewTab),Ii(Y.filesView),Sr(Y.filesToggled),Jt(Y.scope),yi(Y.panelMax),xi(Y.treeViewport),gr(L.current.activeSessionId===ef&&Y.fileTabs.some(De=>H_(De,{path:Nw,source:"artifacts"}))),we){for(const[De,it]of Object.entries((_e==null?void 0:_e.scroll)??{}))mt.current.set(De,it);Object.assign(j.current,_e==null?void 0:_e.sourceModes)}const Te=L.current;if(Te.projectId)for(const De of Y.fileTabs){const it=ei(Te.projectId,Te.activeSessionId,De);A.current.has(it)||z.current.add(it)}},[Ws,ua]),{ready:ki,loaded:ft,error:Qt,retry:fa,capture:wo,workspace:Va}=k7n({projectId:ce&&N!==null&&((a==null?void 0:a.kind)!=="task"||!d||N.includes(d))?n:null,taskKey:d??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ce==null?void 0:ce.tourCompleted)===!1,state:Zc,apply:Hs,getScroll:v_,sourceModes:j.current,revision:M}),fs=T.useRef(null);T.useLayoutEffect(()=>{if(!ki||!Fe||(a==null?void 0:a.kind)!=="task")return;const Y=fs.current;(Y==null?void 0:Y.projectId)===n&&Y.taskId===d&&Y.scope!==en&&xi(null),fs.current={projectId:n,taskId:d,scope:en}},[ki,Fe,a==null?void 0:a.kind,n,d,en]);const Ka=T.useCallback((Y,_e)=>{var At;const we=(_e==null?void 0:_e.projectId)??n;if(!we)return;const Te=we===n;Y&&Te&&_e!=null&&_e.replace&&d===null&&(wo(),x7n(we,Y));const De=e_(W$(we),Y??"new"),it=De?De.active:Do(we)?(At=i6(Y??void 0,G.current===!1))==null?void 0:At.active:void 0,nt=Te&&(_e!=null&&_e.replace)&&Y&&d===null?L.current.pane:it;s.navigate({href:Cv(we,Y,nt),replace:Te&&(_e==null?void 0:_e.replace)})},[s,n,d,wo]);T.useEffect(()=>{ki&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Va.current.lastTaskId&&(N!=null&&N.includes(Va.current.lastTaskId))&&(c.current=Va.current.lastTaskId,D(Y=>Y+1))},[ki,a==null?void 0:a.kind,Va,N]),aX({shouldBlockFn:({next:Y})=>{var _e;return((_e=Mf(Y.pathname))==null?void 0:_e.projectId)!==n&&[...mn.current.values()].some(we=>we.needsProtection)&&!vM(lz())},enableBeforeUnload:()=>[...mn.current.values()].some(Y=>Y.needsProtection)});const Jl=T.useRef(null);T.useEffect(()=>{const Y=py(i.href);!ce||!ki||!Y||(n6.queue({lastLocation:Y,railOpen:br,panelWidth:si,experimentsView:Ye},Jl.current===Y?250:0),Jl.current=Y)},[i.href,ce,ki,br,si,Ye]);const ds=(ce==null?void 0:ce.onboardingCompleted)??!1,[ai,ec]=T.useState(!1),[ko,gn]=T.useState(null),[eu,Jc]=T.useState(0),Wr=T.useCallback(()=>ec(!0),[]),$i=T.useCallback(async Y=>{const _e=G.current===!1,we=await r.mutateAsync({tourCompleted:!0});_e&&Lu({name:"demo_welcome_choice",choice:Y}),ne(Te=>Te&&{...Te,tourCompleted:we.tourCompleted}),ec(!1),Y==="explore_demo"&&Jc(Te=>Te+1)},[]),sd=T.useCallback(async()=>{await $i("create_project"),qa(!0)},[$i]);T.useEffect(()=>{!n||!Do(n)||!ds||ce!=null&&ce.tourCompleted||Wr()},[n,ds,Wr,ce==null?void 0:ce.tourCompleted]);const wn=(q==null?void 0:q.find(Y=>Y.id===n))??null;T.useEffect(()=>{const Y=le||ce===null?null:wn==null?void 0:wn.name;document.title=Y?`${Ml(Y)} — OpenResearch`:"OpenResearch"},[le,ce,wn]);const da=T.useRef(n);da.current=n;const So=T.useCallback(Y=>{n&&Lu({name:"first_action",surface:Do(n)?"demo":"project",action:Y})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&So("open_settings")},[o,So]);const Wa=T.useCallback((Y=!1)=>{Y&&(!L.current.isTask||L.current.pane)||(So("open_experiment"),Wn(!0),B({kind:"home",view:"experiments"},Y))},[B,So]),mp=()=>{F.refetch(),oe.refetch(),C.refetch()},id=T.useRef(!1);T.useEffect(()=>{if(!ce||id.current)return;id.current=!0,me.current=ce.preferredAgent;const Y=q$()??ce.workspace;Y&&(wi(Y.railOpen),js(Math.min(Y.panelWidth,Jd())),lt(Y.experimentsView))},[ce]),T.useEffect(()=>{N&&c.current&&!N.includes(c.current)&&(c.current=null)},[N]);const b_=T.useRef(Promise.resolve()),y_=T.useRef(0),ad=T.useCallback(Y=>{const _e=++y_.current;ne(Te=>Te&&{...Te,preferredAgent:Y});const we=b_.current.then(()=>r.mutateAsync({preferredAgent:Y})).then(Te=>{me.current=Te.preferredAgent,_e===y_.current&&ne(De=>De&&{...De,preferredAgent:Te.preferredAgent})}).catch(Te=>{throw _e===y_.current&&ne(De=>De&&{...De,preferredAgent:me.current}),Te});return b_.current=we.catch(()=>{}),we},[]),tu=T.useRef(Promise.resolve()),od=T.useRef(0),x_=T.useCallback(Y=>{const _e=++od.current;ne(we=>we&&{...we,preferredAutonomy:Y}),tu.current=tu.current.then(()=>r.mutateAsync({preferredAutonomy:Y})).catch(()=>{_e===od.current&&oe.refetch()})},[]);T.useEffect(()=>{const Y=()=>{js(_e=>Math.min(_e,Jd())),Zo(window.innerWidth>=jO)};return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const ha=T.useCallback(Y=>{$e.current=!1,ot.current.clear(),ct.current.clear();const _e=++ye.current;Ze.fetchQuery(Qu(Y)).then(we=>{if(da.current!==Y||Ht.current!==Y||ye.current!==_e)return;ot.current=new Map(we.map(De=>[De.id,De]));const Te=[...ct.current.values()].some(De=>{const it=ot.current.get(De.id);return!it||it.status!=="running"&&it.updatedAt<=De.updatedAt});ct.current.clear();for(const De of we){const it=Kt.current.get(De.id);(!it||it.updatedAt{var it;return we.some(nt=>nt.id===De&&nt.status==="running")?De:((it=we.find(nt=>nt.status==="running"))==null?void 0:it.id)??null}),Te&&Wa(!0)}).catch(()=>{ye.current===_e&&(ct.current.clear(),Oe(!0))})},[Wa]);T.useEffect(()=>{if(n)return Ht.current=n,Kt.current.clear(),Ut.current.clear(),Hwn(n).catch(()=>{}),ha(n),()=>{ye.current++}},[ha,n]);const tc=T.useCallback(()=>{rs(!0),cr("artifacts")},[cr]),el=T.useCallback(()=>{sr(!0),cr("terminal")},[cr]),Co=d??(n?`project:${n}`:null);T.useEffect(()=>{jr(f?b==="terminal"?Co:Y=>Y===Co?Y:null:null)},[f,b,Co]),D5n({onReconnect:()=>{const Y=da.current;Y&&(Ht.current=Y,Kt.current.clear(),Ut.current.clear(),ha(Y))},onRun:Y=>{if(Y.projectId!==da.current||Y.projectId!==Ht.current)return;const _e=Kt.current.get(Y.id),we=Ut.current.has(Y.id);if(_e&&_e.updatedAt>Y.updatedAt||(Kt.current.set(Y.id,Y),Ut.current.add(Y.id),Do(Y.projectId)&&gn(it=>Y.status==="running"?it??Y.id:it===Y.id?null:it),Y.status!=="running"||(_e==null?void 0:_e.status)==="running"))return;const Te=ot.current.get(Y.id),De=$e.current&&(!Te||Te.status!=="running"&&Te.updatedAt<=Y.updatedAt);we&&_e||De?Wa(!0):$e.current||ct.current.set(Y.id,Y)}});const As=T.useCallback(()=>Jt("project"),[]),Bi=T.useCallback((Y,_e="overview",we="preview",Te)=>{So("open_experiment");const De={id:Y,view:_e};Vr(it=>it.some(nt=>Dw(nt,De))?it:[...it,De]),_e==="terminal"&&Do(da.current)&&js(it=>Math.max(it,pA())),Cr(De,we,Te)},[Cr]),dr=T.useCallback((Y,_e="preview")=>{const we=xt.current.filter(De=>De.id===Y||De.id.startsWith(Y)),Te=we.length===1?we[0]:null;Te&&Bi(Te.experimentId,"terminal",_e,Te.id)},[Bi]),gp=T.useMemo(()=>new Map(Ee.map(Y=>{var _e;return[Y.id,((_e=Y.title)==null?void 0:_e.trim())||Y.slug||El()]})),[Ee,ee]),tl=TO(gp),vp=T.useMemo(()=>{const Y=new Map;for(const _e of ht)Y.set(_e.id,tl.get(_e.experimentId)??El());return Y},[tl,ht,ee]),Pi=TO(vp),nu=T.useCallback(Y=>{const _e=Pi.get(Y);if(_e)return _e;const we=[...Pi].filter(([Te])=>Te.startsWith(Y));return we.length===1?we[0][1]:""},[Pi]),w_=T.useCallback(Y=>{const _e=tl.get(Y);if(_e)return _e;const we=[...tl].filter(([Te])=>Te.startsWith(Y));return we.length===1?we[0][1]:""},[tl]),nc=T.useCallback((Y,_e="preview")=>{const we=Be.current.filter(Te=>Te.id===Y||Te.id.startsWith(Y));we.length===1&&Bi(we[0].id,"overview",_e)},[Bi]),bp=T.useCallback(Y=>{const _e=Es.findIndex(we=>Dw(we,Y));_e!==-1&&(Vr(we=>we.filter((Te,De)=>De!==_e)),Ar(Y,Lt(b)===Lt(Y)))},[Es,Ar,b]),Eo=T.useCallback((Y,_e="preview")=>{Y.line!=null&&v(De=>De+1);const we=da.current;if(we){const De=ei(we,ca.current,Y);Ua.current.fileTabs.some(it=>H_(it,Y))||z.current.delete(De),A.current.add(De)}const Te=V$(Y);Qe(De=>{const it=De.findIndex(At=>H_(At,Y));if(it===-1)return[...De,Te];const nt=De.slice();return nt[it]=Te,nt}),Cr(Y,_e)},[Cr]),Qa=T.useCallback((Y,_e,we,Te,De,it)=>{const nt=q==null?void 0:q.find(Us=>Us.id===n),At=tYn(Y,nt==null?void 0:nt.repoPath,_e,(nt==null?void 0:nt.artifactsDir)??(nt==null?void 0:nt.filesDir),nt==null?void 0:nt.slug);if(!At)return null;const In=De?Be.current.find(Us=>Us.id===De||De.length>=6&&Us.id.startsWith(De)):void 0,Qr=we??(In==null?void 0:In.branchName),Xs=At.source==null||At.source==="repo";return Qr&&Xs&&(At.ref=Qr),it&&!At.ref&&Xs&&(At.branchLabel=it),Te!=null&&(At.line=Te),At},[q,n]),pa=T.useCallback((Y,_e,we,Te,De,it,nt="preview")=>{const At=Qa(Y,_e,we,Te,De,it);At&&Eo(At,nt)},[Eo,Qa]),k_=T.useCallback(Y=>Eo({path:Y,source:"artifacts"},"keepOpen"),[Eo]),ar=T.useCallback((Y,_e,we,Te,De,it="preview")=>{const nt=Qa(Y,_e,De,we,Te);nt&&Eo(nt,it)},[Eo,Qa]),hs=T.useCallback((Y,_e)=>{_s(Y),_e()},[_s]),qs=T.useCallback(Y=>{var Te;const _e=vr.findIndex(De=>H_(De,Y));if(_e===-1)return;const we=n?ei(n,d,Y):null;we&&((Te=mn.current.get(we))!=null&&Te.needsProtection)&&!vM(lz())||(Qe(De=>De.filter((it,nt)=>nt!==_e)),we&&(mt.current.delete(we),mn.current.delete(we),A.current.delete(we),z.current.delete(we),delete j.current[we]),d===ef&&H_(Y,{path:Nw,source:"artifacts"})&&gr(!1),Ar(Y,Lt(b)===Lt(Y)))},[d,vr,Ar,n,b]),Si=T.useCallback(Y=>{Y.lineScrollRequest!==void 0&&w(Y.lineScrollRequest)},[]),Fi=T.useCallback((Y,_e,we,Te="preview")=>{const De={kind:"plan",sessionId:_e,promptId:we,plan:Y};fr(it=>{const nt=it.findIndex(In=>In.promptId===we);if(nt===-1)return[...it,De];const At=it.slice();return At[nt]=De,At}),Cr(De,Te)},[Cr]),No=T.useCallback(Y=>{const _e=Rn.findIndex(we=>we.promptId===Y.promptId);_e!==-1&&(fr(we=>we.filter((Te,De)=>De!==_e)),Ar(Y,Lt(b)===Lt(Y)))},[Ar,Rn,b]),S_=T.useCallback((Y,_e,we,Te="preview")=>{const De={kind:"subagent",sessionId:Y,spawnPartId:_e,label:we};Ln(it=>it.some(nt=>nt.spawnPartId===_e)?it:[...it,De]),Cr(De,Te)},[Cr]),Xa=T.useCallback(Y=>{const _e=ir.findIndex(we=>we.spawnPartId===Y.spawnPartId);_e!==-1&&(Ln(we=>we.filter((Te,De)=>De!==_e)),Ar(Y,Lt(b)===Lt(Y)))},[Ar,b,ir]),C_=T.useCallback(Y=>{const _e={kind:"side",sessionId:Y};Ns(we=>we.some(Te=>Te.sessionId===Y)?we:[...we,_e]),js(we=>Math.max(we,pA())),Cr(_e,"keepOpen")},[Cr]),zo=T.useCallback(Y=>{us.some(_e=>_e.sessionId===Y.sessionId)&&(Ns(_e=>_e.filter(we=>we.sessionId!==Y.sessionId)),Ar(Y,Lt(b)===Lt(Y)))},[Ar,b,us]);T.useEffect(()=>{const Y=C.data;if(Y)for(const _e of us)Y.some(we=>we.id===_e.sessionId)||zo(_e)},[C.data,us,zo]);const ru=T.useCallback(async(Y,_e)=>{let we;try{we=await I3n(Y)}catch(Te){sn(min({error:w0(Te)}),"error");return}if(L.current.activeSessionId!==Y){n5(we.id).catch(Te=>{sn(aj({error:w0(Te)}),"error")});return}if(ts(pi(we.projectId).queryKey,Te=>Te&&[we,...Te.filter(De=>De.id!==we.id)]),C_(we.id),!!_e)try{await Ze.fetchQuery(Rc(we.id)),await r5(we.id,_e)}catch(Te){sn(w0(Te),"error")}},[C_]),rc=T.useCallback(Y=>{zo(Y),n5(Y.sessionId).catch(_e=>{sn(aj({error:w0(_e)}),"error")})},[zo]),[ma,cd]=T.useState({});T.useEffect(()=>{if(cd(nt=>{const At=new Set(ir.map(In=>In.spawnPartId));return Object.keys(nt).every(In=>At.has(In))?nt:Object.fromEntries(Object.entries(nt).filter(([In])=>At.has(In)))}),ir.length===0)return;let Y=!0;const _e=new Set,we=(nt,At,In)=>{cd(Qr=>{var Us;let Xs=Qr;for(const oi of At)if(!(In&&_e.has(oi.spawnPartId)))for(const cu of nt){const Xr=$b(cu.parts,oi.spawnPartId);if(!Xr)continue;In||_e.add(oi.spawnPartId);const lc={label:IFn(Xr),running:((Us=Xr.state)==null?void 0:Us.status)==="running"},ci=Xs[oi.spawnPartId];(!ci||ci.label!==lc.label||ci.running!==lc.running)&&(Xs===Qr&&(Xs={...Qr}),Xs[oi.spawnPartId]=lc);break}return Xs})};let Te=0;const De=()=>{const nt=++Te;for(const At of new Set(ir.map(In=>In.sessionId)))Ze.fetchQuery({...Rc(At),staleTime:0}).then(({messages:In})=>{Y&&nt===Te&&we(In,ir.filter(Qr=>Qr.sessionId===At),!0)}).catch(()=>{})};De();const it=tm(nt=>{if(nt.type==="reconnected"){_e.clear(),De();return}if(nt.type!=="message")return;const At=ir.filter(In=>In.sessionId===nt.sessionId);At.length&&we([nt.message],At,!1)});return()=>{Y=!1,it()}},[ir]);const sc=T.useCallback((Y,_e,we="files",Te="preview")=>{const De={code:!0,experimentId:Y,branch:_e,view:we,toggled:new Set};Kr(it=>it.some(nt=>$d(nt,De))?it.map(nt=>$d(nt,De)?{...nt,experimentId:Y,view:we}:nt):[...it,De]),Cr(De,Te)},[Cr]),jo=T.useCallback((Y,_e)=>{Kr(we=>we.map(Te=>$d(Te,Y)?{...Te,..._e}:Te)),_e.view&&B(Ll({...Y,..._e}))},[]),nl=T.useCallback(Y=>{const _e=Ir.findIndex(we=>$d(we,Y));_e!==-1&&(Kr(we=>we.filter((Te,De)=>De!==_e)),Ar(Y,Lt(b)===Lt(Y)))},[Ir,Ar,b]),su=T.useCallback(()=>{Ot(!0),cr("files")},[cr]),Ya=T.useCallback(Y=>{Y==="experiments"?Wn(!1):Y==="files"?Ot(!1):Y==="terminal"?(sr(!1),jr(null)):rs(!1),Ar(Y,b===Y)},[Ar,b]),E_=Y=>{Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId);const we=document.body.style.userSelect;document.body.style.userSelect="none";const Te=Fs,De=Y.clientX,it=si;let nt=!1;function At(){window.removeEventListener("pointermove",In),window.removeEventListener("pointerup",At),window.removeEventListener("pointercancel",At),document.body.style.userSelect=we}function In(Qr){if(Te){const cu=Qr.clientX-De;if(nt||cuUs+sYn){yi(!0);return}yi(!1);const oi=Math.min(Math.max(Xs,yb),Us);js(oi)}window.addEventListener("pointermove",In),window.addEventListener("pointerup",At),window.addEventListener("pointercancel",At)},iu=(Y,_e)=>{V(we=>we?AO(we,Y):[Y]),s.navigate({href:`/projects/${encodeURIComponent(Y.id)}${_e?"/settings/git":""}`}),_e&&sn(_e,"error")},Ts=typeof b=="object"&&"id"in b?b:null,Xn=typeof b=="object"&&"path"in b?b:null,au=(Xn==null?void 0:Xn.source)==="artifacts"&&Ce?ym(Ce.entries,Xn.path):null,yp=au?`${au.modifiedAt}:${au.size}`:null,rl=d===ef&&Bn?vr.find(Y=>H_(Y,{path:Nw,source:"artifacts"})):void 0,N_=rl?[rl]:[],or=typeof b=="object"&&"kind"in b&&b.kind==="plan"?b:null,ps=or==null?void 0:or.sessionId,ic=or==null?void 0:or.promptId,ou=!!(ps&&ic&&(N!=null&&N.includes(ps))),ac=dt({...Rc(ps??""),enabled:ou,subscribed:ou}),sl=T.useMemo(()=>{var _e;if(!ps||!ic||!ac.data)return null;const Y=ac.data.messages.flatMap(we=>{const Te=$b(we.parts,ic);return Te?[Te]:[]})[0];return{key:`${ps}:${ic}`,text:((_e=Y==null?void 0:Y.prompt)==null?void 0:_e.plan)??null}},[ps,ic,ac.data]),Rs=typeof b=="object"&&"kind"in b&&b.kind==="subagent"?b:null,Ms=typeof b=="object"&&"kind"in b&&b.kind==="side"?b:null,oc=Ms?(_d=C.data)==null?void 0:_d.find(Y=>Y.id===Ms.sessionId):void 0,il=typeof b=="object"&&"code"in b?b:null,is=il?Ir.find(Y=>$d(Y,il))??null:null,al=new Map;for(const Y of[...Es,...vr,...Rn,...ir,...us,...Ir])al.set(Lt(Y),Y);const ld=rl?Lt(rl):null,Za=Yo.filter(Y=>Y!==ld).map(Y=>al.get(Y)).filter(v7n),Qs=Y=>ia!==null&&Lt(ia)===Lt(Y),Ao=Y=>_.jsx(gc,{active:Xn!==null&&H_(Xn,Y),label:Y.path.split("/").pop()||Y.path,icon:_.jsx(j$,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>cr(Y),onPromote:()=>_s(Y),onClose:()=>qs(Y)},`file:${r6(Y)}`),Ja=Ts?Ee.find(Y=>Y.id===Ts.id)??null:null,Hi=is?Ee.find(Y=>Y.id===is.experimentId&&Y.branchName===is.branch)??null:null,ud=Y=>{var we,Te,De,it;if("path"in Y)return Ao(Y);if("id"in Y){const nt=Ee.find(At=>At.id===Y.id);return _.jsx(gc,{active:Ts!==null&&Dw(Ts,Y),label:nt?nt.title||nt.slug:"…",icon:Y.view==="overview"?_.jsx(JSn,{size:12,className:"shrink-0"}):_.jsx(Ko,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>cr(Y),onPromote:()=>_s(Y),onClose:()=>bp(Y)},Lt(Y))}if("kind"in Y&&Y.kind==="plan")return _.jsx(gc,{active:or!==null&&or.promptId===Y.promptId,label:_L(),icon:_.jsx(YS,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>cr(Y),onPromote:()=>_s(Y),onClose:()=>No(Y)},Lt(Y));if("kind"in Y&&Y.kind==="side"){const nt=(we=C.data)==null?void 0:we.find(At=>At.id===Y.sessionId);return _.jsx(gc,{active:Ms!==null&&Ms.sessionId===Y.sessionId,label:((Te=nt==null?void 0:nt.title)==null?void 0:Te.trim())||X3(),shimmer:(nt==null?void 0:nt.busy)??!1,icon:_.jsx(nm,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>cr(Y),onPromote:()=>_s(Y),onClose:()=>rc(Y)},Lt(Y))}if("kind"in Y)return _.jsx(gc,{active:Rs!==null&&Rs.spawnPartId===Y.spawnPartId,label:((De=ma[Y.spawnPartId])==null?void 0:De.label)??Y.label??zfe(),shimmer:((it=ma[Y.spawnPartId])==null?void 0:it.running)??!1,icon:_.jsx(JS,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>cr(Y),onPromote:()=>_s(Y),onClose:()=>Xa(Y)},Lt(Y));const _e=Ee.find(nt=>nt.id===Y.experimentId);return _.jsx(gc,{active:is!==null&&$d(is,Y),label:(_e==null?void 0:_e.slug)??Y.branch,icon:_.jsx(vo,{size:12,className:"shrink-0"}),preview:Qs(Y),onSelect:()=>cr(Y),onPromote:()=>_s(Y),onClose:()=>nl(Y)},Lt(Y))};if(!a||a.kind==="resume")return null;if(le)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsxs("div",{className:dv,children:[_.jsx("p",{children:le}),_.jsx(Me,{variant:"primary",onClick:mp,children:Ks()})]}),e.kind==="ssh"&&_.jsx(S5,{runtime:e,corner:!0})]});if(q&&!wn)return _.jsxs("div",{className:dv,children:[ho(),_.jsx(Me,{onClick:()=>K(null),children:M0()})]});if(q===null||ce===null)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsx("div",{className:dv,children:_.jsx(Et,{})}),e.kind==="ssh"&&_.jsx(S5,{runtime:e,corner:!0})]});if(!wn)return _.jsxs("div",{className:dv,children:[ho(),_.jsx(Me,{onClick:()=>K(null),children:M0()})]});const eo=!ft&&Qt||(!C.data&&C.error?w0(C.error):null)||(a.kind==="task"&&d&&N&&!N.includes(d)?ho():null),z_=!eo&&(!ft||N===null),xp=()=>{fa(),C.refetch()},wp=_.jsx(mqn,{onCollapse:()=>wi(!1)});return _.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&_.jsx(tB,{}),e.kind==="local"&&_.jsx(RB,{status:$}),_.jsx(DB,{}),Qt&&_.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 mac-titlebar:ps-20 win-titlebar:pe-36 py-2 text-subtext",children:[_.jsx("span",{children:Qt}),_.jsx(Me,{onClick:fa,children:Ks()})]}),_.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${aa?"workspace-card-visible":""}`,children:[n&&_.jsx(cM,{projectId:n,projectName:wn.name,contentLoading:z_,contentError:eo||null,onRetryContent:xp,railHeader:wp,railOpen:br,onShowRail:()=>wi(!0),onNewProject:()=>qa(!0),mainView:o,onSelectMainView:_a,onOpenFile:ar,onOpenRun:dr,runExperimentName:nu,onOpenExperiment:nc,experimentName:w_,onOpenPlan:Fi,onOpenSubagent:S_,onOpenSideChat:(Y,_e)=>void ru(Y,_e),composerFocusNonce:eu,demoRunningRunId:Do(wn.id)&&d===ef?ko:null,runtime:e,onOpenDemoWelcome:wn&&Do(wn.id)?Wr:void 0,activeSessionId:d,onActiveSessionChange:Ka,preferredAgent:ce.preferredAgent,onPreferredAgentChange:ad,preferredAutonomy:ce.preferredAutonomy??Z3,onPreferredAutonomyChange:x_,children:o==="skills"?_.jsx(BHn,{}):o!=="chat"?_.jsx(fPn,{remote:e.kind==="ssh",tab:o,project:wn,onProjectUpdate:Y=>{V(_e=>_e?AO(_e,Y):[Y])},onSelectTab:_a}):null}),o==="chat"&&ki&&!eo&&_.jsx(Lzn,{expanded:aa,experiments:Ee,runs:ht,onOpenExperiment:(Y,_e)=>Bi(Y,"overview","preview",_e),rightOffset:f?si+28:void 0,activeView:f&&(b==="files"||b==="artifacts"||b==="experiments"||b==="terminal")?b:null,projectId:wn.id,onCompute:()=>_a("compute"),sessionId:d,busy:((cc=C.data)==null?void 0:cc.some(Y=>Y.id===d&&Y.busy))??!1,onChanges:()=>{Ii("changes"),su()},onFiles:()=>{Ii("files"),su()},onTerminal:el,onArtifacts:tc,onExperiments:()=>Wa(),onSideChat:d?()=>void ru(d,""):void 0}),o==="chat"&&f&&_.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 win-titlebar:mt-10 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 mac-titlebar:[&.max]:top-8 win-titlebar:[&.max]:top-10 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Fs?"max":""}`,style:Fs?void 0:{width:si},"data-onboarding":"experiments",children:[_.jsx("div",{className:`panel-resizer absolute start-0 top-0 bottom-0 w-1.5 z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover ${Fs?"cursor-e-resize":"cursor-col-resize"}`,title:Fs?gue():uue(),onPointerDown:E_}),_.jsxs("div",{className:"tabs flex items-end gap-0 pt-1 pe-1.5 pb-0 ps-2 h-10 border-b border-b-border bg-background shrink-0",children:[_.jsxs("div",{className:"tab-strip flex items-end gap-0.5 flex-1 min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[N_.map(Ao),zt&&_.jsx(gc,{active:b==="files",label:O3(),icon:_.jsx(vo,{size:12,className:"shrink-0"}),onSelect:()=>cr("files"),onClose:()=>Ya("files")}),Wt&&_.jsx(gc,{active:b==="terminal",label:ab(),icon:_.jsx(Ko,{size:12,className:"shrink-0"}),onSelect:()=>cr("terminal"),onClose:()=>Ya("terminal")}),Fn&&_.jsx(gc,{active:b==="artifacts",label:nL(),icon:_.jsx(QS,{size:12,className:"shrink-0"}),onSelect:()=>cr("artifacts"),onClose:()=>Ya("artifacts")}),Dn&&_.jsx(gc,{active:b==="experiments",label:rL(),icon:_.jsx(Bh,{size:12,className:"shrink-0"}),onSelect:()=>cr("experiments"),onClose:()=>Ya("experiments")}),Za.map(ud)]}),_.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[_.jsx(Rt,{title:Fs?xN():yN(),"aria-label":Fs?xN():yN(),onClick:()=>yi(Y=>!Y),children:Fs?_.jsx(lCn,{size:14}):_.jsx(rCn,{size:14})}),_.jsx(Rt,{title:J0(),"aria-label":J0(),onClick:()=>{H(),yi(!1)},children:_.jsx(_r,{size:14})})]})]}),b==="terminal"&&Wt?null:!ki||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!Fe||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!We?_.jsx(Ca,{children:_.jsx(Et,{})}):Ts&&(!Ja||p&&!ht.some(Y=>Y.id===p&&Y.experimentId===Ts.id))||il&&!Hi||t&&"sessionId"in t&&t.sessionId&&!(N!=null&&N.includes(t.sessionId))?_.jsx(Ca,{children:_.jsx("div",{className:"p-6 text-subtext",children:ho()})}):b==="artifacts"?_.jsx(Ca,{children:wn&&_.jsx(AHn,{project:wn,artifacts:Ce,onOpenFile:k_,canRenameFile:Y=>{var _e;return!((_e=mn.current.get(ei(wn.id,d,{path:Y,source:"artifacts"})))!=null&&_e.needsProtection)}},wn.id)}):b==="experiments"?_.jsxs(Ca,{children:[_.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[_.jsx("span",{className:"flex-1"}),_.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[_.jsxs("div",{className:"option-picker relative inline-flex",ref:wt,children:[_.jsx(Rt,{size:"small",ref:rn,className:"experiment-scope-trigger",active:en==="agent",title:Lue({scope:en==="agent"?vN():bN()}),"aria-label":c_e(),"aria-expanded":nn,onClick:()=>Nt(Y=>!Y),children:_.jsx(L6n,{size:16,strokeWidth:2.5})}),nn&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right experiment-scope-menu [&_.model-item]:whitespace-nowrap [&_.model-item:disabled]:text-muted [&_.model-item:disabled]:cursor-default [&_.model-item:disabled:hover]:bg-transparent",children:[_.jsxs(un,{"aria-pressed":en==="agent",disabled:!d||!Gr,title:d?Gr?void 0:p_e():j_e(),onClick:()=>{Jt("agent"),Nt(!1)},children:[_.jsx("span",{children:vN()}),en==="agent"&&_.jsx(ti,{size:13})]}),_.jsxs(un,{"aria-pressed":en==="project",onClick:()=>{Jt("project"),Nt(!1)},children:[_.jsx("span",{children:bN()}),en==="project"&&_.jsx(ti,{size:13})]}),_.jsx("div",{className:"my-1 border-t border-border-variant"}),_.jsxs(un,{"aria-pressed":je,onClick:()=>{Gt(Y=>!Y),Nt(!1)},children:[_.jsx("span",{children:hfe()}),je&&_.jsx(ti,{size:13})]})]})]}),_.jsxs("div",{className:"seg inline-flex items-center gap-0.5 rounded-md bg-hover-subtle [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default experiments-view-toggle p-0.5 [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-sm",role:"group","aria-label":que(),children:[_.jsx("button",{className:Ye==="table"?"active":"","aria-pressed":Ye==="table",onClick:()=>lt("table"),children:Dfe()}),_.jsx("button",{className:Ye==="tree"?"active":"","aria-pressed":Ye==="tree",onClick:()=>lt("tree"),children:Hfe()})]})]})]}),_.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:Ye==="tree"?wn&&_.jsx(JXn,{experiments:Ee,archiveActions:_t,showArchived:je,runs:Tn,project:wn,onOpenView:Bi,onOpenCode:sc,onArchive:fn,agentSessionId:en==="agent"?d:null,onShowProjectScope:As,onRestoreRegion:yn,viewport:ri,onViewportChange:xi}):_.jsx(kqn,{archiveActions:_t,runs:Tn,emptyHint:!je&&Vn.length>0&&ls.length===0?omn():en==="agent"&&Ee.length>0?w_e():void 0,experiments:ls,onOpen:(Y,_e)=>{Bi(Y.id,"overview",_e)},onOpenLogs:(Y,_e,we)=>{Bi(Y,"terminal",we,_e)},onOpenCode:(Y,_e)=>{const we=Ee.find(Te=>Te.id===Y);we&&sc(we.id,we.branchName,"files",_e)},onArchive:fn,onCancel:zI})})]}):b==="files"?_.jsx(Ca,{children:wn?_.jsx(mHn,{sessionId:d??void 0,project:wn,view:bi,toggled:zs,onViewChange:Ii,onToggledChange:Sr,canRenameFile:Y=>{var _e;return!((_e=mn.current.get(ei(wn.id,d,{path:Y,source:"repo",sessionId:d??void 0})))!=null&&_e.needsProtection)},onOpenFile:(Y,_e,we,Te)=>pa(Y,_e,we,void 0,void 0,void 0,Te)},`files:${d??`project:${wn.id}`}`):_.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:_.jsx(dh,{children:_.jsxs("div",{className:"wt-empty flex flex-col items-center gap-2.5 py-12 px-6 text-center text-muted [&_>_svg]:text-subtext [&_p]:m-0 [&_p]:max-w-80 [&_p]:text-sm",children:[_.jsx(A6n,{size:22}),_.jsx("p",{children:efe()})]})})})}):Xn?_.jsx(Ca,{children:n&&_.jsx(pqn,{remote:e.kind==="ssh",restored:z.current.has(ei(n,d,Xn)),onRestoreActivated:()=>{const Y=ei(n,d,Xn);z.current.delete(Y),A.current.add(Y)},showSource:j.current[ei(n,d,Xn)]??!1,onShowSourceChange:Y=>{j.current[ei(n,d,Xn)]=Y,D(_e=>_e+1)},projectId:n,path:Xn.path,source:Xn.source,sessionId:Xn.source==="artifacts"?d??void 0:Xn.sessionId,gitRef:Xn.ref,line:Xn.line,branchLabel:nYn(Xn,wn==null?void 0:wn.baselineBranch),artifactVersion:yp,artifactEntries:Xn.source==="artifacts"?Ce==null?void 0:Ce.entries:void 0,bufferSession:xn(ei(n,d,Xn)),onOpenFile:(Y,_e,we,Te)=>hs(Xn,()=>pa(Y,_e,we,void 0,void 0,void 0,Te)),scrollPosition:mt.current.get(ei(n,d,Xn)),onScrollPositionChange:Y=>{mt.current.set(ei(n,d,Xn),Y),Jo()},lineScrollRequest:Xn.lineScrollRequest,onLineScrollRequestHandled:()=>Si(Xn),onEdit:()=>_s(Xn)},ei(n,d,Xn))}):or?_.jsx(Ca,{children:_.jsx("div",{className:"pane-content flex-1 min-h-0 relative plan-tab-content overflow-y-auto bg-background py-4.5 px-6 [&_.md]:max-w-readable",children:_.jsx($c,{text:(sl==null?void 0:sl.key)===`${or.sessionId}:${or.promptId}`?sl.text??ho():((j_=Rn.find(Y=>Y.promptId===or.promptId))==null?void 0:j_.plan)||sL(),onOpenFile:(Y,_e,we,Te,De)=>hs(or,()=>pa(Y,or.sessionId,Te,_e,we,void 0,De))})})}):Ms&&n?_.jsx(Ca,{children:oc?_.jsx("div",{className:"flex min-h-0 flex-1",children:_.jsx(cM,{embedded:!0,projectId:n,projectName:(wn==null?void 0:wn.name)??"",railOpen:!1,onShowRail:()=>wi(!0),mainView:"chat",onSelectMainView:_a,onOpenFile:(Y,_e,we,Te,De,it)=>hs(Ms,()=>ar(Y,_e,we,Te,De,it)),onOpenRun:(Y,_e)=>hs(Ms,()=>dr(Y,_e)),runExperimentName:nu,onOpenExperiment:(Y,_e)=>hs(Ms,()=>nc(Y,_e)),experimentName:w_,onOpenPlan:(Y,_e,we,Te)=>hs(Ms,()=>Fi(Y,_e,we,Te)),onOpenSubagent:(Y,_e,we,Te)=>hs(Ms,()=>S_(Y,_e,we,Te)),runtime:e,activeSessionId:Ms.sessionId,onOpenSideChat:(Y,_e)=>void ru(Y,_e),onActiveSessionChange:(Y,_e)=>{var Te;const we=!((Te=Ze.getQueryData(pi(n).queryKey))!=null&&Te.some(De=>De.id===Ms.sessionId));Y===null&&we?zo(Ms):Ka(Y,_e)},preferredAgent:ce.preferredAgent,onPreferredAgentChange:ad,preferredAutonomy:ce.preferredAutonomy??Z3,onPreferredAutonomyChange:x_},Ms.sessionId)}):_.jsx("div",{className:"p-6 text-sm text-muted",children:gI()})}):Rs?_.jsx(tHn,{projectId:n,sessionId:Rs.sessionId,spawnPartId:Rs.spawnPartId,onOpenFile:(Y,_e,we,Te,De)=>hs(Rs,()=>ar(Y,Rs.sessionId,_e,we,Te,De)),onOpenRun:(Y,_e)=>hs(Rs,()=>dr(Y,_e)),runExperimentName:nu,onOpenExperiment:(Y,_e)=>hs(Rs,()=>nc(Y,_e)),experimentName:w_,onOpenSubagent:(Y,_e,we)=>hs(Rs,()=>S_(Rs.sessionId,Y,_e,we))},Rs.spawnPartId):is?_.jsx(Ca,{children:n&&wn&&is&&Hi&&_.jsx(pHn,{projectId:n,project:wn,experiment:Hi,view:is.view,toggled:is.toggled,onViewChange:Y=>jo(is,{view:Y}),onToggledChange:Y=>jo(is,{toggled:Y}),onOpenFile:(Y,_e,we,Te)=>hs(is,()=>pa(Y,_e,we,void 0,void 0,Hi.branchName,Te))},`code:${is.branch}`)}):_.jsx(Ca,{children:Ts&&Ja&&wn&&_.jsx(UHn,{experiment:Ja,project:wn,view:Ts.view,runs:ht,selectedRunId:p,onSelectRun:Q,parentExperiment:Ee.find(Y=>Y.id===Ja.parentExperimentId)??null,onOpenView:(Y,_e,we)=>{hs(Ts,()=>Bi(Ja.id,Y,we,_e))},onOpenCode:(Y,_e)=>hs(Ts,()=>sc(Ja.id,Ja.branchName,Y,_e))},`${Ts.id}:${Ts.view}`)}),Wt&&Qn!==null&&Qn===Co&&wn&&_.jsx(Ca,{className:b==="terminal"?void 0:"hidden",children:_.jsx($zn,{projectId:wn.id,sessionId:d,active:b==="terminal"},Co)})]})]}),oa&&_.jsx(xqn,{remote:e.kind==="ssh",onClose:()=>qa(!1),onCreated:(Y,_e)=>{qa(!1),iu(Y,_e)}}),ai&&wn&&Do(wn.id)&&_.jsx(Sqn,{onClose:$i,onCreateProject:sd})]})}const Jk=Fc()({validateSearch:e=>({pane:e6(e.pane)}),beforeLoad:({location:e})=>{if(!Mf(e.pathname))throw MW()},component:oYn});function oYn(){const{projectId:e}=Jk.useParams(),{pane:n}=Jk.useSearch(),t=Oi(),r=UD({select:s=>s.location});return T.useEffect(()=>{const s=cYn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(X0,{}),_.jsx(aYn,{projectId:e,pane:n,runtime:Q$()})]})}function cYn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&e6(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const QG=Fc()({component:lYn});function lYn(){const{projectId:e}=QG.useParams();return _.jsx(U8n,{projectId:e})}const uYn=Fc()({}),_Yn=Fc()({}),fYn=Fc()({}),dYn=Fc()({}),hYn=V8n.update({id:"/",path:"/",getParentRoute:()=>vy}),h7=K8n.update({id:"/projects",path:"/projects",getParentRoute:()=>vy}),pYn=W8n.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>vy}),mYn=Q8n.update({id:"/",path:"/",getParentRoute:()=>h7}),pp=Jk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>h7}),gYn=QG.update({id:"/",path:"/",getParentRoute:()=>pp}),vYn=uYn.update({id:"/skills",path:"/skills",getParentRoute:()=>pp}),bYn=_Yn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>pp}),yYn=fYn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>pp}),xYn=dYn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>pp}),wYn={ProjectsProjectIdSkillsRoute:vYn,ProjectsProjectIdIndexRoute:gYn,ProjectsProjectIdSettingsTabRoute:bYn,ProjectsProjectIdTasksSessionIdRoute:yYn,ProjectsProjectIdTasksNewRoute:xYn},kYn=pp._addFileChildren(wYn),SYn={ProjectsProjectIdRoute:kYn,ProjectsIndexRoute:mYn},CYn=h7._addFileChildren(SYn),EYn={IndexRoute:hYn,ProjectsRoute:CYn,RemoteLaunchRoute:pYn},NYn=vy._addFileChildren(EYn)._addFileTypes(),zYn=tX({routeTree:NYn,context:{queryClient:Ze},trailingSlash:"never",defaultPendingComponent:B6,defaultErrorComponent:P6,defaultNotFoundComponent:q8n}),hv={minimize:"",maximize:"",restore:"",close:""};function jYn(e){const n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-maximized"]}),()=>n.disconnect()}function XG(e){var n;(n=window.ipc)==null||n.postMessage(`titlebar:${e}`)}function r3(e){return n=>{n.button===0&&(n.preventDefault(),XG(`resize:${e}`))}}function s3({label:e,glyph:n,message:t,className:r}){return _.jsx("button",{className:`inline-flex h-8 w-11.5 items-center justify-center text-xs text-text font-['Segoe_Fluent_Icons','Segoe_MDL2_Assets'] ${r}`,tabIndex:-1,title:e,"aria-label":e,onClick:()=>XG(t),children:n})}function AYn(){const e=T.useSyncExternalStore(jYn,()=>document.documentElement.hasAttribute("data-maximized"));return _.jsxs(_.Fragment,{children:[!e&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"fixed inset-x-0 top-0 z-300 h-1 cursor-ns-resize",onMouseDown:r3("n")}),_.jsx("div",{className:"fixed start-0 top-0 z-300 size-2 cursor-nwse-resize",onMouseDown:r3("nw")}),_.jsx("div",{className:"fixed end-0 top-0 z-300 size-2 cursor-nesw-resize",onMouseDown:r3("ne")})]}),_.jsxs("div",{className:"fixed end-0 top-0 z-300 flex",children:[_.jsx(s3,{label:sxn(),glyph:hv.minimize,message:"minimize",className:"hover:bg-panel"}),_.jsx(s3,{label:e?_xn():Yyn(),glyph:e?hv.restore:hv.maximize,message:"zoom",className:"hover:bg-panel"}),_.jsx(s3,{label:Uyn(),glyph:hv.close,message:"close",className:"hover:bg-accent-red hover:text-white"})]})]})}const YG=E();document.documentElement.lang=YG;document.documentElement.dir="ltr";BI(YG);lW.createRoot(document.getElementById("root")).render(_.jsxs(T.StrictMode,{children:[_.jsxs(bK,{client:Ze,children:[_.jsx(sX,{router:zYn}),!1]}),_.jsx(RSn,{}),e$&&_.jsx(AYn,{})]}));export{qc as C,Rt as I,Bb as M,Qf as P,D$ as S,_Cn as a,vz as b,at as c,qr as d,gHn as e,_n as f,E as g,ni as h,bz as i,_ as j,T as r}; diff --git a/ui/dist/index.html b/ui/dist/index.html index cbdff566d..a222784bb 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,7 +49,7 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - + diff --git a/ui/messages/ar.json b/ui/messages/ar.json index 9198bc981..cb8b75d2c 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -897,7 +897,7 @@ "onboarding_install_git_to_continue": "ثبّت Git للمتابعة", "onboarding_install_git": "ثبّت Git", "onboarding_installing_git": "جارٍ تثبيت Git…", - "onboarding_install_git_for_windows": "Git مطلوب للتجارب المحلية. يمكن لـ OpenResearch تثبيت Git for Windows لحسابك دون طلب صلاحيات المسؤول.", + "onboarding_install_git_for_windows": "‏Git مطلوب للتجارب المحلية. يمكن لـ OpenResearch تثبيت Git for Windows لحسابك دون طلب صلاحيات المسؤول.", "onboarding_choose_area_to_continue": "اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.", "onboarding_describe_area_to_continue": "صِف مجالك البحثي للمتابعة.", "onboarding_api_key": "مفتاح API", diff --git a/ui/src/components/Onboarding.tsx b/ui/src/components/Onboarding.tsx index e3e4e645c..edf444f64 100644 --- a/ui/src/components/Onboarding.tsx +++ b/ui/src/components/Onboarding.tsx @@ -621,10 +621,14 @@ export function Onboarding({ {automaticSetup && !gitReady && (
- {gitInstallable && !gitError ? gitInstallPrompt : ( -

{gitError ? m.onboarding_retry_connection() : m.onboarding_git_is_required_for_local_experiments_install_git()}

+ {gitError ? ( +

{m.onboarding_retry_connection()}

+ ) : gitInstallable ? ( + gitInstallPrompt + ) : ( +

{m.onboarding_git_is_required_for_local_experiments_install_git()}

)} - +
)}
@@ -833,7 +837,7 @@ function GitInstallPrompt({ {pending && } {pending ? m.onboarding_installing_git() : m.onboarding_install_git()} - {error &&

{error.message}

} + {error &&

{error.message}

}
); } From 16d5ce79ca7623b0bb5a865ac00bce5a4b32e34c Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Mon, 5 Oct 2026 18:40:12 -0700 Subject: [PATCH 4/8] Address review round three: full install error chain, tidy portable Git Co-Authored-By: Claude Opus 5.5 --- src/commands/up.rs | 4 +++- src/local/portable_git.rs | 10 +++++----- src/local/shell_env.rs | 4 ++-- src/telemetry/harness.rs | 1 + 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/commands/up.rs b/src/commands/up.rs index c4a2ce9a4..59f27e920 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -1363,7 +1363,9 @@ async fn install_git() -> ApiResult { // Spawned, so a page reload mid-install cannot orphan the extractor. tokio::spawn(local::portable_git::install()) .await - .map_err(|error| ApiError::from(anyhow!("Git install task failed: {error}")))??; + .map_err(|error| ApiError::from(anyhow!("Git install task failed: {error}")))? + // `:#` keeps the cause (DNS, TLS, proxy) behind the outer context. + .map_err(|error| ApiError(StatusCode::INTERNAL_SERVER_ERROR, format!("{error:#}")))?; Ok(Json(json!({}))) } diff --git a/src/local/portable_git.rs b/src/local/portable_git.rs index cc4bb1270..b6f348f23 100644 --- a/src/local/portable_git.rs +++ b/src/local/portable_git.rs @@ -3,9 +3,9 @@ //! no PATH change. [`super::shell_env::search_path`] appends its `cmd` directory, //! which is also how [`super::bash`] finds the bash it ships. -use crate::error::Result; #[cfg(windows)] -use crate::error::{anyhow, bail, Context}; +use crate::error::{anyhow, Context}; +use crate::error::{bail, Result}; #[cfg(windows)] use std::path::{Path, PathBuf}; @@ -23,7 +23,7 @@ pub fn cmd_dir() -> Option { #[cfg(not(windows))] pub async fn install() -> Result<()> { - crate::error::bail!("orx installs Git only on Windows.") + bail!("orx installs Git only on Windows.") } /// Download the latest PortableGit, check it against GitHub's digest, and unpack it. @@ -220,8 +220,8 @@ async fn unpack(archive: &Path, staging: &Path) -> Result<()> { bail!("Git for Windows' post-install step failed ({status})."); } } - if !staging.join(r"cmd\git.exe").is_file() || !staging.join(r"bin\bash.exe").is_file() { - bail!("The Git for Windows download is missing git.exe or bash.exe."); + if !staging.join(r"bin\bash.exe").is_file() { + bail!("The Git for Windows download is missing bash.exe."); } Ok(()) } diff --git a/src/local/shell_env.rs b/src/local/shell_env.rs index 0c06ff4ca..2a7d55287 100644 --- a/src/local/shell_env.rs +++ b/src/local/shell_env.rs @@ -56,8 +56,8 @@ pub fn search_path() -> Option { var("PATH") } -/// Extended by the registry's current PATH, so a tool installed while orx runs -/// is found without a restart, then by the Git orx installs, so the user's own wins. +/// The PATH to search, extended by the registry's current PATH so a tool installed +/// while orx runs is found without a restart, then by the Git orx installs. #[cfg(windows)] pub fn search_path() -> Option { let base = var("PATH"); diff --git a/src/telemetry/harness.rs b/src/telemetry/harness.rs index 02dd42234..504cd2712 100644 --- a/src/telemetry/harness.rs +++ b/src/telemetry/harness.rs @@ -336,6 +336,7 @@ const PHRASES: &[&str] = &[ "running scripts is disabled on this system", "Unsupported platform", "Unsupported architecture", + "OpenCode has no Windows build", // The OpenCode Windows installer's sources, then .NET's network faults. "GitHub download failed", "npm download failed", From 2c007b6e87ee65028225aa16ae36e27e7752073a Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Mon, 5 Oct 2026 21:47:40 -0700 Subject: [PATCH 5/8] Fix the Windows install script borrow Co-Authored-By: Claude Opus 5.5 --- src/commands/up/harness_setup.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/up/harness_setup.rs b/src/commands/up/harness_setup.rs index 510c522d8..9b16bcfeb 100644 --- a/src/commands/up/harness_setup.rs +++ b/src/commands/up/harness_setup.rs @@ -298,7 +298,7 @@ async fn run( // Encoded: the console title echoes the command line into // the output, where the script's own phrases would be excerpted. "-EncodedCommand".into(), - encoded_command(&windows_install_script(install)), + encoded_command(&windows_install_script(&install)), ], ) } From edc0c4b38dec8e8a909d05df6bc6ec88d5c3ef9e Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Mon, 5 Oct 2026 21:52:13 -0700 Subject: [PATCH 6/8] Keep concurrent PortableGit installs from undoing each other Co-Authored-By: Claude Opus 5.5 --- src/local/portable_git.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/local/portable_git.rs b/src/local/portable_git.rs index b6f348f23..c7d5b4d7b 100644 --- a/src/local/portable_git.rs +++ b/src/local/portable_git.rs @@ -89,6 +89,8 @@ async fn rename_into_place(staging: &Path, root: &Path) -> Result<()> { attempt += 1; tokio::time::sleep(std::time::Duration::from_millis(500 * attempt)).await; } + // Another orx process finished first. + Err(_) if cmd_dir().is_some() => return Ok(()), Err(error) => { return Err(error) .with_context(|| format!("Could not move Git into {}", root.display())) @@ -98,6 +100,7 @@ async fn rename_into_place(staging: &Path, root: &Path) -> Result<()> { } /// Downloads and staging folders an interrupted install left beside `PortableGit`. +/// Recent ones are left alone: they may be another orx process's install in progress. #[cfg(windows)] async fn sweep_stale(parent: &Path) { let Ok(mut entries) = tokio::fs::read_dir(parent).await else { @@ -111,6 +114,16 @@ async fn sweep_stale(parent: &Path) { { continue; } + let recent = entry + .metadata() + .await + .and_then(|meta| meta.modified()) + .ok() + .and_then(|modified| modified.elapsed().ok()) + .is_none_or(|age| age < std::time::Duration::from_secs(60 * 60)); + if recent { + continue; + } let path = entry.path(); let _ = if path.is_dir() { tokio::fs::remove_dir_all(&path).await From 9e1a04c356c078d527f35c379ee61fa02e29ed54 Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Tue, 6 Oct 2026 11:39:08 -0700 Subject: [PATCH 7/8] Cut registry PATH values at their first NUL RegGetValueW can report an expanded value's size past its terminator, which left a NUL in the PATH orx hands every child, so every spawn failed with "nul byte found in provided data". Also log Git install failures. Co-Authored-By: Claude Opus 5.5 --- src/commands/up.rs | 5 ++++- src/local/shell_env.rs | 25 +++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/commands/up.rs b/src/commands/up.rs index 59f27e920..63eacdfc2 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -1365,7 +1365,10 @@ async fn install_git() -> ApiResult { .await .map_err(|error| ApiError::from(anyhow!("Git install task failed: {error}")))? // `:#` keeps the cause (DNS, TLS, proxy) behind the outer context. - .map_err(|error| ApiError(StatusCode::INTERNAL_SERVER_ERROR, format!("{error:#}")))?; + .map_err(|error| { + eprintln!("orx up: Git install failed: {error:#}"); + ApiError(StatusCode::INTERNAL_SERVER_ERROR, format!("{error:#}")) + })?; Ok(Json(json!({}))) } diff --git a/src/local/shell_env.rs b/src/local/shell_env.rs index 2a7d55287..5871c9833 100644 --- a/src/local/shell_env.rs +++ b/src/local/shell_env.rs @@ -126,10 +126,7 @@ fn registry_path() -> Vec { match status { ERROR_SUCCESS => { buffer.truncate(bytes as usize / 2); - while buffer.last() == Some(&0) { - buffer.pop(); - } - return Some(OsString::from_wide(&buffer)); + return Some(OsString::from_wide(until_nul(&buffer))); } ERROR_MORE_DATA => buffer.resize((bytes as usize).div_ceil(2) + 1, 0), _ => return None, @@ -151,6 +148,15 @@ fn registry_path() -> Vec { .collect() } +/// The string before its terminator. An expanded value's reported size can run +/// past it, and a NUL left in PATH makes every spawn fail ("nul byte found"). +#[cfg(any(windows, test))] +fn until_nul(wide: &[u16]) -> &[u16] { + wide.iter() + .position(|&unit| unit == 0) + .map_or(wide, |end| &wide[..end]) +} + /// What separates PATH entries when composing one for a child. #[cfg(not(windows))] pub const PATH_LIST_SEPARATOR: &str = ":"; @@ -328,6 +334,17 @@ pub fn parse_probe(stdout: &str, marker: &str) -> Option = "C:\\bin\0stale\0\0".encode_utf16().collect(); + assert_eq!( + until_nul(&wide), + "C:\\bin".encode_utf16().collect::>() + ); + let bare: Vec = "C:\\bin".encode_utf16().collect(); + assert_eq!(until_nul(&bare), bare.as_slice()); + } + const M: &str = "__ORX_ENV_abc123__"; /// `parse_probe` insists on one absolute PATH entry, and what counts as From 8ff87d27a38c6a4b22e64d41ae5585e023d90e48 Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Tue, 6 Oct 2026 12:01:56 -0700 Subject: [PATCH 8/8] Space the onboarding Git card from the agent cards Co-Authored-By: Claude Opus 5.5 --- .../{PdfPreview-C-Z2HtQB.js => PdfPreview-D-eaX8vY.js} | 2 +- ui/dist/assets/{index-6TMpN705.js => index-BjLXE6D9.js} | 6 +++--- ui/dist/index.html | 2 +- ui/src/components/Onboarding.tsx | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename ui/dist/assets/{PdfPreview-C-Z2HtQB.js => PdfPreview-D-eaX8vY.js} (99%) rename ui/dist/assets/{index-6TMpN705.js => index-BjLXE6D9.js} (97%) diff --git a/ui/dist/assets/PdfPreview-C-Z2HtQB.js b/ui/dist/assets/PdfPreview-D-eaX8vY.js similarity index 99% rename from ui/dist/assets/PdfPreview-C-Z2HtQB.js rename to ui/dist/assets/PdfPreview-D-eaX8vY.js index b2e0ea459..3496cdd7d 100644 --- a/ui/dist/assets/PdfPreview-C-Z2HtQB.js +++ b/ui/dist/assets/PdfPreview-D-eaX8vY.js @@ -1,4 +1,4 @@ -var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-6TMpN705.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():m1()}),S1=()=>"Fit to width",T1=()=>"适应宽度",C1=()=>"متناسب با عرض",P1=()=>"ملاءمة العرض",I1=()=>"Ajustar al ancho",R1=()=>"चौड़ाई में फ़िट करें",O1=()=>"너비에 맞추기",M1=()=>"幅に合わせる",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?T1():t==="fa"?C1():t==="ar"?P1():t==="es"?I1():t==="hi"?R1():t==="ko"?O1():t==="ja"?M1():S1()}),D1=()=>"Next match",L1=()=>"下一个匹配项",N1=()=>"مورد بعدی",F1=()=>"التطابق التالي",k1=()=>"Coincidencia siguiente",B1=()=>"अगला मिलान",j1=()=>"다음 일치 항목",U1=()=>"次の一致",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?L1():t==="fa"?N1():t==="ar"?F1():t==="es"?k1():t==="hi"?B1():t==="ko"?j1():t==="ja"?U1():D1()}),$1=()=>"Previous match",H1=()=>"上一个匹配项",V1=()=>"مورد قبلی",z1=()=>"التطابق السابق",W1=()=>"Coincidencia anterior",G1=()=>"पिछला मिलान",_1=()=>"이전 일치 항목",X1=()=>"前の一致",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?H1():t==="fa"?V1():t==="ar"?z1():t==="es"?W1():t==="hi"?G1():t==="ko"?_1():t==="ja"?X1():$1()});/** +var a1=Object.defineProperty;var cw=h=>{throw TypeError(h)};var o1=(h,e,t)=>e in h?a1(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t;var L=(h,e,t)=>o1(h,typeof e!="symbol"?e+"":e,t),By=(h,e,t)=>e.has(h)||cw("Cannot "+t);var a=(h,e,t)=>(By(h,e,"read from private field"),t?t.call(h):e.get(h)),b=(h,e,t)=>e.has(h)?cw("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(h):e.set(h,t),g=(h,e,t,n)=>(By(h,e,"write to private field"),n?n.call(h,t):e.set(h,t),t),y=(h,e,t)=>(By(h,e,"access private method"),t);var Zt=(h,e,t,n)=>({set _(i){g(h,e,i,t)},get _(){return a(h,e,n)}});import{g as vy,c as LA,r as gi,M as l1,j as fe,f as ku,I as Bu,a as c1,i as hw,P as h1,b as dw,S as d1,d as u1,C as f1,e as p1,h as g1}from"./index-BjLXE6D9.js";const m1=()=>"Find in document",v1=()=>"在文档中查找",y1=()=>"جست‌وجو در سند",b1=()=>"البحث في المستند",E1=()=>"Buscar en el documento",w1=()=>"दस्तावेज़ में खोजें",A1=()=>"문서에서 찾기",x1=()=>"文書内を検索",uw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?v1():t==="fa"?y1():t==="ar"?b1():t==="es"?E1():t==="hi"?w1():t==="ko"?A1():t==="ja"?x1():m1()}),S1=()=>"Fit to width",T1=()=>"适应宽度",C1=()=>"متناسب با عرض",P1=()=>"ملاءمة العرض",I1=()=>"Ajustar al ancho",R1=()=>"चौड़ाई में फ़िट करें",O1=()=>"너비에 맞추기",M1=()=>"幅に合わせる",fw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?T1():t==="fa"?C1():t==="ar"?P1():t==="es"?I1():t==="hi"?R1():t==="ko"?O1():t==="ja"?M1():S1()}),D1=()=>"Next match",L1=()=>"下一个匹配项",N1=()=>"مورد بعدی",F1=()=>"التطابق التالي",k1=()=>"Coincidencia siguiente",B1=()=>"अगला मिलान",j1=()=>"다음 일치 항목",U1=()=>"次の一致",pw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?L1():t==="fa"?N1():t==="ar"?F1():t==="es"?k1():t==="hi"?B1():t==="ko"?j1():t==="ja"?U1():D1()}),$1=()=>"Previous match",H1=()=>"上一个匹配项",V1=()=>"مورد قبلی",z1=()=>"التطابق السابق",W1=()=>"Coincidencia anterior",G1=()=>"पिछला मिलान",_1=()=>"이전 일치 항목",X1=()=>"前の一致",gw=((h={},e={})=>{const t=e.locale??vy();return t==="zh-CN"?H1():t==="fa"?V1():t==="ar"?z1():t==="es"?W1():t==="hi"?G1():t==="ko"?_1():t==="ja"?X1():$1()});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. diff --git a/ui/dist/assets/index-6TMpN705.js b/ui/dist/assets/index-BjLXE6D9.js similarity index 97% rename from ui/dist/assets/index-6TMpN705.js rename to ui/dist/assets/index-BjLXE6D9.js index 1f67be983..798d39f78 100644 --- a/ui/dist/assets/index-6TMpN705.js +++ b/ui/dist/assets/index-BjLXE6D9.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-C-Z2HtQB.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-D-eaX8vY.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); var hV=Object.defineProperty;var l9=e=>{throw TypeError(e)};var pV=(e,n,t)=>n in e?hV(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var lo=(e,n,t)=>pV(e,typeof n!="symbol"?n+"":n,t),tw=(e,n,t)=>n.has(e)||l9("Cannot "+t);var ue=(e,n,t)=>(tw(e,n,"read from private field"),t?t.call(e):n.get(e)),ut=(e,n,t)=>n.has(e)?l9("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(tw(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Kt=(e,n,t)=>(tw(e,n,"access private method"),t);var nm=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return ue(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();function U0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nw={exports:{}},rm={};/** * @license React * react-jsx-runtime.production.js @@ -574,7 +574,7 @@ WARNING: This link could potentially be dangerous`)){const y=window.open();if(y) `,x)}paste(y){this._core.paste(y)}refresh(y,x){this._verifyIntegers(y,x),this._core.refresh(y,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(y){this._addonManager.loadAddon(this,y)}static get strings(){return i}_verifyIntegers(...y){for(const x of y)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...y){for(const x of y)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),o})()))})(Ow)),Ow.exports}var BI=xpr();const wpr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function Vz(e,n){const t=document.documentElement,r=getComputedStyle(t),s=a=>r.getPropertyValue(n==="app"?`--term-app-${a}`:`--term-${a}`).trim(),o={};if(n==="app"&&t.dataset.theme!=="dark")for(const a of wpr){const i=r.getPropertyValue(`--term-app-ansi-${a.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}`).trim();i&&(o[a]=i)}return{...o,background:s("bg"),foreground:s("foreground"),cursor:s(e?"bg":"foreground"),cursorAccent:s("bg"),selectionBackground:s("selection")}}function my(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),o=new BI.Terminal({convertEol:!0,disableStdin:n,cursorBlink:!n,cursorStyle:"bar",cursorWidth:2,fontSize:12,fontFamily:s.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:Vz(n,r)}),a=r==="app"?new MutationObserver(()=>{o.options.theme=Vz(o.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const i=new vpr.FitAddon;o.loadAddon(i),t&&o.loadAddon(new ypr.WebLinksAddon((x,b)=>{let j;try{j=new URL(b)}catch{return}(j.protocol==="http:"||j.protocol==="https:")&&window.open(j,"_blank","noopener,noreferrer")}));const c=e.style.overflowY;e.style.overflowY="auto",o.open(e);let u=!0,d=null;const f=()=>{if(d===e.scrollTop){d=null;return}d=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",f);const p=()=>{var z;const x=o.element,b=x==null?void 0:x.querySelector(".xterm-screen"),j=x==null?void 0:x.querySelector(".xterm-viewport");if(!x||!(b instanceof HTMLElement)||!(j instanceof HTMLElement))return;const E=o.buffer.active;let N=Math.max(0,E.baseY+E.cursorY-E.viewportY+1);for(let M=o.rows-1;M>=N;M--)if((z=E.getLine(E.viewportY+M))!=null&&z.translateToString(!0).trim()){N=M+1;break}const A=b.getBoundingClientRect().height;x.style.height=`${Math.max(e.clientHeight,Math.min(N,o.rows)*A/o.rows)}px`,x.style.overflow="hidden",j.style.height=`${A}px`},m=()=>{try{const x=i.proposeDimensions();x&&(o.resize(x.cols,Math.max(x.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=o.onWriteParsed(()=>{var b;const x=u&&o.buffer.active.viewportY===o.buffer.active.baseY;if(p(),x){const j=(b=o.element)==null?void 0:b.querySelector(".xterm-screen");if(j instanceof HTMLElement){const E=(o.buffer.active.cursorY+1)*j.getBoundingClientRect().height/o.rows;e.scrollTop=Math.max(0,E-e.clientHeight),d=e.scrollTop}}}),v=o.onScroll(p),y=x=>{(x.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function kpr(e){return Zf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||FI(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function Spr(e){return Zf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&FI(e.partitions)&&(e.error===null||typeof e.error=="string")}function jpr(e){return!Zf(e)||e.type!=="complete"?null:e.backend==="ssh"&&kpr(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&Spr(e.result)?{backend:"slurm",result:e.result}:null}function HI(e){return Zf(e)&&e.type==="complete"}function Cpr(e){return Zf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function t6({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:o}){const a=new URLSearchParams({host:e,backend:n});return _.jsx(gy,{path:`${t}?${a}`,label:f$({host:Ae(e)}),active:r,onError:o,onComplete:i=>{const c=jpr(i);return c?(s(c),!0):!1}})}function Epr({login:e,onComplete:n,onError:t}){return _.jsx(gy,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-96",onError:t,onComplete:r=>HI(r)?(n(),!0):!1})}function Npr({path:e,label:n,onComplete:t,onError:r,onClose:s}){const[o,a]=T.useState("running");return _.jsxs("div",{className:"mt-4 overflow-hidden rounded-lg border border-border",children:[_.jsxs("div",{className:"flex h-9 items-center gap-3 border-b border-b-border-variant bg-surface ps-3 pe-1.5",children:[_.jsx("code",{dir:"ltr",className:"min-w-0 flex-1 truncate font-mono text-xs text-subtext",children:n}),_.jsx("span",{role:"status",className:"flex shrink-0 items-center gap-1.5 text-xs text-subtext",children:o==="running"?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{className:"border-t-accent-amber"})," ",xan()]}):o==="done"?_.jsxs(_.Fragment,{children:[_.jsx(to,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",ran()]}):o==="failed"?_.jsxs(_.Fragment,{children:[_.jsx(_r,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",fan()]}):Won()}),_.jsx("button",{type:"button",onClick:s,"aria-label":WN(),title:WN(),className:"ms-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted [&:hover]:bg-highlight [&:hover]:text-text",children:_.jsx(_r,{size:14})})]}),_.jsx(gy,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(i,c)=>{a("failed"),c&&r(i)},onComplete:i=>HI(i)?(a("done"),t(),!0):!1,onClosed:()=>a(i=>i==="running"?"closed":i)})]})}function gy({path:e,label:n,command:t,heightClass:r="h-40",frame:s="card",palette:o="dark",shellAfter:a=!1,active:i=!0,awaitingApproval:c=!1,onComplete:u,onError:d,onClosed:f}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(d),v=T.useRef(f),[y,x]=T.useState(null);return w.current=u,k.current=d,v.current=f,T.useEffect(()=>{const b=p.current;if(!b)return;const{terminal:j,dispose:E}=my(b,c,!0,o);if(m.current=j,c)return t&&j.writeln(`$ ${t}`),()=>{m.current=null,E()};j.focus();const N=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${N}//${location.host}`),z=new WebSocket(A);z.binaryType="arraybuffer";let M=!1,D=!1,L=!1;const B=(Q,V)=>{var Z;if(D){V||j.writeln(Q);return}D=!0,(!L||a)&&j.writeln(Q),(Z=k.current)==null||Z.call(k,Q,V),!(a&&!V)&&(j.options.disableStdin=!0,j.blur(),x(Q))},U=j.onData(Q=>{z.readyState===WebSocket.OPEN&&z.send(new TextEncoder().encode(Q))}),H=j.onResize(({cols:Q,rows:V})=>{z.readyState===WebSocket.OPEN&&z.send(JSON.stringify({type:"resize",cols:Q,rows:V}))});return z.onopen=()=>{t&&j.writeln(`$ ${t}`),z.send(JSON.stringify({type:"resize",cols:j.cols,rows:j.rows}))},z.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){L=!0,j.write(new Uint8Array(Q.data));return}if(typeof Q.data!="string")return;let V;try{V=JSON.parse(Q.data)}catch{return}if(w.current(V)){M=!0,a||z.close();return}const Z=Cpr(V);Z&&(M?j.writeln(Z):B(Z,!a))},z.onerror=()=>B(sb(),!0),z.onclose=()=>{var Q;if(!M&&!D){B(sb(),!0);return}a&&(j.options.disableStdin=!0,j.blur(),(Q=v.current)==null||Q.call(v))},()=>{z.onopen=null,z.onmessage=null,z.onerror=null,z.onclose=null,U.dispose(),H.dispose(),z.close(),m.current=null,E()}},[e,t,c,o,a]),T.useEffect(()=>{const b=m.current;b&&(b.options.disableStdin=c||!i||y!==null,!c&&i&&y===null?b.focus():b.blur())},[i,y,c]),_.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[_.jsx("div",{className:`${r} ${s==="card"?PI:`overflow-hidden p-3 ${o==="app"?"bg-terminal-app":"bg-terminal"}`}`,role:"group","aria-label":n,children:_.jsx("div",{ref:p,className:"h-full overflow-hidden"})}),y?_.jsx("p",{role:"alert",className:"sr-only",children:y}):null]})}function zpr({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:o}=my(r,!0,!0);return s.write(n),o},[n]),_.jsx("div",{className:`mt-3 h-40 ${PI}`,role:"group","aria-label":f$({host:Ae(e)}),children:_.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let hb=null,jm=0;const qI=()=>hb;function UI(){const e=jm;return $I(async(n,t)=>{if(e!==jm)return;const r=await Fir(n,t);e===jm&&Ze.setQueryData(J0().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===jm&&sn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Vs(),onClick:()=>void n6.retry()}})})}let Cv=UI();function Apr(){jm++,hb=null,Cv=UI()}const n6={flush:(e=!1)=>Cv.flush(e),retry:()=>Cv.retry(),queue(e,n=0){const t=hb;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(hb=e,Cv.queue(e,n))}};window.addEventListener("pagehide",()=>void n6.flush(!0));function Ll(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:e.kind==="side"?{kind:"side",sessionId:e.sessionId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Bi(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};case"side":return{kind:"side",sessionId:e.sessionId}}}function GI(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.terminalTabOpen&&r.push("terminal"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs,...e.codeTabs],o=new Map(s.map(u=>[Lt(u),u])),a=e.contentTabOrder.flatMap(u=>{const d=o.get(u);return d?[d]:[]}),i=Lt(e.rightTab);return{tabs:[...r,...a].map(u=>Ll(u,Lt(u)===i?e.selectedRunId:void 0)),active:e.panelOpen?Ll(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Lt(e.previewTab):null,history:e.tabHistory.map(Lt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Lt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function Tpr(e,n){const t=s6();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax,t.treeViewport=e.treeViewport??null);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const o=r.findIndex(a=>Lt(Bi(a))===Lt(Bi(n)));o===-1?r.push(n):r[o]=n}for(const o of r){const a=Bi(o);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0),a==="terminal"&&(t.terminalTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[Lt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):a.kind==="side"?t.sideTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(Lt(a))}const s=new Map(r.map(o=>{const a=Bi(o);return[Lt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(o=>{const a=s.get(o);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?Bi(n):e!=null&&e.active?Bi(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,VI(t,n)}const Dw=(e,n)=>e.id===n.id&&e.view===n.view,H_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,r6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,eo=(e,n,t)=>`${e}:${n??""}:${r6(t)}`,KI=e=>({...e,lineScrollRequest:void 0});function D1(e){return typeof e=="object"&&"path"in e?KI(e):e}const Id=(e,n)=>e.branch===n.branch;function Lt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:e.kind==="side"?`side:${e.sessionId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${r6(e)}`:`experiment:${e.id}:${e.view}`}function um(e,n){const t=e.filter(r=>Lt(r)!==n);return t.length===e.length?e:t}function Rpr(e){return e!==void 0}function s6(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,terminalTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],sideTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1,treeViewport:null};if(e===ef&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===iy){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(Lt),panelOpen:!0}}if(e===cy){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Lt),panelOpen:!0}}return t}function o6(e,n){const t=s6(e,n);return t.panelOpen?GI(t,{},{}):void 0}function VI(e,n){if(!n)return e;const t=Bi(n),r=Lt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Lt(c)===r),o=(c,u)=>{const d=c.findIndex(f=>Lt(f)===r);return d<0?[...c,u]:JSON.stringify(Ll(c[d]))===JSON.stringify(Ll(u))?c:c.map((f,p)=>p===d?{...f,...u}:f)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:t==="terminal"?a.terminalTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=o(e.fileTabs,t):"id"in t?a.expTabs=o(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?a.codeTabs=o(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=o(e.planTabs,t):t.kind==="side"?a.sideTabs=o(e.sideTabs,t):a.subagentTabs=o(e.subagentTabs,t),e.contentTabOrder.includes(r)||(a.contentTabOrder=[...e.contentTabOrder,r]));const i=e.tabHistory.at(-1);return i&&Lt(i)===r&&JSON.stringify(Ll(i))===JSON.stringify(Ll(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Lt(c)!==r),t]),a}let Pi=0;const r0=new Map,pb=new Map,y3=new Set,x3=()=>{for(const e of y3)e()},Mpr=e=>(y3.add(e),()=>{y3.delete(e)}),s0=new Map,Fi=new Map,WI=e=>Fi.get(e);function Opr(){Pi++,Fi.clear(),s0.clear(),r0.clear(),pb.clear(),x3()}function Dpr(e,n){const t=Fi.get(e);if(!(t!=null&&t.tasks.new)||e_(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(i=>{if(i.kind!=="file")return[];const c=Bi(i);if(typeof c=="string"||!("path"in c))return[];const u=eo(e,null,c);return u in a?[[eo(e,n,c),a[u]]]:[]})),o={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete o.new,s0.set(e,n),Fi.set(e,{...t,tasks:o})}function Lpr(e){let n=r0.get(e);if(!n){const t=Pi;n=$I(async(r,s)=>{if(t!==Pi)return;const o=await Pir(e,r,s);t===Pi&&Ze.setQueryData(FS(e).queryKey,o),t===Pi&&pb.delete(e)&&x3()},r=>{t===Pi&&(pb.set(e,r instanceof Error?r.message:String(r)),x3())}),r0.set(e,n)}return n}function Lw(e,n,t,r){const s=Fi.get(e);if(!s||t==="new"&&s0.has(e))return;const o=py(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,i=t?e_(s,t):void 0;if(o===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(i)))return;const c={...s,lastLocation:o,lastTaskId:a,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=i&&r&&o===s.lastLocation&&JSON.stringify({...i,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});Fi.set(e,c),Lpr(e).queue(c,u?250:0)}function Wz(e,n,t,r){const s=new Set(e.state.fileTabs.map(d=>eo(t,r==="new"?null:r,d))),o=Object.fromEntries(Object.entries(e.getScroll()).filter(([d])=>s.has(d))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([d])=>s.has(d))),i=GI(e.state,o,a),c=e.pane??(n==null?void 0:n.active),u=c?Lt(Bi(c)):null;return i.active=i.tabs.find(d=>Lt(Bi(d))===u)??null,i}function $pr(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:o,firstDemoOpen:a,state:i,apply:c,getScroll:u,sourceModes:d,revision:f}=e,p=T.useRef(qz()),m=T.useSyncExternalStore(Mpr,()=>n?pb.get(n)??null:null),[w,k]=T.useState(null),[v,y]=T.useState(0),[x,b]=T.useState(null),[j,E]=T.useState(null),N=T.useRef(null),A=T.useRef(null),z=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,o]),L=JSON.stringify(s??null),B=T.useCallback(()=>{const H=z.current;if(!H)return;const Q=Wz({...M.current,state:H.state,pane:H.pane},e_(Fi.get(H.projectId),H.taskKey),H.projectId,H.taskKey);Lw(H.projectId,H.location,H.taskKey,Q)},[]);T.useEffect(()=>{let H=!0;const Q=Pi;if(k(null),b(null),!!n)return Fi.has(n)?b(n):Ze.fetchQuery(FS(n)).then(V=>{!H||Q!==Pi||(Fi.set(n,V??qz()),b(n))}).catch(V=>{H&&Q===Pi&&k(V instanceof Error?V.message:String(V))}),()=>{H=!1}},[n,v]),T.useLayoutEffect(()=>{if(z.current&&z.current.scope!==D){const V=z.current.projectId;B(),s0.get(V)===t&&s0.delete(V),z.current=null}if(!n||x!==n)return;const H=Fi.get(n);if(!H)return;if(p.current=H,N.current!==D){if(N.current=D,A.current=L,o){const V=e_(H,t)??(Di(n)?o6(t,a):void 0);c(Tpr(V,s),V,!0)}E(D);return}if(j!==D)return;let Q=i;A.current!==L&&(A.current=L,o&&s&&(Q=VI(i,s),c(Q,void 0,!1))),o?(Lw(n,r,t,Wz({state:Q,pane:s,getScroll:u,sourceModes:d},e_(H,t),n,t)),z.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):Lw(n,r),p.current=Fi.get(n)??H},[n,t,r,s,L,o,a,i,c,u,d,f,x,D,j,B]),T.useEffect(()=>{const H=Pi,Q=Z=>{if(H===Pi){B();for(const ee of r0.values())ee.flush(Z)}},V=()=>Q(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Q(!1)}},[B]);const U=T.useCallback(()=>{var H;n&&(w?y(Q=>Q+1):(H=r0.get(n))==null||H.retry())},[n,w]);return{ready:n===null||x===n&&j===D,loaded:n===null||x===n,error:w??m,retry:U,capture:B,workspace:p}}const Ipr="data:image/svg+xml,"+encodeURIComponent(''),w3=T.createContext(null);function Bpr(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function QI(){const e=T.useContext(w3);if(!e)throw new Error("Runtime is not connected");return e}function Ppr(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?Ipr:"/favicon.svg")}function Qz(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function Fpr(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!Qz("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&nI(n),!Qz("orx:locale")&&t&&QD(t)&&J$(t)}function Hpr(e){return e.includes("ssh ")&&e.includes("failed")}function Xz({host:e,overlay:n=!1}){return _.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:_.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[_.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:BL({host:Ae(e)})}),_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:H4()}),_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:XVt()})]})})}function Yz({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,L;const{session:s}=e,[o,a]=T.useState(s.installPaths),[i,c]=T.useState(!1),[u,d]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(L=s.installPaths)==null?void 0:L.cache]);async function f(){if(o){c(!0);try{await slr(o)}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function p(B=!1){r(B?s.error:null),c(!0);try{await olr()}catch(U){sn(U instanceof Error?U.message:String(U),"error")}finally{c(!1)}}async function m(){c(!0);try{await O$()}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{d(await D$())}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await L$(u),d(null)}catch(B){d(null),sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await alr()}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const y=s.status==="applying"||i,x=s.status==="needsInstall",b=s.status==="needsUpdate",j=o&&x,E=["connecting","applying","reconnecting"].includes(s.status),N=s.status==="disconnected"&&s.error!==null&&Hpr(s.error)&&t!==s.error&&!s.canStartNewHost,A=x?XWt():b?een():s.status==="applying"?GGt({host:Ae(s.host)}):s.status==="reconnecting"?TXt({host:Ae(s.host)}):s.status==="disconnected"?s.error?FVt({host:Ae(s.host)}):s.canStartNewHost?hWt({host:Ae(s.host)}):BL({host:Ae(s.host)}):DKt({host:Ae(s.host)}),z=s.error??(s.canStartNewHost?oWt():x?kQt({user:Ae(s.user??""),host:Ae(s.host)}):b?GJt({host:Ae(s.host)}):s.status==="applying"?LGt():s.status==="reconnecting"?wXt():s.status==="disconnected"?SVt():CKt());return _.jsxs(_.Fragment,{children:[_.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:_.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[_.jsxs("div",{className:"flex items-start gap-3",children:[E&&_.jsx(Ct,{className:"mt-2"}),_.jsxs("div",{className:"min-w-0 flex-1",children:[_.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:A}),!N&&_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),N&&_.jsx(t6,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),j&&_.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[_.jsx("p",{className:"m-0 text-sm text-subtext",children:FWt()}),[["binary",kWt()],["database",RWt()]].map(([B,U])=>_.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[U,_.jsx(qr,{value:o[B],onChange:H=>a({...o,[B]:H.target.value}),disabled:y,dir:"ltr"})]},B)),!s.error&&_.jsx("div",{className:"flex justify-end pt-1",children:_.jsx(Me,{variant:"primary",disabled:y,onClick:()=>void f(),children:y?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{})," ",oQt()]}):b?UN():ZL()})})]}),b&&o&&_.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&_.jsx(Me,{variant:"primary",disabled:y,onClick:()=>void f(),children:y?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{})," ",len()]}):UN()})}),s.status==="disconnected"&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?_.jsxs(Me,{variant:"primary",disabled:i,onClick:()=>void v(),children:[i?_.jsx(Ct,{}):null,s.error?HN():nYt()]}):_.jsxs(Me,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?_.jsx(Ct,{}):null,HN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:_.jsx(Me,{disabled:i,onClick:()=>void m(),children:V4()})}),b&&s.error&&_.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[_.jsx(Me,{disabled:i,onClick:()=>void m(),children:V4()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[i?_.jsx(Ct,{}):null,FN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[i?_.jsx(Ct,{}):null,PL()]})]}),x&&s.error&&_.jsx("div",{className:"mt-6 flex justify-end",children:_.jsxs(Me,{variant:"primary",disabled:i,onClick:()=>void p(),children:[i?_.jsx(Ct,{}):null,FN()]})})]})}),u&&_.jsx(xI,{host:s.host,preview:u,currentClientAttached:!1,stopping:i,onClose:()=>{i||d(null)},onConfirm:()=>void k()})]})}function qpr({children:e}){const n=T.useRef(null);return T.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),_.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function Upr(){T.useSyncExternalStore(j9,nW),T.useEffect(()=>j9(()=>{Apr(),Opr()}),[]);const e=iX({select:w=>w.pathname==="/remote-launch"}),[n,t]=T.useState(null),[r,s]=T.useState(null),o=T.useRef(!1),a=T.useRef(!1),i=T.useRef(!1),c=T.useRef(null),[u,d]=T.useState(null),f=dt({...jur(),enabled:!e,refetchInterval:w=>{var k;return w.state.status==="error"||((k=w.state.data)==null?void 0:k.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(T.useEffect(()=>{var v,y;if(e)return;const w=f.data;if(!w){s(((v=f.error)==null?void 0:v.message)??null);return}const k=Bpr(w);rW(k),c.current!==null&&c.current!==k&&(o.current=!1,a.current=!1,i.current=!1),c.current=k,w.kind==="ssh"&&(i.current||(i.current=!0,Fpr(w)),w.session.status==="connected"?(o.current=!0,a.current=!0,d(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((y=f.error)==null?void 0:y.message)??null)},[e,f.data,f.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";Ppr(w),w&&(!o.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return _.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[_.jsx(Ct,{})," ",oXt()]});if(!n)return _.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?_.jsxs(_.Fragment,{children:[_.jsx("span",{children:r}),_.jsx(Me,{onClick:()=>location.reload(),children:Vs()})]}):_.jsx(Ct,{})});if(n.kind==="local")return _.jsxs(w3,{value:n,children:[_.jsx(Sz,{}),_.jsx(Xm,{})]},gi()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?_.jsx(Xz,{host:n.session.host}):_.jsx(Yz,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:d});const m=n.session.status!=="connected"||r!==null;return _.jsxs("div",{className:"relative h-full",children:[_.jsx("div",{className:"h-full",inert:m,children:_.jsxs(w3,{value:n,children:[_.jsx(Sz,{}),_.jsx(Xm,{})]},gi()[1])}),m&&_.jsx(qpr,{children:r?_.jsx(Xz,{host:n.session.host,overlay:!0}):_.jsx(Yz,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:d})})]})}const vy=UQ()({component:Upr}),a6="orx:demo-read-sessions";function XI(){try{const e=JSON.parse(sessionStorage.getItem(a6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function Gpr(e){try{const n=XI();n.add(e),sessionStorage.setItem(a6,JSON.stringify([...n]))}catch{}}function Kpr(){try{sessionStorage.removeItem(a6)}catch{}}function YI(e,n){const t=Mf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function Vpr(e=Ze){var a;const[n,t]=await Promise.all([e.fetchQuery(J0()),e.fetchQuery(Af())]),r=py((a=qI()??n.workspace)==null?void 0:a.lastLocation),s=()=>t[0]?ZI(t[0].id,e):Promise.resolve("/projects");if(!r)return s();const o=Mf(r.split("?")[0]);return!(o!=null&&o.projectId)||!t.some(i=>i.id===o.projectId)||o.sessionId&&!YI(r,await e.fetchQuery(mo(o.projectId)))?s():r}async function ZI(e,n=Ze){var d;const[t,r]=await Promise.all([n.fetchQuery(FS(e)),n.fetchQuery(mo(e))]),s=WI(e)??t,o=py(s==null?void 0:s.lastLocation);if(o&&((d=Mf(o.split("?")[0]))==null?void 0:d.projectId)===e&&YI(o,r))return o;const a=r.find(f=>!f.archived&&!f.sideParentSessionId),i=Di(e)?o6(a==null?void 0:a.id,!(await n.fetchQuery(J0())).tourCompleted):void 0,c=e_(s,(a==null?void 0:a.id)??"new"),u=c?c.active:i==null?void 0:i.active;return jv(e,(a==null?void 0:a.id)??null,u)}function by(){return _.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[_.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),_.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function $w(){return _.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[_.jsx(by,{}),"OpenResearch"]})}const Zz="inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text";function Wpr({cmd:e,onRun:n}){const[t,r]=T.useState(!1);return _.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[_.jsx("code",{dir:"ltr",className:"font-mono text-sm",children:e}),n&&_.jsx("button",{type:"button",className:`cmd-inline-run ${Zz}`,onClick:n,"aria-label":dE({value:Ae(e)}),title:dE({value:Ae(e)}),children:_.jsx(Fhr,{size:11})}),_.jsx("button",{type:"button",className:`cmd-inline-copy ${Zz}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?jf():QY({value:Ae(e)}),title:t?jf():AS(),children:t?_.jsx(to,{size:11,strokeWidth:3}):_.jsx(Wf,{size:11})})]})}function s_(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?_.jsx(Wpr,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function yy(e){if(e.id!=="claude-code")return null;switch(e.authProvider){case"bedrock":return"Amazon Bedrock";case"vertex":return"Google Vertex AI";case"foundry":return"Microsoft Foundry";case"firstParty":return null;default:return e.authProvider??null}}function Ph({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?_.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:_.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?_.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):e==="cursor"?_.jsxs("svg",{className:t,width:n,height:n,viewBox:"388 395 191 191",fill:"none","aria-hidden":"true",children:[_.jsx("path",{fill:"#72716D",d:"M483.395 490.5L566 538.297C565.493 539.178 564.757 539.93 563.845 540.456L486.636 585.13C484.632 586.29 482.159 586.29 480.154 585.13L402.945 540.456C402.034 539.93 401.297 539.178 400.79 538.297L483.395 490.5Z"}),_.jsx("path",{fill:"#55544F",d:"M483.395 395V490.5L400.79 538.297C400.282 537.416 400 536.398 400 535.346V445.654C400 443.545 401.122 441.6 402.945 440.544L480.15 395.87C481.154 395.29 482.273 395 483.391 395H483.395Z"}),_.jsx("path",{fill:"#43413C",d:"M565.996 442.703C565.489 441.822 564.752 441.07 563.841 440.544L486.632 395.87C485.632 395.29 484.513 395 483.395 395V490.5L566 538.297C566.507 537.416 566.789 536.398 566.789 535.346V445.654C566.789 444.598 566.511 443.588 566 442.703H565.996Z"}),_.jsx("path",{fill:"#D6D5D2",d:"M560.218 446.049C560.686 446.858 560.751 447.896 560.218 448.82L485.235 578.974C484.732 579.855 483.392 579.493 483.392 578.479V492.713C483.392 492.029 483.209 491.37 482.877 490.794L560.215 446.045H560.218V446.049Z"}),_.jsx("path",{fill:"#FFFFFF",d:"M560.218 446.049L482.88 490.797C482.552 490.224 482.073 489.737 481.48 489.394L407.369 446.511C406.49 446.006 406.851 444.663 407.862 444.663H557.824C558.889 444.663 559.754 445.239 560.218 446.049Z"})]}):e==="antigravity"?_.jsx("svg",{className:t,width:n,height:n,viewBox:"13 18 85 80",fill:"#3186FF","aria-hidden":"true",children:_.jsx("path",{d:"M89.6992 93.695C94.3659 97.195 101.366 94.8617 94.9492 88.445C75.6992 69.7783 79.7825 18.445 55.8659 18.445C31.9492 18.445 36.0325 69.7783 16.7825 88.445C9.78251 95.445 17.3658 97.195 22.0325 93.695C40.1159 81.445 38.9492 59.8617 55.8659 59.8617C72.7825 59.8617 71.6159 81.445 89.6992 93.695Z"})}):_.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:_.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}function k3(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function Qpr(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function Jz(e,n){return n||e==="preview"}function Xpr(e,n){if(!e||e.needsConfigRepair)return null;const t=k3(e);return t===n?null:t}function JI({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),o=T.useRef(!1),[a,i]=T.useState(()=>k3(e)),[c,u]=T.useState(0),[d,f]=T.useState(()=>Qpr(e,k3(e))),[p,m]=T.useState(d==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,y]=T.useState(e.needsConfigRepair?e.agentNote??null:null),x=d==="running"||d==="checking",b=n[a].includes(` `)?void 0:n[a];T.useEffect(()=>{o.current=!1;const E=s.current;return E==null||E.showModal(),()=>{o.current=!0,E==null||E.close()}},[]);const j=async()=>{f("checking"),y(null);try{const E=await zf(!0,!0);if(o.current)return;const N=E.find(A=>A.id===e.id);if(k((N==null?void 0:N.needsConfigRepair)??!1),N!=null&&N.agentReady&&(a!=="login"||N.authenticated))t==null||t(N),f("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(N!=null&&N.installed)&&!N.installBroken&&!N.needsConfigRepair&&N.authState==="needsLogin")i("login"),m(!0),f("running");else{const A=Xpr(N,a);A&&(i(A),m(!1)),y((N==null?void 0:N.agentNote)??SL()),f("error")}}catch(E){if(o.current)return;y(E instanceof Error?E.message:String(E)),f("error")}};return _.jsxs("dialog",{ref:s,className:"m-auto w-180 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"harness-setup-title",onKeyDown:E=>{E.key==="Escape"&&x&&E.preventDefault()},onCancel:E=>{E.preventDefault(),x||r()},children:[_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Ph,{harness:e.id,size:26}),_.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:mN({agent:e.name})})]}),d==="preview"?_.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?ght({agent:e.name}):Fpt({agent:e.name})}):b&&Jz(d,p)?_.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:s_(ppt({command:b}))}):null,d!=="running"&&d!=="preview"&&_.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[d==="checking"&&_.jsx(Ct,{}),d==="success"?Gdt({agent:e.name}):d==="error"?wL():Ldt()]}),a==="install"&&n.requiresNpm&&_.jsx("p",{className:"text-sm text-subtext",children:apt()}),Jz(d,p)&&_.jsx(gy,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:mN({agent:e.name}),command:b,heightClass:"h-96",active:d==="running",awaitingApproval:d==="preview",onComplete:E=>typeof E!="object"||E===null||!("type"in E)||E.type!=="complete"?!1:(j(),!0),onError:E=>{y(E),f("error")}},`${a}-${c}`),v&&_.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:s_(v)}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d==="error"&&_.jsx(Me,{variant:"ghost",onClick:()=>{y(null),j()},children:tb()}),d==="error"&&!w&&_.jsx(Me,{onClick:()=>{y(null),m(!0),f("running"),u(E=>E+1)},children:Vs()}),_.jsx(Me,{variant:d==="success"?"primary":"default",onClick:r,children:d==="success"?m$():x?Edt():Jm()}),d==="preview"&&_.jsx(Me,{variant:"primary",onClick:()=>{m(!0),f("running")},children:vdt()})]})]})}const Ypr={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function o0({variant:e="list",className:n,...t}){return _.jsx("span",{className:Is("title",Ypr[e],n),...t})}const eA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Xu=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),Cm=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),eB=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),Zpr=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),Jpr=[{id:"AI/ML",label:G7t},{id:"Biology",label:e8t},{id:"Physics",label:v8t},{id:"Other",label:l8t}],emr=["welcome","environment","profile"];function tmr({onDone:e,preferredAgent:n,remote:t}){var Be,Ve;const r=pn({mutationFn:je=>qir(...je)}),[s,o]=T.useState(0);T.useEffect(()=>{const je=emr[s];je&&Lu({name:"onboarding_step_viewed",step:je})},[s]);const a=dt(r_()),i=dt(Dm()),c=dt(G$()),[u,d]=T.useState(null),[f,p]=T.useState(!1),m=T.useRef(null),w=T.useRef(""),k=T.useRef(null),v=T.useRef(!1);T.useEffect(()=>()=>{var je;return(je=m.current)==null?void 0:je.close()},[]);const y=a.data??null,x=(Be=i.data)==null?void 0:Be.gitVersion,b=!t&&((Ve=i.data)==null?void 0:Ve.gitInstallable)===!0,[j,E]=T.useState(!1),[N,A]=T.useState(null),[z,M]=T.useState(""),[D,L]=T.useState(null),[B,U]=T.useState(!1),[H,Q]=T.useState([]),[V,Z]=T.useState(""),[ee,I]=T.useState(""),[$,F]=T.useState([]),[q,K]=T.useState(""),[oe,ie]=T.useState([]),[ce,ne]=T.useState(!1),G=T.useRef(0),[ae,le]=T.useState(!1),[me,ve]=T.useState(!1),Ce=(y==null?void 0:y.some(je=>je.agentReady&&!je.catalogPending))??!1,Fe=(y==null?void 0:y.some(je=>je.catalogPending))??!1,We=x!=null,Oe=T.useRef(0),He=(je,Ye=!1)=>{const lt=++Oe.current;U(!0),le(!1),ve(!1);const ze=()=>lt===Oe.current;Promise.allSettled([zf(je,Ye),Ze.fetchQuery({...Dm(),staleTime:je?0:3e4})]).then(([Gt,Mt])=>{ze()&&(Gt.status==="rejected"&&le(!0),Mt.status==="rejected"&&ve(!0))}).finally(()=>ze()&&U(!1))};T.useEffect(()=>He(!1),[]);const ht=pn({mutationFn:Gir,onSuccess:()=>He(!0)}),xt=_.jsx(amr,{pending:ht.isPending,error:ht.error,disabled:B,onInstall:()=>ht.mutate()});T.useEffect(()=>{if(y===null)return;const je=y.filter(Ye=>Ye.agentReady&&!Ye.catalogPending);L(Ye=>{var ze;if(Ye&&je.some(Gt=>Gt.id===Ye))return Ye;const lt=n&&je.find(Gt=>Gt.id===n.harness);return(lt==null?void 0:lt.id)??((ze=je[0])==null?void 0:ze.id)??null})},[y,n]),T.useEffect(()=>le(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>ve(i.isError),[i.isError,i.dataUpdatedAt]),T.useEffect(()=>{Ze.fetchQuery(Eur()).then(je=>{Q(je.researchAreas),Z(je.otherArea??""),I(je.background??""),F(je.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const je=q.trim();if(je.length<3){ie([]),ne(!1);return}const Ye=++G.current;ne(!0);const lt=setTimeout(()=>{Ze.fetchQuery(Z$(je)).then(ze=>Ye===G.current&&ie(ze)).catch(()=>Ye===G.current&&ie([])).finally(()=>Ye===G.current&&ne(!1))},350);return()=>clearTimeout(lt)},[q]);const Vt=je=>{const Ye=$.some(lt=>lt.paperId===je.paperId);F(lt=>lt.some(ze=>ze.paperId===je.paperId)?lt:[...lt,{paperId:je.paperId,title:tA(je.title)}]),K(""),ie([]),Ye||Ze.fetchQuery(d3(je.paperId)).then(lt=>{var Gt;const ze=(Gt=lt.title)==null?void 0:Gt.trim();ze&&F(Mt=>Mt.map(Jt=>Jt.paperId===je.paperId?{...Jt,title:ze}:Jt))}).catch(()=>{})},Ut=je=>F(Ye=>Ye.filter(lt=>lt.paperId!==je)),Ht=je=>{Q(Ye=>Ye.includes(je)?Ye.filter(lt=>lt!==je):[...Ye,je])},Ie=H.length>0&&(!H.includes("Other")||V.trim().length>0),it=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const je=(async()=>{await new Promise((ze,Gt)=>{const Mt=location.protocol==="https:"?"wss:":"ws:",Jt=new WebSocket(`${Mt}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);Jt.binaryType="arraybuffer";const rn=new TextDecoder,nn=new BI.Terminal;nn.onData(wt=>{Jt.readyState===WebSocket.OPEN&&Jt.send(new TextEncoder().encode(wt))}),m.current=Jt;let Et=!1;Jt.onmessage=wt=>{if(wt.data instanceof ArrayBuffer){nn.write(new Uint8Array(wt.data)),w.current=(w.current+rn.decode(wt.data,{stream:!0})).slice(-65536);return}if(typeof wt.data!="string")return;let Bn;try{Bn=JSON.parse(wt.data)}catch{return}typeof Bn!="object"||Bn===null||!("type"in Bn)||(Bn.type==="complete"?(Et=!0,Jt.close(),ze()):Bn.type==="error"&&(Jt.close(),Gt(new Error("error"in Bn&&typeof Bn.error=="string"?Bn.error:wL()))))},Jt.onerror=()=>{Jt.close(),Gt(new Error(sb()))},Jt.onclose=()=>{nn.dispose(),m.current=null,Et||Gt(new Error(sb()))}});const lt=(await zf(!0,!0)).find(ze=>ze.id==="opencode"&&ze.agentReady);if(!lt)throw new Error(zAt());return L("opencode"),lt})();return k.current=je,je.catch(()=>{}),je};T.useEffect(()=>{t||v.current||!(y!=null&&y.length)||y.some(je=>je.catalogPending)||!y.every(je=>!je.installed&&!je.installBroken)||it()},[y,t]),T.useEffect(()=>{s===1&&f&&o(2)},[s,f]);const ct=()=>{o(f?2:1)},ye=async(je="complete")=>{var Ye;if(!(j||je==="complete"&&(!Ie||!We))){E(!0),A(null),M("");try{const lt=f?await it():y==null?void 0:y.find(Mt=>Mt.id===D&&Mt.agentReady&&!Mt.catalogPending);if(!lt)throw new Error(SL());if(je==="setup")return;const ze=rmr(lt,((Ye=lt.models[0])==null?void 0:Ye.id)??null),Gt=await r.mutateAsync([ze,{researchAreas:H,otherArea:H.includes("Other")?V:null,background:ee||null,papers:$}]);e(Gt.project,Gt.selection)}catch(lt){f&&(k.current=null);const ze=lt instanceof Error?lt.message:String(lt);A(ze),M([w.current,ze].filter(Boolean).join(` -`))}finally{E(!1)}}};return _.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&_.jsx(JI,{harness:u,commands:c.data[u.id],onReady:je=>{L(je.id)},onClose:()=>{d(null)}}),_.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?_.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[_.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[_.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:_.jsx($w,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:b7t()})]}),_.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[_.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),_.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:iEt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:ZMt()})]})}),_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:RNt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:iMt()})]})}),_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:aNt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:YOt()})]})})]})]}),_.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:_.jsxs(Me,{variant:"primary",size:"large",onClick:ct,disabled:B&&y===null,children:[B&&y===null?_.jsx(Ct,{}):null,DN()," ",_.jsx(Sv,{size:20})]})})]}):s===1?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[_.jsx($w,{}),_.jsx("span",{children:mMt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:i9t()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:yAt()}),y!==null&&!Ce&&!Fe&&_.jsx("p",{className:eA,children:qRt()}),y!==null&&Ce&&D===null&&_.jsx("p",{className:eA,children:m9t()}),(x===null||me)&&_.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[_.jsx(nA,{gitVersion:x,error:me}),me?_.jsx("p",{className:Cm,children:kw()}):b?xt:_.jsx("p",{className:Cm,children:LN()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:y!==null?y.map(je=>{var Ye;return _.jsx(omr,{h:je,remote:t,selected:D===je.id,onSelect:()=>L(je.id),commands:(Ye=c.data)==null?void 0:Ye[je.id],onSetup:()=>d(je)},je.id)}):ae?_.jsx("div",{className:Xu,children:kw()}):_.jsxs(Ur,{className:"py-2",children:[_.jsx(Ct,{})," ",MEt()]})}),c.isError&&_.jsxs("p",{className:Xu,children:[Cht()," ",_.jsx(Me,{variant:"ghost",onClick:()=>void c.refetch(),children:Vs()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Me,{variant:"ghost",onClick:()=>o(0),children:[_.jsx(db,{size:12})," ",ON()]}),_.jsxs(Me,{variant:"ghost",onClick:()=>He(!0,!0),disabled:B,children:[_.jsx(xi,{size:12,className:B?"animate-[spin_0.9s_linear_infinite]":""})," ",tb()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(Me,{variant:"primary",onClick:()=>o(2),disabled:B||!Ce||D===null||!We,title:B||!Ce&&Fe?MOt():Ce?D===null?Z9t():me?lTt():x===void 0?SOt():x===null?hzt():void 0:ORt(),children:[DN()," ",_.jsx(Sv,{size:13})]})]})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[_.jsx($w,{}),!f&&_.jsx("span",{children:jMt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:OMt()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:eB,children:[_.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[_.jsx("legend",{children:HOt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:q9t()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:Jpr.map(je=>_.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[_.jsx("input",{type:"checkbox",checked:H.includes(je.id),onChange:()=>Ht(je.id),disabled:j}),_.jsx("span",{children:je.label()})]},je.id))}),H.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:V,onChange:je=>Z(je.target.value),disabled:j,placeholder:qMt(),"aria-label":IAt()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:ETt()}),_.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:je=>I(je.target.value),disabled:j,rows:4,placeholder:HEt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:vTt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:N7t()}),_.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[_.jsx("input",{id:"onb-paper-search",value:q,onChange:je=>K(je.target.value),disabled:j,placeholder:UTt()}),ce?_.jsx("div",{className:Xu,children:JTt()}):oe.length>0?_.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:oe.map(je=>_.jsxs("button",{type:"button",onClick:()=>Vt(je),disabled:j,children:[_.jsx(o0,{children:tA(je.title)}),_.jsx("span",{className:"id",children:je.paperId})]},je.paperId))}):null]}),$.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(je=>_.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[_.jsx(o0,{children:je.title||je.paperId}),_.jsx("span",{className:"id",children:je.paperId}),_.jsx("button",{type:"button","aria-label":Lee({name:Ae(je.paperId)}),onClick:()=>Ut(je.paperId),disabled:j,children:_.jsx(_r,{size:12})})]},je.paperId))})]})}),!Ie&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:H.length===0?O9t():SEt()}),f&&!We&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(nA,{gitVersion:x,error:me}),me?_.jsx("p",{className:Cm,children:kw()}):b?xt:_.jsx("p",{className:Cm,children:LN()}),_.jsx(Me,{className:"mt-2.5",onClick:()=>He(!0,!0),disabled:B,children:tb()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Me,{variant:"ghost",onClick:()=>o(f?0:1),disabled:j,children:[_.jsx(db,{size:12})," ",ON()]}),_.jsx("div",{className:"flex-1"}),_.jsx(Me,{variant:"primary",onClick:()=>void ye(),disabled:j||!We||!f&&D===null||!Ie,children:j?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{})," ",jRt()]}):_.jsxs(_.Fragment,{children:[pNt()," ",_.jsx(Sv,{size:13})]})})]}),D===null&&!f&&_.jsx("p",{className:Zpr,children:aDt()}),N&&_.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[_.jsx(KS,{size:16,className:"shrink-0 text-accent-red"}),_.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),f&&_.jsx(Me,{size:"small",onClick:()=>void ye(Ie&&We?"complete":"setup"),disabled:j,children:Vs()}),f&&_.jsx(Me,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:j,onClick:()=>{p(!1),A(null),o(1)},children:j9t()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:YEt()}),_.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:z||N})]})]})]})})]})}function tA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function nmr(e){return e.catalogPending?{tone:"warning",label:Cf()}:e.authCheckFailed?{tone:"warning",label:Sw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||yy(e)?Y0():e.authMethod==="local"||!e.authenticated?RS():ZRt()}:e.installed?e.installBroken?{tone:"warning",label:FNt()}:e.authMethod==="local"?{tone:"warning",label:TL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:Sw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:Sw()}:e.authState==="unsupported"?{tone:"warning",label:pOt()}:e.installed?{tone:"warning",label:AL()}:{tone:"neutral",label:$N()}:{tone:"neutral",label:$N()}}function rmr(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:uy(e,n).defaultId}}function smr({harness:e}){return _.jsx(Ph,{harness:e,size:26})}function omr({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:o}){var k;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),i=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&i,u=i&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=nmr(e),f=t&&!e.authCheckFailed?{tone:"success",label:cRt()}:d,p=(k=e.version)==null?void 0:k.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),w=_.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[_.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[_.jsx(smr,{harness:e.id}),_.jsxs("span",{className:"flex flex-col gap-1",children:[_.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&_.jsx(ch,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&_.jsx(ch,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(Me,{size:"small",onClick:o,disabled:!s,"aria-haspopup":"dialog",title:Yht(),children:[_.jsx(Vi,{size:14}),!e.installed||e.installBroken?cht():e.authState==="unsupported"?Rpt():kL()]}):_.jsx(ch,{tone:f.tone,children:f.label})]});return e.agentReady?_.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[w,e.id!=="opencode"&&_.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{})," ",Rzt()]}):_.jsxs(_.Fragment,{children:[yy(e)??e.account??(e.authMethod==="apiKey"?TS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Xu,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Xu,children:s_(e.agentNote)})]}):_.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[w,e.authState==="unsupported"&&p&&_.jsx("div",{className:Xu,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Xu} [&_code]:whitespace-pre-wrap break-words`,children:s_(e.agentNote)})]})}function amr({pending:e,error:n,disabled:t,onInstall:r}){return _.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[_.jsx("p",{className:Cm,children:ozt()}),_.jsxs(Me,{variant:"primary",onClick:r,disabled:e||t,children:[e&&_.jsx(Ct,{}),e?kzt():XNt()]}),n&&_.jsx("p",{className:"text-accent-red text-sm m-0",children:n.message})]})}function nA({gitVersion:e,error:n}){return _.jsxs("div",{className:eB,children:[_.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[_.jsx("span",{className:"onb-card-name font-semibold text-base",children:Fzt()}),_.jsx(ch,{tone:e?"success":n||e===null?"danger":"warning",children:e?RS():n?D8t():e===null?zL():Cf()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Xu,children:e??Z8t()})]})}function tB(){const e=T.useSyncExternalStore(Gur,vz,vz);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":H4()}),!e&&_.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[_.jsx(KS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:H4()})]})]})}function imr({onClose:e,onConfigureSsh:n}){var v,y,x;const t=pn({mutationFn:b=>rlr(...b)}),r=dt(U$()),s=dt(Cur()),o=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[i,c]=T.useState(""),u=o?null:((y=r.error)==null?void 0:y.message)??((x=s.error)==null?void 0:x.message)??null,[d,f]=T.useState(null),p=T.useRef(null);sp(p,e);async function m(b){const j="__ORX_DESKTOP__"in window,E=j?null:window.open("/remote-launch","_blank");if(!j&&!E){sn(XQt(),"error");return}f(b);try{const N=await t.mutateAsync([b,{theme:__r(),locale:C()}]);E?E.location.replace(N.gatewayUrl):window.open(N.gatewayUrl,"_blank"),e()}catch(N){E==null||E.close(),sn(N instanceof Error?N.message:String(N),"error")}finally{f(null)}}const w=o==null?void 0:o.filter(b=>b.host.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())),k=new Map(a.map(b=>[b.host,b]));return no.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&e()},children:_.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":UKt(),onClick:e,children:_.jsx(_r,{size:16})}),_.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[_.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:K4()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:JKt()}),_.jsx(qr,{"data-initial-focus":!0,className:"mt-4",value:i,onChange:b=>c(b.target.value),placeholder:qN(),"aria-label":qN()})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?_.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):o===null?_.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[_.jsx(Ct,{})," ",r$()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:hQt()}):w==null?void 0:w.map(b=>{const j=k.get(b.host);return _.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===b.host,onClick:()=>void m(b.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:b.host}),d===b.host?_.jsx(Ct,{}):j?_.jsx("span",{className:"text-sm text-subtext",children:RQt()}):null]},b.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(LI,{size:15}),p$()]})})]})}),document.body)}function mb({size:e=16,className:n}){return _.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[_.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),_.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const cmr="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",lmr="/assets/ollama-logo-Bt9O-2K_.png",umr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nB={id:"lmstudio",label:"LM Studio",icon:cmr,url:"http://127.0.0.1:1234/v1"},Ev=[nB,{id:"omlx",label:"oMLX",icon:umr,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:lmr,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function rB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,Z;const s=dt({...Dur(),enabled:!t}),o=dt(r_()),a=(V=o.data)==null?void 0:V.find(ee=>ee.id==="opencode"),[i,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[d,f]=T.useState("lmstudio"),p=Ev.find(ee=>ee.id===d)??nB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:y,model:x,contextWindow:b,error:j}=k,E=p.id==="ollama"?"":k.apiKey,N=ee=>{w(I=>({...I,[p.id]:{...I[p.id]??k,...ee}}))},A=pn({mutationFn:hur}),z=pn({mutationFn:async ee=>{var F;const I=await pur(ee);if(!((F=(await zf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===I.model)))throw new Error(cvt());return I}}),M=pn({mutationFn:gur}),D=Number(b),L=A.isPending||z.isPending,B=(ee={})=>N({models:[],model:null,error:null,...ee}),U=async()=>{B();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:E});N({models:ee.models,model:ee.models[0]??null})}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(x){N({error:null});try{const ee=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:E,model:x,contextWindow:D});u(),n==null||n(ee.model)}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch(I){sn(I instanceof Error?I.message:String(I),"error")}};return _.jsxs(_.Fragment,{children:[!t&&_.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":wN(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:wN()}),_.jsxs(Me,{disabled:L,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Qf,{size:14}),jL()]})]}),s.error&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),_.jsx("div",{className:"space-y-3",children:(Z=s.data)==null?void 0:Z.map(ee=>_.jsx(_mr,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(I=>I.id))??[],checking:o.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:o.isError||!o.data,disabled:L||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),i&&_.jsx(fmr,{busy:L,onClose:u,footer:_.jsxs(Me,{variant:"primary",disabled:L||!e||y.length>0&&(!x||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(y.length>0?H():U()),children:[L&&_.jsx(Ct,{}),y.length>0?Obt():G1t()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:mbt()}),_.jsx(Ih,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:ibt()})]}),_.jsx(Lc,{choices:Ev,value:d,title:xN(),header:xN(),variant:"field",floating:!0,dropDown:!0,disabled:L,renderLabel:ee=>_.jsxs(_.Fragment,{children:[ee.id==="openai-compatible"?zS():ee.label,ee.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CL()})]}),renderIcon:ee=>{var $;const I=($=Ev.find(F=>F.id===ee.id))==null?void 0:$.icon;return I?_.jsx("img",{src:I,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):_.jsx(TI,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:L1t()}),_.jsx(qr,{value:v,disabled:L,onChange:ee=>{B({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:VL()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?oyt():jbt()}),_.jsx(qr,{type:"password",autoComplete:"off",value:E,disabled:L,onChange:ee=>B({apiKey:ee.target.value})})]})]},p.id),y.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(Lc,{choices:y.map(ee=>({id:ee,label:ee})),value:x,searchPlaceholder:Owt(),title:Om(),header:Om(),variant:"field",floating:!0,dropDown:!0,disabled:L,onSelect:ee=>{N({model:ee})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:Cvt()}),_.jsx(qr,{type:"number",min:4096,step:1024,value:b,disabled:L,onChange:ee=>{N({contextWindow:ee.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:Dvt()})]}),j&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:j})]})})]})}function _mr({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:o,onRemove:a}){const i=pn({mutationFn:async()=>{try{await mur(e.id)}finally{await zf(!0)}}}),c=Ev.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=i.isPending||r,p=s,m=d;return _.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[_.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[_.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?_.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):_.jsx(TI,{size:20,className:"mt-0.5 shrink-0"}),_.jsxs("div",{className:"min-w-0 space-y-1",children:[_.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),_.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?zS():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CL()})," · ",e.baseUrl]})]})]}),_.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[_.jsx("span",{role:"status",children:_.jsx(Zt,{variant:f||p?"default":m?"success":"warning",children:f?La():p?o$():m?gvt():hi()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(Me,{variant:"ghost",disabled:o||i.isPending,onClick:()=>i.mutate(),children:[_.jsx(xi,{size:14}),tb()]}),_.jsx(Rt,{"aria-label":Zvt({name:e.name}),disabled:o||i.isPending,onClick:a,children:_.jsx(Yf,{size:14})})]})]})]}),i.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:i.error.message})]})}function fmr({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),o=()=>{e||n()};return sp(s,o,"input"),no.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&o()},children:_.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[_.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:_.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:jL()})}),_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Ef(),onClick:o,disabled:e,children:_.jsx(_r,{size:16})}),_.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[_.jsx(Me,{onClick:o,disabled:e,children:Ef()}),t]})]})}),document.body)}const sB=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Iw=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),$u={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function dmr(e){var r,s;const n=e.find(o=>o.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:cb(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:uy(n,t).defaultId}}function sa(e){const[n,t]=T.useState(!1),r=T.useRef(null);return T.useEffect(()=>{if(!n)return;const s=a=>{var i,c;a.target instanceof Node&&!((i=r.current)!=null&&i.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},o=a=>{var i;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(i=e==null?void 0:e.current)==null||i.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",o,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function hmr({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:o,reasoningChoices:a=[],defaultReasoningId:i,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:f=!1,openRequest:p=0,className:m}){var We,Oe,He,ht,xt,Vt,Ut,Ht;const{data:w=pmr}=dt(r_()),k=K0(),[v,y]=T.useState(!1),x=T.useRef(null),b=T.useRef(null),{open:j,setOpen:E,ref:N}=sa(x),[A,z]=T.useState(""),[M,D]=T.useState("root"),L=()=>{E(!1),D("root"),z("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),z(""),E(!0))},[p,E]),T.useEffect(()=>{var Ie;j&&(M==="reasoning"||M==="speed"||M==="permissions")&&((Ie=b.current)==null||Ie.focus())},[j,M]);const U=T.useMemo(()=>{const Ie=A.trim().toLowerCase();return(f&&e?w.filter(ct=>ct.id===e.harness):w).map(ct=>{let ye=ct.models;return Ie?ye=ye.filter(Be=>`${Be.id} ${wv(Be)}`.toLowerCase().includes(Ie)):(ct.id==="opencode"||ct.id==="cursor"||ct.id==="antigravity")&&(ye=ye.slice(0,5)),{harness:ct,models:ye,hidden:Ie?0:ct.models.length-ye.length}})},[w,A,f,e]),H=(Ie,it)=>{var ye;const ct=(e==null?void 0:e.harness)===Ie.id;n({harness:Ie.id,model:it,serviceTier:cb(Ie,it,ct?e==null?void 0:e.serviceTier:null),permissionMode:ct?e.permissionMode:((ye=Ie.options)==null?void 0:ye.defaultPermissionMode)??null,reasoningLevel:F$(Ie,it,ct&&Ie.models.some(Be=>Be.id===it)?e.reasoningLevel:null)}),L()},Q=(e==null?void 0:e.model)!=null?(We=w.find(Ie=>Ie.id===e.harness))==null?void 0:We.models.find(Ie=>Ie.id===e.model):void 0,V=e?e.model?Q?wv(Q):`${t3(e.model)} · ${CN()}`:P4():Om(),Z=(e==null?void 0:e.reasoningLevel)??i??((Oe=a[0])==null?void 0:Oe.id),ee=(He=a.find(Ie=>Ie.id===Z))==null?void 0:He.label,I=(e==null?void 0:e.permissionMode)??s??((ht=r[0])==null?void 0:ht.id),$=(xt=r.find(Ie=>Ie.id===I))==null?void 0:xt.label,F=(e==null?void 0:e.harness)==="opencode"?Pkt():L2t(),q=w.find(Ie=>Ie.id===(e==null?void 0:e.harness)),K=P$(q,e==null?void 0:e.model),oe=cb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Vt=K.find(Ie=>Ie.id===oe))==null?void 0:Vt.label,ce=Ie=>{c==null||c(Ie),L()},ne=Ie=>{o==null||o(Ie),L()},G=[{id:"agentic",label:yxt(),description:zxt()},{id:"copilot",label:Ixt(),description:Vxt()}],ae=(Ut=G.find(Ie=>Ie.id===u))==null?void 0:Ut.label,le=Ie=>{const it=G.find(ct=>ct.id===Ie);it&&(d==null||d(it.id)),L()},me=Ie=>{e&&n({...e,serviceTier:Ie}),L()},ve=(Ie,it,ct)=>_.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>D(ct),children:[_.jsx("span",{className:"flex-1",children:Ie}),it&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:it}),_.jsx(yi,{size:14,className:"shrink-0 text-muted"})]}),Ce=Ie=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx(Rt,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":$L(),onClick:()=>{D("root"),z("")},children:_.jsx(jI,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Ie}),M==="models"&&_.jsx(Rt,{type:"button",size:"small","aria-label":Q4(),onClick:()=>{L(),t()},children:_.jsx(hy,{size:15,"aria-hidden":"true"})})]}),Fe=(Ie,it,ct,ye)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Ie.map(Be=>_.jsxs(un,{onClick:()=>ye(Be.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[Be.label,Be.id===ct&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",EL()]})]}),Be.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Be.description})]}),Be.id===it&&_.jsx(to,{size:13})]},Be.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:N,children:[_.jsxs("button",{ref:x,type:"button",className:Is("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:dY({label:`${V}${ee?` · ${ee}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":j,onClick:()=>{j?L():(D("root"),E(!0))},children:[oe==="priority"?_.jsx(hpr,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Ph,{harness:e.harness,size:14}):null,oe==="priority"&&_.jsxs("span",{className:"sr-only",children:[G2t()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[V,ee&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),_.jsx(qc,{size:14,className:"shrink-0 text-muted"})]}),j&&_.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&_.jsxs("div",{className:"model-root-menu p-1",children:[ve(Om(),V,"models"),a.length>0&&ve(F,ee,"reasoning"),K.length>0&&ve(jN(),ie,"speed"),r.length>0&&ve(SN(),$,"permissions"),d&&ve(kN(),ae,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Ce(Om()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:qwt(),value:A,onChange:Ie=>z(Ie.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[U.map(({harness:Ie,models:it,hidden:ct})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:sB,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Ph,{harness:Ie.id,size:14}),Ie.name]}),!Ie.agentReady&&_.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Ie.catalogPending?Cf():_.jsxs(_.Fragment,{children:[_.jsx(Fz,{size:10})," ",hi()]})})]}),Ie.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(un,{onClick:()=>H(Ie,null),children:[_.jsx("span",{children:P4()}),(e==null?void 0:e.harness)===Ie.id&&(e==null?void 0:e.model)===null&&_.jsx(to,{size:13})]}),Ie.models.length===0&&Ie.agentNote&&_.jsx("div",{className:Iw,children:s_(Ie.agentNote)}),it.map(ye=>_.jsxs(un,{title:ye.id,onClick:()=>H(Ie,ye.id),children:[_.jsx("span",{children:wv(ye)}),(e==null?void 0:e.harness)===Ie.id&&(e==null?void 0:e.model)===ye.id&&_.jsx(to,{size:13})]},ye.id)),A.trim().length>0&&!Ie.models.some(ye=>ye.id===A.trim())&&_.jsx(un,{onClick:()=>H(Ie,A.trim()),children:_.jsxs("span",{children:[Tkt({id:Ae(A.trim())})," · ",CN()]})})]}):_.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:Ie.catalogPending?Cf():Ie.agentNote?s_(Ie.agentNote):jwt()}),Ie.id==="opencode"&&_.jsx(un,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ye;L(),(ye=x.current)==null||ye.focus(),y(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[rxt(),_.jsx(Qf,{size:14,"aria-hidden":"true"})]})}),Ie.agentReady&&ct>0&&_.jsx("div",{className:Iw,children:mwt({count:_n(ct)})})]},Ie.id)),w.length===0&&_.jsx("div",{className:Iw,children:E2t()})]}),f&&e&&w.length>1&&_.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[_.jsx(Fz,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Zwt()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Ce(F),Fe(a,Z,i,ce)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Ce(SN()),Fe(r,I,s,ne)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Ce(kN()),Fe(G,u,Z4,le)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Ce(jN()),Fe(K,oe??void 0,"default",me)]})]}),v&&_.jsx(rB,{dialogOnly:!0,installed:((Ht=w.find(Ie=>Ie.id==="opencode"))==null?void 0:Ht.installed)??!1,onClose:()=>y(!1),onConnected:Ie=>{var ct;const it=(ct=k.getQueryData(r_().queryKey))==null?void 0:ct.find(ye=>ye.id==="opencode");it&&(!f||(e==null?void 0:e.harness)==="opencode")&&H(it,Ie)}})]})}function Lc({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:o=!1,disabled:a=!1,variant:i="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,V;const v=T.useRef(null),{open:y,setOpen:x,ref:b}=sa(v),j=T.useRef(null),[E,N]=T.useState("");if(T.useLayoutEffect(()=>{var $;const Z=j.current,ee=b.current;if(!y||!m||!Z||!ee)return;Z.matches(":popover-open")||(Z.showPopover(),($=Z.querySelector("input"))==null||$.focus());const I=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,K=F.top-12,oe=Math.min(380,Z.scrollHeight),ie=o?q>=oe||q>=K:KK;Z.style.width=`${F.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,ie?q:K))}px`,Z.style.left=`${F.left}px`,Z.style.top=`${ie?F.bottom+4:F.top-Z.getBoundingClientRect().height-4}px`};return I(),window.addEventListener("resize",I),window.addEventListener("scroll",I,!0),()=>{window.removeEventListener("resize",I),window.removeEventListener("scroll",I,!0)}},[y,m,o,E,e.length,b]),e.length===0)return null;const A=n??t??((Q=e[0])==null?void 0:Q.id)??null,z=e.find(Z=>Z.id===A),M=e.find(Z=>Z.id===t),D=i==="bare"&&(M==null?void 0:M.id)===ib?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(E.toLowerCase())),U=(z==null?void 0:z.label)??((V=e[0])==null?void 0:V.label)??"",H=Z=>{var ee;w(Z),x(!1),(ee=v.current)==null||ee.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${i==="field"?" w-full":""}`,ref:b,children:[_.jsxs("button",{ref:v,type:"button",className:Is(i==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${i==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":y,disabled:a,onClick:()=>{N(""),x(Z=>!Z)},children:[_.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[z&&(f==null?void 0:f(z)),_.jsx("span",{className:"truncate",children:z?(p==null?void 0:p(z))??U:U})]}),_.jsx(qc,{size:12})]}),y&&_.jsxs("div",{ref:j,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(Z=>Z.description)?"min-w-80":""} ${i==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${o?"drop-down":""}`,children:[r&&_.jsx("div",{className:sB,children:r}),d&&_.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:E,onChange:Z=>N(Z.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),_.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&_.jsxs(_.Fragment,{children:[_.jsxs(un,{type:"button",onClick:()=>H(D.id),children:[_.jsxs("span",{className:"inline-flex items-center gap-2",children:[f==null?void 0:f(D),_.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,_.jsx("span",{className:"option-default text-muted font-normal",children:n2t()})]})]}),A===D.id&&_.jsx(to,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,ee)=>_.jsxs(un,{type:"button",onClick:()=>H(Z.id),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[f==null?void 0:f(Z),_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[(p==null?void 0:p(Z))??Z.label,!D&&Z.id===t&&_.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",EL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(to,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},Z.id))]})]})]})}const pmr=[];function S3({runtime:e,corner:n=!1}){const[t,r]=T.useState(!1),[s,o]=T.useState(!1),[a,i]=T.useState(!1),[c,u]=T.useState(null),d=sa();async function f(){if(c){i(!0);try{await L$(c),u(null)}catch(p){u(null),sn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}}}return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[_.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[_.jsx("div",{className:"text-sm font-medium text-text",children:gKt({host:Ae(e.session.host),user:Ae(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(un,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await O$(),d.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?cKt():V4()}),_.jsx(eg,{content:FQt(),className:"me-2 shrink-0 text-subtext",children:_.jsx(WS,{size:15})})]}),_.jsx(un,{danger:!0,disabled:s,onClick:async()=>{o(!0);try{u(await D$()),d.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}},children:PL()})]}),n?_.jsxs(Me,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[_.jsx(mb,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:jw({host:Ae(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(Rt,{size:"small","aria-label":jw({host:Ae(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:_.jsx(mb,{size:14,className:"shrink-0"})}),_.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[_.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:jw({host:Ae(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]})]})]}),c&&_.jsx(xI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const gb="code-source-text",oB="code-source-wrap",aB="file-view-gutter text-right text-muted select-none";function iB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const mmr={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},gmr={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function j3(e){const n=e.trim().toLowerCase();return mmr[n]??n}function i6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=gmr[n];if(t)return j3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:j3(n.slice(r+1))}Uc.displayName="clike";Uc.aliases=[];function Uc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}rg.displayName="c";rg.aliases=[];function rg(e){e.register(Uc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}xy.displayName="cpp";xy.aliases=[];function xy(e){e.register(rg),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}c6.displayName="arduino";c6.aliases=["ino"];function c6(e){e.register(xy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}l6.displayName="bash";l6.aliases=["sh","shell"];function l6(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,i=0;i>/g,function(q,K){return"(?:"+F[+K]+")"})}function r($,F,q){return RegExp(t($,F),"")}function s($,F){for(var q=0;q>/g,function(){return"(?:"+$+")"});return $.replace(/<>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a($){return"\\b(?:"+$.trim().replace(/ /g,"|")+")\\b"}var i=a(o.typeDeclaration),c=RegExp(a(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),u=a(o.typeDeclaration+" "+o.contextual+" "+o.other),d=a(o.type+" "+o.typeDeclaration+" "+o.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,w=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,w]),v=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),b=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),j=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,k,v]),E={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,j]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[i,w]),lookbehind:!0,inside:E},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:E},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:E},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[j,d,m]),inside:E}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[j,k]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[j]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:E}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[i,w,m,j,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[w,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(j),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+N,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),L=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,L]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[L]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,H]);function I($,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[$]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[V]),lookbehind:!0,greedy:!0,inside:I(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:I(ee,Z)}],char:{pattern:RegExp(N),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}sg.displayName="markup";sg.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function sg(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:s}};o["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}ap.displayName="css";ap.aliases=[];function ap(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}_6.displayName="diff";_6.aliases=[];function _6(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],o=[];/^\w+$/.test(r)||o.push(/\w+/.exec(r)[0]),r==="diff"&&o.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +`))}finally{E(!1)}}};return _.jsxs("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${s===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:[!t&&u&&c.data&&_.jsx(JI,{harness:u,commands:c.data[u.id],onReady:je=>{L(je.id)},onClose:()=>{d(null)}}),_.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${s===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:s===0?_.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[_.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[_.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:_.jsx($w,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:b7t()})]}),_.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[_.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),_.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:iEt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:ZMt()})]})}),_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:RNt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:iMt()})]})}),_.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:_.jsxs("span",{children:[_.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:aNt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:YOt()})]})})]})]}),_.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:_.jsxs(Me,{variant:"primary",size:"large",onClick:ct,disabled:B&&y===null,children:[B&&y===null?_.jsx(Ct,{}):null,DN()," ",_.jsx(Sv,{size:20})]})})]}):s===1?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[_.jsx($w,{}),_.jsx("span",{children:mMt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:i9t()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:yAt()}),y!==null&&!Ce&&!Fe&&_.jsx("p",{className:eA,children:qRt()}),y!==null&&Ce&&D===null&&_.jsx("p",{className:eA,children:m9t()}),(x===null||me)&&_.jsxs("div",{className:"onb-git-check mt-7 mb-5.5",role:"status","aria-live":"polite",children:[_.jsx(nA,{gitVersion:x,error:me}),me?_.jsx("p",{className:Cm,children:kw()}):b?xt:_.jsx("p",{className:Cm,children:LN()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:y!==null?y.map(je=>{var Ye;return _.jsx(omr,{h:je,remote:t,selected:D===je.id,onSelect:()=>L(je.id),commands:(Ye=c.data)==null?void 0:Ye[je.id],onSetup:()=>d(je)},je.id)}):ae?_.jsx("div",{className:Xu,children:kw()}):_.jsxs(Ur,{className:"py-2",children:[_.jsx(Ct,{})," ",MEt()]})}),c.isError&&_.jsxs("p",{className:Xu,children:[Cht()," ",_.jsx(Me,{variant:"ghost",onClick:()=>void c.refetch(),children:Vs()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Me,{variant:"ghost",onClick:()=>o(0),children:[_.jsx(db,{size:12})," ",ON()]}),_.jsxs(Me,{variant:"ghost",onClick:()=>He(!0,!0),disabled:B,children:[_.jsx(xi,{size:12,className:B?"animate-[spin_0.9s_linear_infinite]":""})," ",tb()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(Me,{variant:"primary",onClick:()=>o(2),disabled:B||!Ce||D===null||!We,title:B||!Ce&&Fe?MOt():Ce?D===null?Z9t():me?lTt():x===void 0?SOt():x===null?hzt():void 0:ORt(),children:[DN()," ",_.jsx(Sv,{size:13})]})]})]}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[_.jsx($w,{}),!f&&_.jsx("span",{children:jMt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:OMt()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:eB,children:[_.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[_.jsx("legend",{children:HOt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:q9t()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:Jpr.map(je=>_.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[_.jsx("input",{type:"checkbox",checked:H.includes(je.id),onChange:()=>Ht(je.id),disabled:j}),_.jsx("span",{children:je.label()})]},je.id))}),H.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:V,onChange:je=>Z(je.target.value),disabled:j,placeholder:qMt(),"aria-label":IAt()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:ETt()}),_.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:ee,onChange:je=>I(je.target.value),disabled:j,rows:4,placeholder:HEt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:vTt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:N7t()}),_.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[_.jsx("input",{id:"onb-paper-search",value:q,onChange:je=>K(je.target.value),disabled:j,placeholder:UTt()}),ce?_.jsx("div",{className:Xu,children:JTt()}):oe.length>0?_.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:oe.map(je=>_.jsxs("button",{type:"button",onClick:()=>Vt(je),disabled:j,children:[_.jsx(o0,{children:tA(je.title)}),_.jsx("span",{className:"id",children:je.paperId})]},je.paperId))}):null]}),$.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(je=>_.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[_.jsx(o0,{children:je.title||je.paperId}),_.jsx("span",{className:"id",children:je.paperId}),_.jsx("button",{type:"button","aria-label":Lee({name:Ae(je.paperId)}),onClick:()=>Ut(je.paperId),disabled:j,children:_.jsx(_r,{size:12})})]},je.paperId))})]})}),!Ie&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:H.length===0?O9t():SEt()}),f&&!We&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(nA,{gitVersion:x,error:me}),me?_.jsx("p",{className:Cm,children:kw()}):b?xt:_.jsx("p",{className:Cm,children:LN()}),_.jsx(Me,{className:"mt-2.5",onClick:()=>He(!0,!0),disabled:B,children:tb()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Me,{variant:"ghost",onClick:()=>o(f?0:1),disabled:j,children:[_.jsx(db,{size:12})," ",ON()]}),_.jsx("div",{className:"flex-1"}),_.jsx(Me,{variant:"primary",onClick:()=>void ye(),disabled:j||!We||!f&&D===null||!Ie,children:j?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{})," ",jRt()]}):_.jsxs(_.Fragment,{children:[pNt()," ",_.jsx(Sv,{size:13})]})})]}),D===null&&!f&&_.jsx("p",{className:Zpr,children:aDt()}),N&&_.jsxs("div",{role:"alert",className:"mt-8 grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2.5 rounded-md border border-danger-notice-border bg-accent-red-subtle px-3 py-2",children:[_.jsx(KS,{size:16,className:"shrink-0 text-accent-red"}),_.jsx("p",{className:"m-0 min-w-0 flex-1 text-sm text-text break-words",children:N}),f&&_.jsx(Me,{size:"small",onClick:()=>void ye(Ie&&We?"complete":"setup"),disabled:j,children:Vs()}),f&&_.jsx(Me,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:j,onClick:()=>{p(!1),A(null),o(1)},children:j9t()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:YEt()}),_.jsx("pre",{className:"mt-2 mb-0 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-md border border-danger-notice-border bg-background px-2 py-1.5 font-mono text-xs",children:z||N})]})]})]})})]})}function tA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function nmr(e){return e.catalogPending?{tone:"warning",label:Cf()}:e.authCheckFailed?{tone:"warning",label:Sw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||yy(e)?Y0():e.authMethod==="local"||!e.authenticated?RS():ZRt()}:e.installed?e.installBroken?{tone:"warning",label:FNt()}:e.authMethod==="local"?{tone:"warning",label:TL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:Sw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:Sw()}:e.authState==="unsupported"?{tone:"warning",label:pOt()}:e.installed?{tone:"warning",label:AL()}:{tone:"neutral",label:$N()}:{tone:"neutral",label:$N()}}function rmr(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:uy(e,n).defaultId}}function smr({harness:e}){return _.jsx(Ph,{harness:e,size:26})}function omr({h:e,remote:n,selected:t,onSelect:r,commands:s,onSetup:o}){var k;const a=e.id==="claude-code"?!!e.loginEligible:e.authMethod!=="local"&&e.authMethod!=="apiKey"&&(e.authState==="needsLogin"||e.authState==="unknown"),i=!n&&!e.needsConfigRepair&&!e.catalogPending&&(!e.installed||e.installBroken||e.authState==="unsupported"||a),c=!e.agentReady&&i,u=i&&(!e.installed||!e.agentReady&&e.authState==="needsLogin"),d=nmr(e),f=t&&!e.authCheckFailed?{tone:"success",label:cRt()}:d,p=(k=e.version)==null?void 0:k.replace(/\s*\(.*\)$/,""),m=[e.id==="opencode"&&e.account!=="opencode"&&e.account,e.id==="opencode"&&e.plan].filter(Boolean).join(" · "),w=_.jsxs("div",{className:"onb-card-head flex flex-wrap items-center justify-between gap-3",children:[_.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[_.jsx(smr,{harness:e.id}),_.jsxs("span",{className:"flex flex-col gap-1",children:[_.jsxs("span",{className:"onb-card-name flex flex-wrap items-center gap-2 text-base font-semibold tracking-[-0.01em]",children:[e.name,u&&_.jsx(ch,{tone:d.tone,className:"font-normal",children:d.label})]}),c&&!u&&_.jsx(ch,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(Me,{size:"small",onClick:o,disabled:!s,"aria-haspopup":"dialog",title:Yht(),children:[_.jsx(Vi,{size:14}),!e.installed||e.installBroken?cht():e.authState==="unsupported"?Rpt():kL()]}):_.jsx(ch,{tone:f.tone,children:f.label})]});return e.agentReady?_.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${t?" selected":""}`,"aria-pressed":t,onClick:r,children:[w,e.id!=="opencode"&&_.jsx("div",{className:"onb-card-detail flex items-center gap-1.5 text-sm",children:e.accountLoading?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{})," ",Rzt()]}):_.jsxs(_.Fragment,{children:[yy(e)??e.account??(e.authMethod==="apiKey"?TS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Xu,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Xu,children:s_(e.agentNote)})]}):_.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-4 px-4 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[w,e.authState==="unsupported"&&p&&_.jsx("div",{className:Xu,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Xu} [&_code]:whitespace-pre-wrap break-words`,children:s_(e.agentNote)})]})}function amr({pending:e,error:n,disabled:t,onInstall:r}){return _.jsxs("div",{className:"flex flex-col items-start gap-2.5",children:[_.jsx("p",{className:Cm,children:ozt()}),_.jsxs(Me,{variant:"primary",onClick:r,disabled:e||t,children:[e&&_.jsx(Ct,{}),e?kzt():XNt()]}),n&&_.jsx("p",{className:"text-accent-red text-sm m-0",children:n.message})]})}function nA({gitVersion:e,error:n}){return _.jsxs("div",{className:eB,children:[_.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[_.jsx("span",{className:"onb-card-name font-semibold text-base",children:Fzt()}),_.jsx(ch,{tone:e?"success":n||e===null?"danger":"warning",children:e?RS():n?D8t():e===null?zL():Cf()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Xu,children:e??Z8t()})]})}function tB(){const e=T.useSyncExternalStore(Gur,vz,vz);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":H4()}),!e&&_.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 mac-titlebar:ps-20 win-titlebar:pe-36 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[_.jsx(KS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:H4()})]})]})}function imr({onClose:e,onConfigureSsh:n}){var v,y,x;const t=pn({mutationFn:b=>rlr(...b)}),r=dt(U$()),s=dt(Cur()),o=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[i,c]=T.useState(""),u=o?null:((y=r.error)==null?void 0:y.message)??((x=s.error)==null?void 0:x.message)??null,[d,f]=T.useState(null),p=T.useRef(null);sp(p,e);async function m(b){const j="__ORX_DESKTOP__"in window,E=j?null:window.open("/remote-launch","_blank");if(!j&&!E){sn(XQt(),"error");return}f(b);try{const N=await t.mutateAsync([b,{theme:__r(),locale:C()}]);E?E.location.replace(N.gatewayUrl):window.open(N.gatewayUrl,"_blank"),e()}catch(N){E==null||E.close(),sn(N instanceof Error?N.message:String(N),"error")}finally{f(null)}}const w=o==null?void 0:o.filter(b=>b.host.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase())),k=new Map(a.map(b=>[b.host,b]));return no.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:b=>{b.target===b.currentTarget&&e()},children:_.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":UKt(),onClick:e,children:_.jsx(_r,{size:16})}),_.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[_.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:K4()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:JKt()}),_.jsx(qr,{"data-initial-focus":!0,className:"mt-4",value:i,onChange:b=>c(b.target.value),placeholder:qN(),"aria-label":qN()})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?_.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):o===null?_.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[_.jsx(Ct,{})," ",r$()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:hQt()}):w==null?void 0:w.map(b=>{const j=k.get(b.host);return _.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:d===b.host,onClick:()=>void m(b.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:b.host}),d===b.host?_.jsx(Ct,{}):j?_.jsx("span",{className:"text-sm text-subtext",children:RQt()}):null]},b.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(Me,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(LI,{size:15}),p$()]})})]})}),document.body)}function mb({size:e=16,className:n}){return _.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[_.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),_.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}const cmr="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%20179.2C0%20116.474%200%2085.1112%2012.2073%2061.1531C22.9451%2040.0789%2040.0789%2022.9451%2061.1531%2012.2073C85.1112%200%20116.474%200%20179.2%200H332.8C395.526%200%20426.889%200%20450.847%2012.2073C471.921%2022.9451%20489.055%2040.0789%20499.793%2061.1531C512%2085.1112%20512%20116.474%20512%20179.2V332.8C512%20395.526%20512%20426.889%20499.793%20450.847C489.055%20471.921%20471.921%20489.055%20450.847%20499.793C426.889%20512%20395.526%20512%20332.8%20512H179.2C116.474%20512%2085.1112%20512%2061.1531%20499.793C40.0789%20489.055%2022.9451%20471.921%2012.2073%20450.847C0%20426.889%200%20395.526%200%20332.8V179.2Z'%20fill='url(%23paint0_linear_496_292)'/%3e%3crect%20opacity='0.25'%20x='128'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='64'%20y='84'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='224'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='160'%20y='144'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='168'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='104'%20y='204'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='112'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='48'%20y='264'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='176'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='112'%20y='324'%20width='224'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20opacity='0.25'%20x='304'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3crect%20x='240'%20y='384'%20width='152'%20height='44'%20rx='22'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_496_292'%20x1='-219.792'%20y1='229.426'%20x2='239.06'%20y2='702.601'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E7EF3'%20style='stop-color:%236E7EF3;stop-color:color(display-p3%200.4303%200.4946%200.9515);stop-opacity:1;'/%3e%3cstop%20offset='1'%20stop-color='%234F13BE'%20style='stop-color:%234F13BE;stop-color:color(display-p3%200.3079%200.0763%200.7470);stop-opacity:1;'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",lmr="/assets/ollama-logo-Bt9O-2K_.png",umr="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%20viewBox='0%200%20160%20160'%3e%3cdefs%3e%3cfilter%20id='shadow'%20x='-10%25'%20y='-10%25'%20width='130%25'%20height='130%25'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='6'%20flood-color='%23000'%20flood-opacity='0.15'/%3e%3c/filter%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3e%3cstop%20offset='0%25'%20stop-color='%23ffffff'/%3e%3cstop%20offset='100%25'%20stop-color='%23f0f0f0'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='10'%20y='10'%20width='140'%20height='140'%20rx='32'%20fill='url(%23bg)'%20filter='url(%23shadow)'/%3e%3cg%20transform='translate(25,%2025)%20scale(0.0221)'%3e%3cg%20transform='translate(0,4970)%20scale(1,-1)'%20fill='%23000000'%20stroke='none'%3e%3cpath%20d='M2275%204349%20c-408%20-39%20-769%20-207%20-1056%20-492%20-196%20-194%20-333%20-428%20-418%20-715%20-47%20-158%20-67%20-281%20-101%20-617%20-66%20-662%20-116%20-944%20-245%20-1387%20-102%20-352%20-271%20-774%20-420%20-1051%20-19%20-35%20-35%20-70%20-35%20-76%200%20-8%2050%20-11%20163%20-11%20l164%200%2080%20168%20c168%20348%20303%20739%20408%201175%2073%20307%20109%20532%20155%20982%2052%20500%2072%20627%20122%20785%20162%20507%20570%20860%201096%20951%20155%2026%20389%2026%20544%200%20221%20-38%20440%20-129%20620%20-258%2045%20-32%20152%20-126%20237%20-209%2086%20-82%20178%20-165%20204%20-183%20106%20-72%20312%20-150%20495%20-186%20l32%20-7%20-86%20-54%20c-110%20-69%20-170%20-117%20-267%20-212%20-93%20-91%20-143%20-154%20-191%20-243%20-105%20-191%20-130%20-406%20-75%20-623%2029%20-115%2081%20-239%20217%20-516%20234%20-480%20343%20-769%20411%20-1091%2036%20-172%2048%20-252%2057%20-381%20l7%20-98%20158%200%20158%200%20-4%2028%20c-2%2015%20-6%2066%20-9%20113%20-14%20218%20-95%20560%20-201%20849%20-81%20220%20-165%20407%20-363%20810%20-120%20245%20-147%20320%20-161%20443%20-38%20338%20202%20621%20766%20906%20131%2065%20166%20126%20106%20183%20-33%2031%20-86%2047%20-288%2088%20-177%2036%20-274%2061%20-370%2097%20-140%2052%20-190%2088%20-377%20270%20-140%20137%20-202%20189%20-300%20254%20-378%20250%20-782%20351%20-1233%20308z%20M3050%203391%20c-57%20-11%20-122%20-53%20-154%20-99%20-41%20-57%20-49%20-158%20-18%20-218%2029%20-56%2066%20-92%20120%20-117%20153%20-69%20323%2037%20325%20203%201%20147%20-131%20259%20-273%20231z%20M1985%201391%20c-68%20-31%20-70%20-40%20-66%20-271%201%20-114%20-2%20-243%20-9%20-290%20-40%20-307%20-124%20-555%20-255%20-754%20-25%20-38%20-45%20-71%20-45%20-72%200%20-2%2079%20-4%20176%20-4%20l175%200%2054%20113%20c117%20247%20182%20512%20201%20812%207%20126%20-9%20319%20-32%20374%20-26%2063%20-86%20111%20-136%20111%20-13%200%20-41%20-9%20-63%20-19z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nB={id:"lmstudio",label:"LM Studio",icon:cmr,url:"http://127.0.0.1:1234/v1"},Ev=[nB,{id:"omlx",label:"oMLX",icon:umr,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:lmr,url:"http://127.0.0.1:11434/v1"},{id:"openai-compatible",label:"Custom Endpoint",icon:null,url:"http://127.0.0.1:8000/v1"}];function rB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,Z;const s=dt({...Dur(),enabled:!t}),o=dt(r_()),a=(V=o.data)==null?void 0:V.find(ee=>ee.id==="opencode"),[i,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[d,f]=T.useState("lmstudio"),p=Ev.find(ee=>ee.id===d)??nB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:y,model:x,contextWindow:b,error:j}=k,E=p.id==="ollama"?"":k.apiKey,N=ee=>{w(I=>({...I,[p.id]:{...I[p.id]??k,...ee}}))},A=pn({mutationFn:hur}),z=pn({mutationFn:async ee=>{var F;const I=await pur(ee);if(!((F=(await zf(!0)).find(q=>q.id==="opencode"))!=null&&F.models.some(q=>q.id===I.model)))throw new Error(cvt());return I}}),M=pn({mutationFn:gur}),D=Number(b),L=A.isPending||z.isPending,B=(ee={})=>N({models:[],model:null,error:null,...ee}),U=async()=>{B();try{const ee=await A.mutateAsync({baseUrl:v.trim(),apiKey:E});N({models:ee.models,model:ee.models[0]??null})}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}},H=async()=>{if(x){N({error:null});try{const ee=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:E,model:x,contextWindow:D});u(),n==null||n(ee.model)}catch(ee){N({error:ee instanceof Error?ee.message:String(ee)})}}},Q=async ee=>{try{await M.mutateAsync(ee)}catch(I){sn(I instanceof Error?I.message:String(I),"error")}};return _.jsxs(_.Fragment,{children:[!t&&_.jsxs("section",{className:"mt-4 space-y-3 border-t border-border pt-4","aria-label":wN(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:wN()}),_.jsxs(Me,{disabled:L,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Qf,{size:14}),jL()]})]}),s.error&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:s.error.message}),_.jsx("div",{className:"space-y-3",children:(Z=s.data)==null?void 0:Z.map(ee=>_.jsx(_mr,{connection:ee,harnessReady:(a==null?void 0:a.agentReady)??!1,availableModels:(a==null?void 0:a.models.map(I=>I.id))??[],checking:o.isFetching||((a==null?void 0:a.catalogPending)??!1),unknown:o.isError||!o.data,disabled:L||M.isPending,onRemove:()=>void Q(ee.id)},ee.id))})]}),i&&_.jsx(fmr,{busy:L,onClose:u,footer:_.jsxs(Me,{variant:"primary",disabled:L||!e||y.length>0&&(!x||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(y.length>0?H():U()),children:[L&&_.jsx(Ct,{}),y.length>0?Obt():G1t()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:mbt()}),_.jsx(Ih,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:ibt()})]}),_.jsx(Lc,{choices:Ev,value:d,title:xN(),header:xN(),variant:"field",floating:!0,dropDown:!0,disabled:L,renderLabel:ee=>_.jsxs(_.Fragment,{children:[ee.id==="openai-compatible"?zS():ee.label,ee.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CL()})]}),renderIcon:ee=>{var $;const I=($=Ev.find(F=>F.id===ee.id))==null?void 0:$.icon;return I?_.jsx("img",{src:I,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${ee.id==="ollama"?" dark:invert":""}`}):_.jsx(TI,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:L1t()}),_.jsx(qr,{value:v,disabled:L,onChange:ee=>{B({baseUrl:ee.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:VL()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?oyt():jbt()}),_.jsx(qr,{type:"password",autoComplete:"off",value:E,disabled:L,onChange:ee=>B({apiKey:ee.target.value})})]})]},p.id),y.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(Lc,{choices:y.map(ee=>({id:ee,label:ee})),value:x,searchPlaceholder:Owt(),title:Om(),header:Om(),variant:"field",floating:!0,dropDown:!0,disabled:L,onSelect:ee=>{N({model:ee})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:Cvt()}),_.jsx(qr,{type:"number",min:4096,step:1024,value:b,disabled:L,onChange:ee=>{N({contextWindow:ee.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:Dvt()})]}),j&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:j})]})})]})}function _mr({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:o,onRemove:a}){const i=pn({mutationFn:async()=>{try{await mur(e.id)}finally{await zf(!0)}}}),c=Ev.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),d=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=i.isPending||r,p=s,m=d;return _.jsxs("div",{className:"@container min-w-0 px-4 py-4",children:[_.jsxs("div",{className:"flex flex-col items-stretch gap-3 @sm:flex-row @sm:items-center @sm:justify-between",children:[_.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[c!=null&&c.icon?_.jsx("img",{src:c.icon,alt:"",width:20,height:20,className:`mt-0.5 size-5 shrink-0 object-contain${c.id==="ollama"?" dark:invert":""}`}):_.jsx(TI,{size:20,className:"mt-0.5 shrink-0"}),_.jsxs("div",{className:"min-w-0 space-y-1",children:[_.jsx("div",{className:"text-base font-medium break-words",children:u.join(", ")}),_.jsxs("div",{className:"text-sm text-subtext break-all",children:[(c==null?void 0:c.id)==="openai-compatible"?zS():(c==null?void 0:c.label)??e.name,(c==null?void 0:c.id)==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:CL()})," · ",e.baseUrl]})]})]}),_.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-1 self-end @sm:self-auto @lg:flex-row @lg:items-center @lg:gap-2",children:[_.jsx("span",{role:"status",children:_.jsx(Zt,{variant:f||p?"default":m?"success":"warning",children:f?La():p?o$():m?gvt():hi()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(Me,{variant:"ghost",disabled:o||i.isPending,onClick:()=>i.mutate(),children:[_.jsx(xi,{size:14}),tb()]}),_.jsx(Rt,{"aria-label":Zvt({name:e.name}),disabled:o||i.isPending,onClick:a,children:_.jsx(Yf,{size:14})})]})]})]}),i.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:i.error.message})]})}function fmr({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),o=()=>{e||n()};return sp(s,o,"input"),no.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:a=>{a.target===a.currentTarget&&o()},children:_.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-labelledby":"local-model-dialog-title",tabIndex:-1,className:"relative flex max-h-full w-140 max-w-full flex-col rounded-xl border border-border bg-background shadow-modal",children:[_.jsx("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:_.jsx("h2",{id:"local-model-dialog-title",className:"m-0 text-xl font-medium",children:jL()})}),_.jsx(Rt,{className:"absolute end-3.5 top-3.5","aria-label":Ef(),onClick:o,disabled:e,children:_.jsx(_r,{size:16})}),_.jsx("div",{className:"min-h-0 overflow-y-auto px-6 pb-2",children:r}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2 px-6 py-4",children:[_.jsx(Me,{onClick:o,disabled:e,children:Ef()}),t]})]})}),document.body)}const sB=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Iw=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),$u={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function dmr(e){var r,s;const n=e.find(o=>o.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:cb(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:uy(n,t).defaultId}}function sa(e){const[n,t]=T.useState(!1),r=T.useRef(null);return T.useEffect(()=>{if(!n)return;const s=a=>{var i,c;a.target instanceof Node&&!((i=r.current)!=null&&i.contains(a.target))&&!((c=e==null?void 0:e.current)!=null&&c.contains(a.target))&&t(!1)},o=a=>{var i;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(i=e==null?void 0:e.current)==null||i.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",o,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function hmr({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:o,reasoningChoices:a=[],defaultReasoningId:i,onSelectReasoning:c,autonomy:u,onSelectAutonomy:d,lockHarness:f=!1,openRequest:p=0,className:m}){var We,Oe,He,ht,xt,Vt,Ut,Ht;const{data:w=pmr}=dt(r_()),k=K0(),[v,y]=T.useState(!1),x=T.useRef(null),b=T.useRef(null),{open:j,setOpen:E,ref:N}=sa(x),[A,z]=T.useState(""),[M,D]=T.useState("root"),L=()=>{E(!1),D("root"),z("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),z(""),E(!0))},[p,E]),T.useEffect(()=>{var Ie;j&&(M==="reasoning"||M==="speed"||M==="permissions")&&((Ie=b.current)==null||Ie.focus())},[j,M]);const U=T.useMemo(()=>{const Ie=A.trim().toLowerCase();return(f&&e?w.filter(ct=>ct.id===e.harness):w).map(ct=>{let ye=ct.models;return Ie?ye=ye.filter(Be=>`${Be.id} ${wv(Be)}`.toLowerCase().includes(Ie)):(ct.id==="opencode"||ct.id==="cursor"||ct.id==="antigravity")&&(ye=ye.slice(0,5)),{harness:ct,models:ye,hidden:Ie?0:ct.models.length-ye.length}})},[w,A,f,e]),H=(Ie,it)=>{var ye;const ct=(e==null?void 0:e.harness)===Ie.id;n({harness:Ie.id,model:it,serviceTier:cb(Ie,it,ct?e==null?void 0:e.serviceTier:null),permissionMode:ct?e.permissionMode:((ye=Ie.options)==null?void 0:ye.defaultPermissionMode)??null,reasoningLevel:F$(Ie,it,ct&&Ie.models.some(Be=>Be.id===it)?e.reasoningLevel:null)}),L()},Q=(e==null?void 0:e.model)!=null?(We=w.find(Ie=>Ie.id===e.harness))==null?void 0:We.models.find(Ie=>Ie.id===e.model):void 0,V=e?e.model?Q?wv(Q):`${t3(e.model)} · ${CN()}`:P4():Om(),Z=(e==null?void 0:e.reasoningLevel)??i??((Oe=a[0])==null?void 0:Oe.id),ee=(He=a.find(Ie=>Ie.id===Z))==null?void 0:He.label,I=(e==null?void 0:e.permissionMode)??s??((ht=r[0])==null?void 0:ht.id),$=(xt=r.find(Ie=>Ie.id===I))==null?void 0:xt.label,F=(e==null?void 0:e.harness)==="opencode"?Pkt():L2t(),q=w.find(Ie=>Ie.id===(e==null?void 0:e.harness)),K=P$(q,e==null?void 0:e.model),oe=cb(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Vt=K.find(Ie=>Ie.id===oe))==null?void 0:Vt.label,ce=Ie=>{c==null||c(Ie),L()},ne=Ie=>{o==null||o(Ie),L()},G=[{id:"agentic",label:yxt(),description:zxt()},{id:"copilot",label:Ixt(),description:Vxt()}],ae=(Ut=G.find(Ie=>Ie.id===u))==null?void 0:Ut.label,le=Ie=>{const it=G.find(ct=>ct.id===Ie);it&&(d==null||d(it.id)),L()},me=Ie=>{e&&n({...e,serviceTier:Ie}),L()},ve=(Ie,it,ct)=>_.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>D(ct),children:[_.jsx("span",{className:"flex-1",children:Ie}),it&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:it}),_.jsx(yi,{size:14,className:"shrink-0 text-muted"})]}),Ce=Ie=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx(Rt,{ref:b,type:"button",size:"small",className:"model-submenu-header","aria-label":$L(),onClick:()=>{D("root"),z("")},children:_.jsx(jI,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Ie}),M==="models"&&_.jsx(Rt,{type:"button",size:"small","aria-label":Q4(),onClick:()=>{L(),t()},children:_.jsx(hy,{size:15,"aria-hidden":"true"})})]}),Fe=(Ie,it,ct,ye)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Ie.map(Be=>_.jsxs(un,{onClick:()=>ye(Be.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[Be.label,Be.id===ct&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",EL()]})]}),Be.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Be.description})]}),Be.id===it&&_.jsx(to,{size:13})]},Be.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:N,children:[_.jsxs("button",{ref:x,type:"button",className:Is("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",m),title:dY({label:`${V}${ee?` · ${ee}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":j,onClick:()=>{j?L():(D("root"),E(!0))},children:[oe==="priority"?_.jsx(hpr,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Ph,{harness:e.harness,size:14}):null,oe==="priority"&&_.jsxs("span",{className:"sr-only",children:[G2t()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[V,ee&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:ee})]}),_.jsx(qc,{size:14,className:"shrink-0 text-muted"})]}),j&&_.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[M==="root"&&_.jsxs("div",{className:"model-root-menu p-1",children:[ve(Om(),V,"models"),a.length>0&&ve(F,ee,"reasoning"),K.length>0&&ve(jN(),ie,"speed"),r.length>0&&ve(SN(),$,"permissions"),d&&ve(kN(),ae,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Ce(Om()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:qwt(),value:A,onChange:Ie=>z(Ie.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[U.map(({harness:Ie,models:it,hidden:ct})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:sB,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Ph,{harness:Ie.id,size:14}),Ie.name]}),!Ie.agentReady&&_.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Ie.catalogPending?Cf():_.jsxs(_.Fragment,{children:[_.jsx(Fz,{size:10})," ",hi()]})})]}),Ie.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(un,{onClick:()=>H(Ie,null),children:[_.jsx("span",{children:P4()}),(e==null?void 0:e.harness)===Ie.id&&(e==null?void 0:e.model)===null&&_.jsx(to,{size:13})]}),Ie.models.length===0&&Ie.agentNote&&_.jsx("div",{className:Iw,children:s_(Ie.agentNote)}),it.map(ye=>_.jsxs(un,{title:ye.id,onClick:()=>H(Ie,ye.id),children:[_.jsx("span",{children:wv(ye)}),(e==null?void 0:e.harness)===Ie.id&&(e==null?void 0:e.model)===ye.id&&_.jsx(to,{size:13})]},ye.id)),A.trim().length>0&&!Ie.models.some(ye=>ye.id===A.trim())&&_.jsx(un,{onClick:()=>H(Ie,A.trim()),children:_.jsxs("span",{children:[Tkt({id:Ae(A.trim())})," · ",CN()]})})]}):_.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:Ie.catalogPending?Cf():Ie.agentNote?s_(Ie.agentNote):jwt()}),Ie.id==="opencode"&&_.jsx(un,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ye;L(),(ye=x.current)==null||ye.focus(),y(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[rxt(),_.jsx(Qf,{size:14,"aria-hidden":"true"})]})}),Ie.agentReady&&ct>0&&_.jsx("div",{className:Iw,children:mwt({count:_n(ct)})})]},Ie.id)),w.length===0&&_.jsx("div",{className:Iw,children:E2t()})]}),f&&e&&w.length>1&&_.jsxs("div",{className:"model-locked-note py-[7px] px-3 text-sm text-muted border-t border-t-border-variant",children:[_.jsx(Fz,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Zwt()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Ce(F),Fe(a,Z,i,ce)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Ce(SN()),Fe(r,I,s,ne)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Ce(kN()),Fe(G,u,Z4,le)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Ce(jN()),Fe(K,oe??void 0,"default",me)]})]}),v&&_.jsx(rB,{dialogOnly:!0,installed:((Ht=w.find(Ie=>Ie.id==="opencode"))==null?void 0:Ht.installed)??!1,onClose:()=>y(!1),onConnected:Ie=>{var ct;const it=(ct=k.getQueryData(r_().queryKey))==null?void 0:ct.find(ye=>ye.id==="opencode");it&&(!f||(e==null?void 0:e.harness)==="opencode")&&H(it,Ie)}})]})}function Lc({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:o=!1,disabled:a=!1,variant:i="pill",title:c,numbered:u=!1,searchPlaceholder:d,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,V;const v=T.useRef(null),{open:y,setOpen:x,ref:b}=sa(v),j=T.useRef(null),[E,N]=T.useState("");if(T.useLayoutEffect(()=>{var $;const Z=j.current,ee=b.current;if(!y||!m||!Z||!ee)return;Z.matches(":popover-open")||(Z.showPopover(),($=Z.querySelector("input"))==null||$.focus());const I=()=>{const F=ee.getBoundingClientRect(),q=window.innerHeight-F.bottom-12,K=F.top-12,oe=Math.min(380,Z.scrollHeight),ie=o?q>=oe||q>=K:KK;Z.style.width=`${F.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,ie?q:K))}px`,Z.style.left=`${F.left}px`,Z.style.top=`${ie?F.bottom+4:F.top-Z.getBoundingClientRect().height-4}px`};return I(),window.addEventListener("resize",I),window.addEventListener("scroll",I,!0),()=>{window.removeEventListener("resize",I),window.removeEventListener("scroll",I,!0)}},[y,m,o,E,e.length,b]),e.length===0)return null;const A=n??t??((Q=e[0])==null?void 0:Q.id)??null,z=e.find(Z=>Z.id===A),M=e.find(Z=>Z.id===t),D=i==="bare"&&(M==null?void 0:M.id)===ib?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(E.toLowerCase())),U=(z==null?void 0:z.label)??((V=e[0])==null?void 0:V.label)??"",H=Z=>{var ee;w(Z),x(!1),(ee=v.current)==null||ee.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${i==="field"?" w-full":""}`,ref:b,children:[_.jsxs("button",{ref:v,type:"button",className:Is(i==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${i==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,k),title:c,"aria-haspopup":"menu","aria-expanded":y,disabled:a,onClick:()=>{N(""),x(Z=>!Z)},children:[_.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[z&&(f==null?void 0:f(z)),_.jsx("span",{className:"truncate",children:z?(p==null?void 0:p(z))??U:U})]}),_.jsx(qc,{size:12})]}),y&&_.jsxs("div",{ref:j,popover:m?"manual":void 0,style:m?{position:"fixed",inset:"auto",margin:0}:void 0,className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(Z=>Z.description)?"min-w-80":""} ${i==="field"?"min-w-full text-text":""} ${s==="right"?"align-right":""} ${o?"drop-down":""}`,children:[r&&_.jsx("div",{className:sB,children:r}),d&&_.jsx("input",{autoFocus:!0,"aria-label":d,placeholder:d,value:E,onChange:Z=>N(Z.target.value),className:"shrink-0 border-b border-border bg-background px-2 py-2 text-sm outline-none"}),_.jsxs("div",{className:"min-h-0 overflow-y-auto",children:[D&&_.jsxs(_.Fragment,{children:[_.jsxs(un,{type:"button",onClick:()=>H(D.id),children:[_.jsxs("span",{className:"inline-flex items-center gap-2",children:[f==null?void 0:f(D),_.jsxs("span",{children:[(p==null?void 0:p(D))??D.label,_.jsx("span",{className:"option-default text-muted font-normal",children:n2t()})]})]}),A===D.id&&_.jsx(to,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,ee)=>_.jsxs(un,{type:"button",onClick:()=>H(Z.id),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[f==null?void 0:f(Z),_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[(p==null?void 0:p(Z))??Z.label,!D&&Z.id===t&&_.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",EL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(to,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:ee+1})]},Z.id))]})]})]})}const pmr=[];function S3({runtime:e,corner:n=!1}){const[t,r]=T.useState(!1),[s,o]=T.useState(!1),[a,i]=T.useState(!1),[c,u]=T.useState(null),d=sa();async function f(){if(c){i(!0);try{await L$(c),u(null)}catch(p){u(null),sn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}}}return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:d.ref,children:[d.open&&_.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[_.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[_.jsx("div",{className:"text-sm font-medium text-text",children:gKt({host:Ae(e.session.host),user:Ae(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(un,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await O$(),d.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?cKt():V4()}),_.jsx(eg,{content:FQt(),className:"me-2 shrink-0 text-subtext",children:_.jsx(WS,{size:15})})]}),_.jsx(un,{danger:!0,disabled:s,onClick:async()=>{o(!0);try{u(await D$()),d.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}},children:PL()})]}),n?_.jsxs(Me,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:[_.jsx(mb,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:jw({host:Ae(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(Rt,{size:"small","aria-label":jw({host:Ae(e.session.host)}),"aria-haspopup":"menu","aria-expanded":d.open,onClick:()=>d.setOpen(p=>!p),children:_.jsx(mb,{size:14,className:"shrink-0"})}),_.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[_.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:jw({host:Ae(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ae(e.session.version??"…")]})]})]})]}),c&&_.jsx(xI,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const gb="code-source-text",oB="code-source-wrap",aB="file-view-gutter text-right text-muted select-none";function iB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const mmr={cjs:"javascript",console:"bash",cts:"typescript",fish:"bash",html:"markup",js:"javascript",jsx:"javascript",md:"markdown",mjs:"javascript",mts:"typescript",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"markup",terminal:"bash",ts:"typescript",tsx:"typescript",xml:"markup",yml:"yaml",zsh:"bash"},gmr={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function j3(e){const n=e.trim().toLowerCase();return mmr[n]??n}function i6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=gmr[n];if(t)return j3(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:j3(n.slice(r+1))}Uc.displayName="clike";Uc.aliases=[];function Uc(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}rg.displayName="c";rg.aliases=[];function rg(e){e.register(Uc),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}xy.displayName="cpp";xy.aliases=[];function xy(e){e.register(rg),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}c6.displayName="arduino";c6.aliases=["ino"];function c6(e){e.register(xy),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}l6.displayName="bash";l6.aliases=["sh","shell"];function l6(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,i=0;i>/g,function(q,K){return"(?:"+F[+K]+")"})}function r($,F,q){return RegExp(t($,F),"")}function s($,F){for(var q=0;q>/g,function(){return"(?:"+$+")"});return $.replace(/<>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a($){return"\\b(?:"+$.trim().replace(/ /g,"|")+")\\b"}var i=a(o.typeDeclaration),c=RegExp(a(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),u=a(o.typeDeclaration+" "+o.contextual+" "+o.other),d=a(o.type+" "+o.typeDeclaration+" "+o.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,w=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,w]),v=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),b=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),j=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[b,k,v]),E={keyword:c,punctuation:/[<>()?,.:[\]]/},N=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,A=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,j]),lookbehind:!0,inside:E},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[i,w]),lookbehind:!0,inside:E},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:E},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:E},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[j,d,m]),inside:E}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[j,k]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[j]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:E}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[i,w,m,j,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[w,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(j),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=A+"|"+N,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),L=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,L]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[L]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,H]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ee=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,H]);function I($,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[$]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[V]),lookbehind:!0,greedy:!0,inside:I(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ee]),lookbehind:!0,greedy:!0,inside:I(ee,Z)}],char:{pattern:RegExp(N),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}sg.displayName="markup";sg.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function sg(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:s}};o["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}ap.displayName="css";ap.aliases=[];function ap(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}_6.displayName="diff";_6.aliases=[];function _6(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],o=[];/^\w+$/.test(r)||o.push(/\w+/.exec(r)[0]),r==="diff"&&o.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| |(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}f6.displayName="go";f6.aliases=[];function f6(e){e.register(Uc),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}d6.displayName="ini";d6.aliases=[];function d6(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}h6.displayName="java";h6.aliases=[];function h6(e){e.register(Uc),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}p6.displayName="regex";p6.aliases=[];function p6(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+r.source+")",i=RegExp(a+"-"+a),c={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":o,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":c}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}m6.displayName="json";m6.aliases=["webmanifest"];function m6(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}g6.displayName="kotlin";g6.aliases=["kt","kts"];function g6(e){e.register(Uc),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}v6.displayName="less";v6.aliases=[];function v6(e){e.register(ap),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}b6.displayName="lua";b6.aliases=[];function b6(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}y6.displayName="makefile";y6.aliases=[];function y6(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}x6.displayName="yaml";x6.aliases=["yml"];function x6(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(c,u){u=(u||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(d,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+o+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}w6.displayName="markdown";w6.aliases=["md"];function w6(e){e.register(sg),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(i){return i=i.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+i+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(i){["url","bold","italic","strike","code-snippet"].forEach(function(c){i!==c&&(n.languages.markdown[i].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(i){if(i.language!=="markdown"&&i.language!=="md")return;function c(u){if(!(!u||typeof u=="string"))for(var d=0,f=u.length;d]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}S6.displayName="perl";S6.aliases=[];function S6(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}ky.displayName="markup-templating";ky.aliases=[];function ky(e){e.register(sg),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,o,a){if(r.language===s){var i=r.tokenStack=[];r.code=r.code.replace(o,function(c){if(typeof a=="function"&&!a(c))return c;for(var u=i.length,d;r.code.indexOf(d=t(s,u))!==-1;)++u;return i[u]=c,d}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var o=0,a=Object.keys(r.tokenStack);function i(c){for(var u=0;u=a.length);u++){var d=c[u];if(typeof d=="string"||d.content&&typeof d.content=="string"){var f=a[o],p=r.tokenStack[f],m=typeof d=="string"?d:d.content,w=t(s,f),k=m.indexOf(w);if(k>-1){++o;var v=m.substring(0,k),y=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),x=m.substring(k+w.length),b=[];v&&b.push.apply(b,i([v])),b.push(y),x&&b.push.apply(b,i([x])),typeof d=="string"?c.splice.apply(c,[u,1].concat(b)):d.content=b}}else d.content&&i(d.content)}return c}i(r.tokens)}}})})(e)}j6.displayName="php";j6.aliases=[];function j6(e){e.register(ky),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:o,punctuation:a};var i={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},c=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:i}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:i}}];n.languages.insertBefore("php","variable",{string:c,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:c,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:o,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var d=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",d)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}C6.displayName="python";C6.aliases=["py"];function C6(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}E6.displayName="r";E6.aliases=[];function E6(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}N6.displayName="ruby";N6.aliases=["rb"];function N6(e){e.register(Uc),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}z6.displayName="rust";z6.aliases=[];function z6(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}A6.displayName="sass";A6.aliases=[];function A6(e){e.register(ap),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}T6.displayName="scss";T6.aliases=[];function T6(e){e.register(ap),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}R6.displayName="sql";R6.aliases=[];function R6(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}M6.displayName="swift";M6.aliases=[];function M6(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}O6.displayName="typescript";O6.aliases=["ts"];function O6(e){e.register(wy),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}Sy.displayName="basic";Sy.aliases=[];function Sy(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}D6.displayName="vbnet";D6.aliases=[];function D6(e){e.register(Sy),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class og{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}og.prototype.normal={};og.prototype.property={};og.prototype.space=void 0;function cB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new og(t,r,n)}function a0(e){return e.toLowerCase()}class oa{constructor(n,t){this.attribute=t,this.property=n}}oa.prototype.attribute="";oa.prototype.booleanish=!1;oa.prototype.boolean=!1;oa.prototype.commaOrSpaceSeparated=!1;oa.prototype.commaSeparated=!1;oa.prototype.defined=!1;oa.prototype.mustUseProperty=!1;oa.prototype.number=!1;oa.prototype.overloadedBoolean=!1;oa.prototype.property="";oa.prototype.spaceSeparated=!1;oa.prototype.space=void 0;let vmr=0;const on=Jf(),xs=Jf(),C3=Jf(),Je=Jf(),xr=Jf(),yf=Jf(),Sa=Jf();function Jf(){return 2**++vmr}const E3=Object.freeze(Object.defineProperty({__proto__:null,boolean:on,booleanish:xs,commaOrSpaceSeparated:Sa,commaSeparated:yf,number:Je,overloadedBoolean:C3,spaceSeparated:xr},Symbol.toStringTag,{value:"Module"})),Bw=Object.keys(E3);class L6 extends oa{constructor(n,t,r,s){let o=-1;if(super(n,t),rA(this,"space",s),typeof r=="number")for(;++o4&&t.slice(0,4)==="data"&&kmr.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(sA,jmr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!sA.test(o)){let a=o.replace(wmr,Smr);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=L6}return new s(r,n)}function Smr(e){return"-"+e.toLowerCase()}function jmr(e){return e.charAt(1).toUpperCase()}const mB=cB([lB,bmr,fB,dB,hB],"html"),jy=cB([lB,ymr,fB,dB,hB],"svg");function oA(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,o=!1;for(;!o;){r===-1&&(r=t.length,o=!0);const a=t.slice(s,r).trim();(a||!o)&&n.push(a),s=r+1,r=t.indexOf(",",s)}return n}function Cmr(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const aA=/[#.]/g;function Emr(e,n){const t=e||"",r={};let s=0,o,a;for(;s=48&&n<=57}function Lmr(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function $mr(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function uA(e){return $mr(e)||bB(e)}const _A=document.createElement("i");function i0(e){const n="&"+e+";";_A.innerHTML=n;const t=_A.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const Imr=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Bmr(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let o=0,a=-1,i="",c,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,c=t.position.start):c=t.position);let d=(c?c.line:0)||1,f=(c?c.column:0)||1,p=w(),m;for(o--;++o<=e.length;)if(m===10&&(f=(u?u[a]:0)||1),m=e.charCodeAt(o),m===38){const y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){i+=String.fromCharCode(m),f++;continue}const x=o+1;let b=x,j=x,E;if(y===35){j=++b;const U=e.charCodeAt(j);U===88||U===120?(E="hexadecimal",j=++b):E="decimal"}else E="named";let N="",A="",z="";const M=E==="named"?uA:E==="decimal"?bB:Lmr;for(j--;++j<=e.length;){const U=e.charCodeAt(j);if(!M(U))break;z+=String.fromCharCode(U),E==="named"&&Dmr.includes(z)&&(N=z,A=i0(z))}let D=e.charCodeAt(j)===59;if(D){j++;const U=E==="named"?i0(z):!1;U&&(N=z,A=U)}let L=1+j-x,B="";if(!(!D&&t.nonTerminated===!1))if(!z)E!=="named"&&k(4,L);else if(E==="named"){if(D&&!A)k(5,1);else if(N!==z&&(j=b+N.length,L=1+j-b,D=!1),!D){const U=N?1:3;if(t.attribute){const H=e.charCodeAt(j);H===61?(k(U,L),A=""):uA(H)?A="":k(U,L)}else k(U,L)}B=A}else{D||k(2,L);let U=Number.parseInt(z,E==="hexadecimal"?16:10);if(Pmr(U))k(7,L),B="�";else if(U in lA)k(6,L),B=lA[U];else{let H="";Fmr(U)&&k(6,L),U>65535&&(U-=65536,H+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),B=H+String.fromCharCode(U)}}if(B){v(),p=w(),o=j-1,f+=j-x+1,s.push(B);const U=w();U.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:U},e.slice(x-1,j)),p=U}else z=e.slice(x-1,j),i+=z,f+=z.length,o=j-1}else m===10&&(d++,a++,f=0),Number.isNaN(m)?v():(i+=String.fromCharCode(m),f++);return s.join("");function w(){return{line:d,column:f,offset:o+((c?c.offset:0)||0)}}function k(y,x){let b;t.warning&&(b=w(),b.column+=x,b.offset+=x,t.warning.call(t.warningContext||void 0,Imr[y],b,y))}function v(){i&&(s.push(i),t.text&&t.text.call(t.textContext||void 0,i,{start:p,end:w()}),i="")}}function Pmr(e){return e>=55296&&e<=57343||e>1114111}function Fmr(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var Hmr=0,L1={},Ks={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Hmr}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Ks.util.type(n)){case"Object":if(s=Ks.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var o in n)n.hasOwnProperty(o)&&(r[o]=e(n[o],t));return r;case"Array":return s=Ks.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(a,i){r[i]=e(a,t)}),r);default:return n}}},languages:{plain:L1,plaintext:L1,text:L1,txt:L1,extend:function(e,n){var t=Ks.util.clone(Ks.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Ks.languages;var s=r[e],o={};for(var a in s)if(s.hasOwnProperty(a)){if(a==n)for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);t.hasOwnProperty(a)||(o[a]=s[a])}var c=r[e];return r[e]=o,Ks.languages.DFS(Ks.languages,function(u,d){d===c&&u!=e&&(this[u]=o)}),o},DFS:function e(n,t,r,s){s=s||{};var o=Ks.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var i=n[a],c=Ks.util.type(i);c==="Object"&&!s[o(i)]?(s[o(i)]=!0,e(i,t,null,s)):c==="Array"&&!s[o(i)]&&(s[o(i)]=!0,e(i,t,a,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Ks.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Ks.tokenize(r.code,r.grammar),Ks.hooks.run("after-tokenize",r),Lm.stringify(Ks.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new qmr;return Nv(s,s.head,e),yB(e,s,n,s.head,0),Gmr(s)},hooks:{all:{},add:function(e,n){var t=Ks.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Ks.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Lm};function Lm(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function fA(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var o=s[1].length;s.index+=o,s[0]=s[0].slice(o)}return s}function yB(e,n,t,r,s,o){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var i=t[a];i=Array.isArray(i)?i:[i];for(var c=0;c=o.reach);y+=v.value.length,v=v.next){var x=v.value;if(n.length>e.length)return;if(!(x instanceof Lm)){var b=1,j;if(p){if(j=fA(k,y,e,f),!j||j.index>=e.length)break;var z=j.index,E=j.index+j[0].length,N=y;for(N+=v.value.length;z>=N;)v=v.next,N+=v.value.length;if(N-=v.value.length,y=N,v.value instanceof Lm)continue;for(var A=v;A!==n.tail&&(No.reach&&(o.reach=B);var U=v.prev;D&&(U=Nv(n,U,D),y+=D.length),Umr(n,U,b);var H=new Lm(a,d?Ks.tokenize(M,d):M,m,M);if(v=Nv(n,U,H),L&&Nv(n,v,L),b>1){var Q={cause:a+","+c,reach:B};yB(e,n,t,v.prev,y,Q),o&&Q.reach>o.reach&&(o.reach=Q.reach)}}}}}}function qmr(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function Nv(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function Umr(e,n,t){for(var r=n.next,s=0;st)return null;try{return Ft.highlight(e,n).children}catch{return null}}function SB(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:_.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(SB)},n)}function Jmr(e,n,t=3e5){var r;return((r=kB(e,n,t))==null?void 0:r.map(SB))??e}function jB(e,n,t=3e5){const r=kB(e,n,t);if(!r)return e.split(` `);const s=[];let o=[];const a=[];let i=0;const c=d=>{let f=d;for(let p=a.length-1;p>=0;p--)f=_.jsx("span",{className:a[p],children:f},i++);o.push(f)},u=d=>{var f;if(d.type==="text"){(d.value??"").split(` @@ -1141,7 +1141,7 @@ ${n.trim()} ${J.error}`:J.text,children:[J.dispatchState==="blocked"?_.jsx(ZS,{size:13,className:"shrink-0 text-accent-amber"}):_.jsx(Cdr,{size:13,className:"shrink-0 text-muted"}),_.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:J.text}),J.dispatchState!=="blocked"&&_.jsx("span",{className:"shrink-0 text-sm text-muted",children:J.dispatchState==="retrying"?zwr(J.nextRetryAt,bp):wDe()}),J.dispatchState==="blocked"?_.jsxs(_.Fragment,{children:[_.jsx("button",{onClick:()=>void ld(J.id),"aria-label":ete({text:J.text}),disabled:yo!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:yo===J.id?FL():Vs()}),_.jsx("button",{onClick:()=>al(J.id),"aria-label":Gee({text:J.text}),disabled:yo!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:cze()}),he===w_&&heal(J.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:_.jsx(_r,{size:11})})]},J.id))}),E_&&_.jsxs("div",{id:rl,role:"note",className:`composer-demo-hint ${lM}`,children:[_.jsx(Bh,{size:16,className:"shrink-0 text-primary"}),_.jsx("span",{className:"flex-1",dir:"auto",children:TCe()}),_.jsx(Rt,{size:"small","aria-label":k1(),title:k1(),onClick:()=>{var J;Bn(!0),(J=br.current)==null||J.focus()},children:_.jsx(_r,{size:14})})]}),E&&!gr&&p&&_.jsxs("div",{role:"note",className:`composer-demo-run-hint ${lM}`,children:[_.jsx(Bh,{size:16,className:"shrink-0 text-primary"}),_.jsxs("span",{className:"flex flex-1 flex-wrap items-center gap-x-1.5 gap-y-1",dir:"auto",children:[_.jsx("span",{children:LE()}),_.jsxs(Me,{size:"small",onClick:()=>p(E,"keepOpen"),children:[_.jsx(Vi,{size:14}),I4()]}),_.jsx("span",{children:DE()})]}),_.jsx(Rt,{size:"small","aria-label":k1(),title:k1(),onClick:()=>{var J;Gr(!0),(J=br.current)==null||J.focus()},children:_.jsx(_r,{size:14})})]}),_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:E?`${LE()} ${I4()} ${DE()}`:""}),!B&&!ze&&c&&_.jsx(ewr,{projects:ie,activity:ce,projectId:e,projectName:n,onNewProject:c,onSelect:J=>{J!==e&&oe({to:"/projects/$projectId/tasks/new",params:{projectId:J}})}}),_.jsxs("div",{className:`composer-box relative flex flex-col border ${Ho?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[ft&&!ft.agentReady&&_.jsx("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:ft.catalogPending?_.jsxs("span",{children:[ft.name," — ",Cf()]}):_.jsxs(_.Fragment,{children:[_.jsxs("strong",{children:[ft.name," ",T8e()]})," ",ft.agentNote?s_(ft.agentNote):BDe()]})}),ec&&_.jsx(Pjr,{skills:ao,activeIndex:ki,onPick:Ar,onHover:Ka}),ko&&_.jsx(Gjr,{activeSessionId:ze,onClose:()=>ca(!1),onResume:J=>{ca(!1),ve("all"),A(J.id,{projectId:J.projectId})},onImport:J=>{ca(!1),ad(J)}}),en.length>0&&_.jsx(pCr,{annotations:en,onClear:()=>{Kn([]),window.requestAnimationFrame(()=>{var J;return(J=br.current)==null?void 0:J.focus()})},onRemove:J=>{const he=en.filter(Se=>Se.id!==J);Kn(he),he.length===0&&window.requestAnimationFrame(()=>{var Se;return(Se=br.current)==null?void 0:Se.focus()})}}),fn.length>0&&_.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:fn.map((J,he)=>{const Se=()=>yn(xe=>xe.filter((Le,kt)=>kt!==he));return J.mediaType==="application/pdf"?_.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:J.name,children:[_.jsx(fy,{size:22}),_.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:J.name??"document.pdf"}),_.jsx("button",{title:KE(),"aria-label":KE(),onClick:Se,children:_.jsx(_r,{size:11})})]},he):_.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[_.jsx("img",{src:J.dataUrl,alt:uL()}),_.jsx("button",{title:VE(),"aria-label":VE(),onClick:Se,children:_.jsx(_r,{size:11})})]},he)})}),Tn&&_.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Tn}),rs&&_.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:rs}),_.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Ho?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[_.jsx("textarea",{dir:"auto",ref:br,"aria-describedby":E_?rl:void 0,className:"relative z-1 bg-transparent",value:nn,placeholder:jo?cBe():rc&&ft?tIe({harness:Ae($u[ft.id]),shortcut:Ae(wp)}):gn?ft!=null&&ft.agentReady?Xke({harness:Ae($u[gn.harness])}):Rke({harness:Ae($u[gn.harness])}):Dye(),rows:2,onPaste:v_,onDragOver:J=>{J.dataTransfer.types.includes("Files")&&J.preventDefault()},onDrop:J=>{J.dataTransfer.files.length!==0&&(J.preventDefault(),Zc(Array.from(J.dataTransfer.files)))},onChange:J=>{const he=J.target.value,Se=J.target.selectionStart;jr(Se);const xe=Se>0&&/\s/.test(he[Se-1])&&!jo&&!_s.current&&XR(he)===null?Mk(he,Se-1):null,Le=xe&&E5(xe.query),kt=xe?(he.slice(0,xe.start)+he.slice(xe.end)).trim():"";if(xe&&Le&&(Le==="plan"||!Ok(Le)&&!kt)&&da.some(vt=>vt.name===Le)){x_(Le,he,xe);return}Et(he),Ws(!1)},onSelect:J=>jr(J.currentTarget.selectionStart),onCompositionStart:()=>{_s.current=!0},onCompositionEnd:()=>{_s.current=!1},onKeyDown:J=>{if(ec){if(J.key==="ArrowDown"||J.key==="ArrowUp"){J.preventDefault();const he=J.key==="ArrowDown"?1:-1;Ka((ki+he+ao.length)%ao.length);return}if(J.key==="Tab"||J.key==="Enter"){J.preventDefault(),Ar(ao[ki]);return}if(J.key==="Escape"){J.preventDefault(),Ws(!0);return}}if(J.key==="Backspace"&&fa(J.currentTarget)){J.preventDefault();return}if(J.key==="Enter"&&!J.shiftKey&&!J.nativeEvent.isComposing){if(J.preventDefault(),Ho){Rs();return}iu({queue:J.metaKey||J.ctrlKey})}}}),_.jsx(Bjr,{text:nn,editingTokenEnd:fs==null?void 0:fs.end,isCommand:Ei,skills:da,projectId:e,textareaRef:br})]}),_.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[_.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Ua.ref,children:[_.jsx(Rt,{type:"button",className:"composer-bare",title:yw(),"aria-label":yw(),"aria-haspopup":"dialog","aria-expanded":Ua.open,onClick:()=>Ua.setOpen(J=>!J),children:_.jsx(spr,{size:16})}),Ua.open&&_.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[_.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:yw()}),_.jsx(Kwr,{})]})]}),_.jsx("input",{ref:mt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:J=>{Zc(Array.from(J.target.files??[])),J.target.value=""}}),_.jsx(Rt,{type:"button",className:"composer-attach",title:AE(),"aria-label":AE(),onClick:()=>{var J;return(J=mt.current)==null?void 0:J.click()},children:_.jsx(Lhr,{size:16})}),ha&&_.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:OE({goal:Ml(ha)}),"aria-label":OE({goal:Ml(ha)}),onClick:()=>void tu("clear"),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(AI,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),_.jsx("span",{className:"truncate",children:w8e()})]}),Si&&_.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:PE(),"aria-label":PE(),onClick:()=>void mp(),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(_hr,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),_.jsx("span",{children:lEe()})]}),Ho&&_.jsxs(Me,{type:"button",variant:"ghost",active:!0,className:"group",title:BE(),"aria-label":BE(),onClick:sl,children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Xf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(_r,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),_.jsx("span",{children:aL()})]}),_.jsx("div",{className:"min-w-0 flex-1"}),_.jsxs("div",{className:"flex min-w-0 items-center",children:[_.jsx(hmr,{value:gn,onSelect:Jc,onOpenSettings:()=>d("harnesses"),permissionChoices:ft!=null&&ft.agentReady?(Qt==null?void 0:Qt.permissionModes)??[]:[],defaultPermissionId:(Qt==null?void 0:Qt.defaultPermissionMode)??null,onSelectPermission:Bo,reasoningChoices:ft!=null&&ft.agentReady?eu.choices:[],defaultReasoningId:eu.defaultId,onSelectReasoning:sd,autonomy:(Dt==null?void 0:Dt.autonomy)??D,onSelectAutonomy:wn,lockHarness:!!Dt,openRequest:_a}),_.jsx(Hjr,{usage:Dt==null?void 0:Dt.contextUsage})]}),dr&&!jo?_.jsx(Rt,{className:"send-btn",variant:"stop",title:ZE(),"aria-label":ZE(),onClick:Ms,children:_.jsx(_r,{size:16})}):_.jsx(Rt,{className:`send-btn ${E_&&(ft!=null&&ft.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Ho?QE():L4(),"aria-label":Ho?QE():L4(),onClick:()=>void(Ho?Rs():iu()),disabled:Ho?!wi||!ze&&!(ft!=null&&ft.agentReady):!(ft!=null&&ft.agentReady)||!nn.trim()&&fn.length===0&&en.length===0,children:_.jsx(NI,{size:16})})]})]})]})]})]})}const lM="flex items-center gap-2.5 mb-2.5 py-2 ps-3.5 pe-2 rounded-lg border border-border bg-surface text-text text-sm leading-normal",d7r=[],h7r=[];function Ca({className:e,...n}){return _.jsx("div",{className:Is("relative flex min-h-0 flex-1 flex-col",e),...n})}function dh({className:e,...n}){return _.jsx("div",{className:Is("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Nc({className:e,...n}){return _.jsx("div",{className:Is("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const uM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function p7r({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:o,onOpenExperiment:a,experimentName:i,onOpenSubagent:c}){var k;const u=dt(Rc(n)),d=((k=u.data)==null?void 0:k.messages)??(u.isError?[]:null),f=T.useRef(null),p=T.useRef(null),m=T.useRef(!0);if(T.useLayoutEffect(()=>{m.current=!0;const v=f.current;v&&(v.scrollTop=v.scrollHeight)},[n,t]),T.useLayoutEffect(()=>{const v=f.current;v&&m.current&&(v.scrollTop=v.scrollHeight)},[d]),T.useEffect(()=>{const v=f.current,y=p.current;if(!v||!y)return;const x=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return x.observe(y),x.observe(v),()=>x.disconnect()},[d===null]),d===null)return _.jsx(Ca,{children:_.jsx("div",{className:uM,children:_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:g$()})})});let w=null;for(const v of d)if(w=Ib(v.parts,t),w)break;return _.jsx(Ca,{children:_.jsx("div",{className:uM,ref:f,onScroll:v=>{const y=v.currentTarget;m.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:_.jsx("div",{ref:p,children:w?_.jsx(tq,{projectId:e,sessionId:n,children:_.jsx(JCr,{spawn:w,onOpenFile:r,onOpenRun:s,runExperimentName:o,onOpenExperiment:a,experimentName:i,onOpenSubagent:c})}):_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:OWn()})})})})}function m7r({experiment:e}){var s;const n=dt(IB(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return _.jsx(dh,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?_.jsxs(Nc,{children:[bbe()," ",Ae(r)]}):t?t.diff.trim()?_.jsxs(_.Fragment,{children:[t.truncated&&_.jsx(SP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),_.jsx(CP,{diff:t.diff,partial:t.truncated})]}):_.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?$be():ube()}):_.jsx(Nc,{children:Nbe()})})}function Iq({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:o,githubTitle:a,refreshing:i,onRefresh:c}){return _.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&_.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":XPe(),children:[_.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:oFe()}),_.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:dL()})]}),r&&_.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[_.jsx(ng,{size:12}),_.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),o&&_.jsx(rp,{href:o,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:_.jsx(J6,{size:13})}),_.jsx("span",{className:"flex-1"}),_.jsx(Rt,{title:rN(),"aria-label":rN(),onClick:c,children:i?_.jsx(Ct,{}):_.jsx(Ghr,{size:13})})]})}const g7r=/\.(md|mdx|markdown)$/i,v7r=/\.tex$/i,b7r=/\.html?$/i,y7r=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,x7r=/\.(csv|tsv|xlsx?|ods)$/i,w7r=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,k7r=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,S7r=/\.pdf$/i,j7r=/\.(docx?|log|rtf|txt)$/i;function C7r(e){return y7r.test(e)}function Kj(e){return g7r.test(e)}function Bq(e){return v7r.test(e)}function E7r(e){return b7r.test(e)}function Wh({name:e}){const n=Kj(e)?"markdown":C7r(e)?"image":x7r.test(e)?"spreadsheet":w7r.test(e)?"code":k7r.test(e)?"archive":S7r.test(e)?"pdf":j7r.test(e)||Bq(e)?"document":"file";let t;return n==="markdown"?t=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),_.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=_.jsxs(_.Fragment,{children:[_.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),_.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),_.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=_.jsxs(_.Fragment,{children:[_.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),_.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=_.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),_.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=_.jsxs(_.Fragment,{children:[_.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),_.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),_.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),_.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function Pq(e,n){const t=navigator.clipboard;if(!t){sn(mL(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>sn(jf(),"success")).catch(r=>sn(r instanceof Error?r.message:String(r),"error"))}function Fq({name:e,onCommit:n,onCancel:t}){const[r,s]=T.useState(e),o=T.useRef(!1),a=()=>{if(o.current)return;o.current=!0;const i=r.trim();!i||i===e?t():n(i)};return _.jsx(qr,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":vnt({path:Ae(e)}),onFocus:i=>{const c=e.lastIndexOf(".");i.currentTarget.setSelectionRange(0,c>0?c:e.length)},onChange:i=>s(i.target.value),onClick:i=>i.stopPropagation(),onDoubleClick:i=>i.stopPropagation(),onBlur:a,onKeyDown:i=>{i.stopPropagation(),i.key==="Enter"?(i.preventDefault(),i.currentTarget.blur()):i.key==="Escape"&&(i.preventDefault(),o.current=!0,t())}})}function Hq(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function qq({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:o,onClose:a}){const i=T.useRef(null),c=T.useRef(a);c.current=a;const[u,d]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var k;const m=i.current;if(!m)return;const w=document.activeElement instanceof HTMLElement?document.activeElement:null;return d({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(k=m.querySelector("button"))==null||k.focus(),()=>{m.contains(document.activeElement)&&(w==null||w.focus())}},[e]),T.useEffect(()=>{const m=()=>c.current(),w=v=>{var y;(y=i.current)!=null&&y.contains(v.target instanceof Node?v.target:null)||c.current()},k=v=>{if(v.key==="Tab"){v.preventDefault(),c.current();return}v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),c.current())};return document.addEventListener("pointerdown",w),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",k,!0),()=>{document.removeEventListener("pointerdown",w),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",k,!0)}},[]);const f=m=>{c.current(),m()},p=(m,w,k=!1)=>_.jsx(un,{size:"compact",role:"menuitem",danger:k,onClick:()=>f(w),children:_.jsx("span",{children:m})});return no.createPortal(_.jsxs("div",{ref:i,role:"menu","aria-label":ent({path:Ae(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var y,x;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const w=[...((y=i.current)==null?void 0:y.querySelectorAll("button"))??[]],k=w.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:w[0]),v=m.key==="ArrowDown"?1:-1;(x=w[(k+v+w.length)%w.length])==null||x.focus()},children:[p(lnt(),n),t&&p(cL(),t),r&&p(Gtt(),r),p(Tge(),s),o&&p(iL(),o,!0)]}),document.body)}const M5=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),_M=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function fM(){return{dirs:new Map,files:[]}}function Uq(e){const n=fM();for(const t of e){const r=t.split("/");let s=n;for(let o=0;oo(t),title:t,children:[p?_.jsx(qc,{size:13,className:_M}):_.jsx(yi,{size:13,className:_M}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&_.jsx(Vj,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:o,onOpenFile:a,renamingPath:i,onContextMenu:c,onRename:u,onCancelRename:d})]})}function Vj({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:o,renamingPath:a,onContextMenu:i,onRename:c,onCancelRename:u}){const d=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return _.jsxs(_.Fragment,{children:[d.map(p=>{const m=n?`${n}/${p}`:p;return _.jsx(N7r,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:o,renamingPath:a,onContextMenu:i,onRename:c,onCancelRename:u},`d:${m}`)}),f.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&c&&u)return _.jsxs("div",{className:M5,style:{paddingInlineStart:8+t*14},children:[_.jsx(Wh,{name:p}),_.jsx(Fq,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=ns(k=>o(m,k));return _.jsxs("button",{type:"button",className:M5,style:{paddingInlineStart:8+t*14},...w,onContextMenu:k=>{i&&(k.preventDefault(),i(k,m))},onKeyDown:k=>{if(i&&(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10")){k.preventDefault(),i(k,m);return}w.onKeyDown(k)},title:nJ({name:Ae(m)}),children:[_.jsx(Wh,{name:p}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function z7r({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:o,onToggledChange:a,onOpenFile:i}){var E,N;const c=t.branchName,u=dt({...PB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),d=dt({...bb(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),f=u.data,p=(E=u.error)==null?void 0:E.message,m=u.isFetching,w=IB(t.id),k=YV({queryKey:w.queryKey})>0,v=(N=d.data)!=null&&N.exists&&d.data.branch===c?t.chatSessionId??void 0:void 0,y=()=>{u.refetch()},x=T.useMemo(()=>f?Uq(f.entries):null,[f]),b=r==="files"?m:k,j=T.useCallback(A=>{const z=new Set(s);z.has(A)?z.delete(A):z.add(A),a(z)},[s,a]);return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[_.jsx(Iq,{view:r,onViewChange:o,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?ly(n.githubOwner,n.githubRepo,c):void 0,githubTitle:JD({branch:Ae(c)}),refreshing:b,onRefresh:()=>r==="files"?y():void Ze.invalidateQueries(w)}),r==="changes"?_.jsx(m7r,{experiment:t},t.id):_.jsxs(_.Fragment,{children:[(f==null?void 0:f.truncated)&&_.jsx(Nc,{children:wFe()}),p&&x&&_.jsxs(Nc,{children:[PFe()," ",Ae(p)]}),_.jsx(dh,{children:x?x.dirs.size===0&&x.files.length===0?_.jsx(Nc,{children:TFe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(Vj,{node:x,parentPath:"",depth:0,toggled:s,onToggle:j,onOpenFile:(A,z)=>v?i(A,v,void 0,z):i(A,void 0,c,z)})}):_.jsx(Nc,{children:p?CS({error:Ae(p)}):ES()})})]})]})}function Wj({icon:e,title:n,description:t}){return _.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[_.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),_.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&_.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function A7r({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:o,onOpenFile:a,canRenameFile:i}){var I,$,F;const c=n.id,d=((I=dt(mo(c)).data)==null?void 0:I.some(q=>q.id===e&&q.busy))??!1,f=dt({...bb(e??""),enabled:!!e,refetchInterval:d?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=dt({...PB(c,m),enabled:!e||f.isSuccess,refetchInterval:d?5e3:!1}),k=w.data,v=($=f.error??w.error)==null?void 0:$.message,y=f.isFetching||w.isFetching,[x,b]=T.useState(null),[j,E]=T.useState(null),N=T.useCallback(()=>{e&&Ze.invalidateQueries(bb(e)),Ze.invalidateQueries({queryKey:zt("getCodeTree",c),predicate:q=>!GD(q)})},[e,c]),A=T.useRef(d);T.useEffect(()=>{A.current&&!d&&N(),A.current=d},[d,N]);const z=T.useMemo(()=>k?Uq(k.entries):null,[k]),M=T.useCallback(q=>{const K=new Set(r);K.has(q)?K.delete(q):K.add(q),o(K)},[r,o]),D=e&&(p!=null&&p.exists)?p:null,L=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?Far({branch:Ae(D.baselineBranch)}):DS()),B=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,U=D?kar({branch:Ae(`${L}${B>0?"*":""}`)}):Rar({branch:Ae(n.baselineBranch)}),H=D?D.branch:n.baselineBranch,Q=(q,K)=>D?a(q,e,void 0,K):a(q,void 0,n.baselineBranch,K),V=(k==null?void 0:k.root)==="worktree",Z=async(q,K)=>{try{await fcr(c,q,K,{sessionId:e}),N()}catch(oe){sn(oe instanceof Error?oe.message:String(oe),"error")}},ee=q=>{const K=(k==null?void 0:k.path)??n.repoPath;Pq(K,q)};return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[_.jsx(Iq,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:U,branchTitle:U,githubHref:n.githubEnabled&&H?ly(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?JD({branch:Ae(H)}):void 0,refreshing:y,onRefresh:N}),v&&(p||k)&&_.jsxs(Nc,{children:[Rir()," ",Ae(v)]}),!k||e&&!p?_.jsx(dh,{children:_.jsx(Nc,{children:v?CS({error:Ae(v)}):ES()})}):D&&t==="changes"?_.jsx(dh,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:B===0||!D.diff?_.jsx("div",{className:"changes-note text-sm text-muted",children:hir()}):_.jsxs(_.Fragment,{children:[D.diff.truncated&&_.jsx(SP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),_.jsx(CP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):_.jsxs(dh,{children:[k.truncated&&_.jsx(Nc,{children:Xar()}),z?z.dirs.size===0&&z.files.length===0?_.jsx(Wj,{icon:vi,title:kir(),description:Iut()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(Vj,{node:z,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:j,onContextMenu:(q,K)=>{b(Hq(q,K))},onRename:(q,K)=>{E(null),Z(q,{action:"rename",newName:K})},onCancelRename:()=>E(null)})}):_.jsx(Nc,{children:oir()})]}),x&&_.jsx(qq,{target:x,onOpen:()=>Q(x.path,"keepOpen"),onRename:V&&i(x.path)?()=>E(x.path):void 0,onDuplicate:V?()=>void Z(x.path,{action:"duplicate"}):void 0,onCopyPath:()=>ee(x.path),onDelete:V?()=>{window.confirm(Ltt({path:Ae(x.path)}))&&Z(x.path,{action:"delete"})}:void 0,onClose:()=>b(null)})]})}function Gq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const o=T.useMemo(()=>{if(!e)return[];const d=e.replace(/\r\n?/g,` `),f=jB(d,i6(n));return d.endsWith(` -`)?f.slice(0,-1):f},[e,n]),a=t&&o.length>0?Math.min(Math.max(Math.trunc(t),1),o.length):void 0,i=T.useRef(null);T.useEffect(()=>{var d;r!==void 0&&(a?((d=i.current)==null||d.scrollIntoView({block:"center"}),s==null||s()):o.length===0&&(s==null||s()))},[o.length,s,r,a]);const{ruleCh:c}=iB(o.length),u=T.useMemo(()=>o.map((d,f)=>_.jsxs("div",{ref:f+1===a?i:void 0,className:`file-view-line flex items-stretch ${f+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[_.jsx("span",{"data-line":f+1,className:`${aB} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),_.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${gb} ${oB}`,children:CB(d)?_.jsx("br",{}):d})]},f)),[o,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${gb}`,children:[o.length>0&&_.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}const Bb=T.createContext(null);function T7r({url:e,name:n}){return _.jsx(rp,{size:"small",href:e,download:n,"aria-label":Jv({name:Ae(n)}),"data-tip":Jv({name:Ae(n)}),"data-tip-align":"end",children:_.jsx(tg,{size:13})})}const R7r=T.lazy(()=>tW(()=>import("./PdfPreview-C-Z2HtQB.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:Vq})));function Kq(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function Vq({url:e,name:n}){return _.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Byt()," ",_.jsxs("a",{href:e,download:n,children:[B4()," ",Ae(n)]})]})}function O5({kind:e,url:n,name:t,download:r=!0}){const[s,o]=T.useState(!1),a=T.useContext(Bb);if(T.useEffect(()=>o(!1),[e,n]),s)return _.jsx(Vq,{url:n,name:t});let i;return e==="image"?i=_.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:_.jsx("img",{src:n,alt:t,onError:()=>o(!0)})}):e==="audio"?i=_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:_.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):e==="video"?i=_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:_.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):i=_.jsx(T.Suspense,{fallback:_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:_.jsx(Ct,{})}),children:_.jsx(R7r,{url:n,name:t,download:r,onError:()=>o(!0)},n)}),_.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i,r&&e!=="pdf"&&a&&no.createPortal(_.jsx(T7r,{url:n,name:t}),a)]})}const M7r=e=>({queryKey:zt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function Wq(e,n=!0){return dt({...M7r(e),enabled:n,subscribed:n}).data??null}function O7r(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function D7r(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),o=r===-1?"":t.slice(r),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1),u=i.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of i.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const d=u.join("/");if(!d)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:d,url:`${Nf(e,d)}${p?`&${p}`:""}${o}`}}function L7r(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +`)?f.slice(0,-1):f},[e,n]),a=t&&o.length>0?Math.min(Math.max(Math.trunc(t),1),o.length):void 0,i=T.useRef(null);T.useEffect(()=>{var d;r!==void 0&&(a?((d=i.current)==null||d.scrollIntoView({block:"center"}),s==null||s()):o.length===0&&(s==null||s()))},[o.length,s,r,a]);const{ruleCh:c}=iB(o.length),u=T.useMemo(()=>o.map((d,f)=>_.jsxs("div",{ref:f+1===a?i:void 0,className:`file-view-line flex items-stretch ${f+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[_.jsx("span",{"data-line":f+1,className:`${aB} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),_.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${gb} ${oB}`,children:CB(d)?_.jsx("br",{}):d})]},f)),[o,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${gb}`,children:[o.length>0&&_.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${c}ch`},"aria-hidden":"true"}),u]})}const Bb=T.createContext(null);function T7r({url:e,name:n}){return _.jsx(rp,{size:"small",href:e,download:n,"aria-label":Jv({name:Ae(n)}),"data-tip":Jv({name:Ae(n)}),"data-tip-align":"end",children:_.jsx(tg,{size:13})})}const R7r=T.lazy(()=>tW(()=>import("./PdfPreview-D-eaX8vY.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:Vq})));function Kq(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function Vq({url:e,name:n}){return _.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Byt()," ",_.jsxs("a",{href:e,download:n,children:[B4()," ",Ae(n)]})]})}function O5({kind:e,url:n,name:t,download:r=!0}){const[s,o]=T.useState(!1),a=T.useContext(Bb);if(T.useEffect(()=>o(!1),[e,n]),s)return _.jsx(Vq,{url:n,name:t});let i;return e==="image"?i=_.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:_.jsx("img",{src:n,alt:t,onError:()=>o(!0)})}):e==="audio"?i=_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:_.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):e==="video"?i=_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:_.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>o(!0)})}):i=_.jsx(T.Suspense,{fallback:_.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center",children:_.jsx(Ct,{})}),children:_.jsx(R7r,{url:n,name:t,download:r,onError:()=>o(!0)},n)}),_.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i,r&&e!=="pdf"&&a&&no.createPortal(_.jsx(T7r,{url:n,name:t}),a)]})}const M7r=e=>({queryKey:zt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function Wq(e,n=!0){return dt({...M7r(e),enabled:n,subscribed:n}).data??null}function O7r(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function D7r(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),o=r===-1?"":t.slice(r),a=s.indexOf("?"),i=a===-1?s:s.slice(0,a),c=a===-1?"":s.slice(a+1),u=i.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of i.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const d=u.join("/");if(!d)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:d,url:`${Nf(e,d)}${p?`&${p}`:""}${o}`}}function L7r(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const Qq="orx:files-tree-width",Xq="orx:artifacts-collapsed:",Yq=180,Zq=320,$7r=8,I7r=280;function B7r(){try{const e=Number(localStorage.getItem(Qq));if(Number.isFinite(e)&&e>=Yq&&e<=Zq)return e}catch{}return I7r}function P7r(e){try{const n=localStorage.getItem(`${Xq}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function y0(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=y0(t.children??[],n);if(r)return r}}return null}function Jq({projectId:e,folder:n,markdown:t,entries:r}){const s=o=>{if(O7r(o))return o;const a=D7r(e,n,o);if(!a)return null;const i=y0(r,a.path);if(!i)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),d=c===-1?"":a.url.slice(c);return`${u}&v=${i.modifiedAt}:${i.size}${d}`};return _.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:_.jsx(V2r,{remarkPlugins:[XH,[YH,rq]],rehypePlugins:[jH],components:{a:({href:o,children:a,...i})=>{const c=!o||o.startsWith("#"),u=c?o:s(o);return u?_.jsx("a",{...i,href:u,...c?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):_.jsx("span",{children:a})},img:({src:o,alt:a})=>{if(!o||typeof o!="string")return null;const i=s(o);return i?_.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[_.jsx("img",{src:i,alt:a??"",loading:"lazy"}),a&&_.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...sq},children:JH(L7r(t))})})}function F7r(e){return e.presentation==="text"&&Kj(e.name)?"markdown":Kq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function H7r(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=$$,o=F6(e,n.path),a=dt({...o,enabled:s,subscribed:s}),i=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const d=i.current;i.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&d.projectId===e&&d.path===n.path&&(d.modifiedAt!==n.modifiedAt||d.size!==n.size||d.version!==null&&d.version!==r)&&Ze.invalidateQueries({queryKey:o.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const c=a.data;return{text:c&&!c.binary?c.content:null,binary:(c==null?void 0:c.binary)??!1,truncated:(c==null?void 0:c.truncated)??!1,error:c?null:((u=a.error)==null?void 0:u.message)??(c===null?Pge():null),wantsText:s}}function q7r({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=F7r(n),o=Wq(Nf(e,n.path)),{text:a,binary:i,truncated:c,error:u,wantsText:d}=H7r(e,n,s,o),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=s==="markdown",v=n.path.split("/").slice(0,-1).join("/"),y=`${Nf(e,n.path)}&v=${encodeURIComponent(o??`${n.modifiedAt}:${n.size}`)}`;let x;return s==="image"||s==="audio"||s==="video"||s==="pdf"?x=_.jsx(Bb.Provider,{value:m,children:_.jsx(O5,{kind:s,url:y,name:n.name})}):s==="download"||!d||i?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||i?wge():tbe()," ",_.jsx("a",{href:y,...s==="download"||i?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||i?gL():Qge()})]}):u?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[A1e()," ",Ae(u)]}):a===null?x=_.jsxs(Ur,{children:[_.jsx(Ct,{})," ",sL()]}):k&&!f?x=_.jsx(Jq,{projectId:e,folder:v,markdown:a,entries:r}):x=_.jsx(Gq,{text:a,path:n.path}),_.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[_.jsxs("div",{className:"fpreview-head @container flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[_.jsx(Wh,{name:n.name}),_.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ae(n.path),children:n.name}),_.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[yve()," ",new Date(n.modifiedAt).toLocaleString(C(),{dateStyle:"medium",timeStyle:"short"})]}),_.jsx("div",{ref:w,className:"contents"}),(s==="text"||s==="download")&&_.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Dl(n.size)}),k&&_.jsx(Rt,{size:"small",active:f,"data-tip":f?eb():Zd(),"data-tip-align":"end","aria-label":f?eb():Zd(),onClick:()=>p(b=>!b),children:_.jsx(b3,{size:13})}),_.jsx(rp,{size:"small",href:y,target:"_blank",rel:"noopener noreferrer","data-tip":kE(),"data-tip-align":"end","aria-label":kE(),children:_.jsx(Rf,{size:13})}),_.jsx(Rt,{size:"small","data-tip":wE(),"data-tip-align":"end","aria-label":wE(),onClick:()=>{window.confirm(kS({path:Ae(n.path)}))&&t(n.path)},children:_.jsx(Yf,{size:13})})]}),_.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${k&&!f?"doc":""}`,children:[x,c&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:B1e()})]})]})}function eU({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:o,onOpenFile:a,onDelete:i,renamingPath:c,onContextMenu:u,onRename:d,onCancelRename:f}){return _.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var w;const m={paddingInlineStart:8+Math.min(n,$7r)*14};if(p.isDir){const k=!t.has(p.path);return _.jsxs("div",{className:"min-w-0 max-w-full",children:[_.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[_.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":k?F0e({name:Ae(p.name)}):dge({name:Ae(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:_.jsx(yi,{size:13,className:k?"open":""})}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),_.jsx(Rt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":x1e(),"data-tip-align":"end","aria-label":sge({name:Ae(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(kS({path:Ae(p.path)}))&&i(p.path)},children:_.jsx(Yf,{size:12})})]}),k&&(((w=p.children)==null?void 0:w.length)??0)>0&&_.jsx(eU,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:o,onOpenFile:a,onDelete:i,renamingPath:c,onContextMenu:u,onRename:d,onCancelRename:f})]},p.path)}return c===p.path?_.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[_.jsx(Wh,{name:p.name}),_.jsx(Fq,{name:p.name,onCommit:k=>d(p.path,k),onCancel:f})]},p.path):_.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:FX({path:Ae(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>o(p.path),onDoubleClick:()=>a(p.path),onContextMenu:k=>{k.preventDefault(),o(p.path),u(k,p.path)},onAuxClick:k=>{k.button===1&&(k.preventDefault(),o(p.path),a(p.path))},onKeyDown:k=>{if(k.key==="ContextMenu"||k.shiftKey&&k.key==="F10"){k.preventDefault(),o(p.path),u(k,p.path);return}if(k.key===" "){k.preventDefault(),k.stopPropagation(),o(p.path);return}k.key==="Enter"&&(k.preventDefault(),k.stopPropagation(),o(p.path),a(p.path))},children:[_.jsx(Wh,{name:p.name}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function U7r({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,o]=T.useState(null),[a,i]=T.useState(()=>P7r(e.id)),[c,u]=T.useState(B7r),[d,f]=T.useState(null),[p,m]=T.useState(null),w=T.useRef(null);T.useEffect(()=>{try{localStorage.setItem(`${Xq}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=N=>{var L;N.preventDefault(),N.currentTarget.setPointerCapture(N.pointerId);const A=(L=w.current)==null?void 0:L.getBoundingClientRect(),z=document.body.style.userSelect;document.body.style.userSelect="none";const M=B=>{const U=Math.round(B.clientX-((A==null?void 0:A.left)??0)),H=Math.min(Math.max(U,Yq),Zq);u(H);try{localStorage.setItem(Qq,String(H))}catch{}},D=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",D),window.removeEventListener("pointercancel",D),document.body.style.userSelect=z};window.addEventListener("pointermove",M),window.addEventListener("pointerup",D),window.addEventListener("pointercancel",D)};T.useEffect(()=>{if(!s||!n)return;const N=y0(n.entries,s);(!N||N.isDir)&&o(null)},[s,n]);const v=N=>i(A=>{const z=new Set(A);return z.has(N)?z.delete(N):z.add(N),z}),y=N=>{(s===N||s!=null&&s.startsWith(N+"/"))&&o(null),glr(e.id,N).catch(()=>{})},x=async(N,A)=>{try{await vlr(e.id,N,A),A.action==="rename"&&s===N&&o(null)}catch(z){sn(z instanceof Error?z.message:String(z),"error")}},b=N=>{n&&Pq(n.dir,N)};if(!n)return _.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:_.jsxs(Ur,{className:"p-5",children:[_.jsx(Ct,{})," ",_ve()]})});const j=N=>_.jsx(eU,{entries:N,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:o,onOpenFile:t,onDelete:y,renamingPath:p,onContextMenu:(A,z)=>{f(Hq(A,z))},onRename:(A,z)=>{m(null),x(A,{action:"rename",newName:z})},onCancelRename:()=>m(null)}),E=s?y0(n.entries,s):null;return n.entries.length===0?_.jsx(Wj,{icon:QS,title:zve(),description:Kve()}):_.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[_.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:w,style:{width:c},children:[_.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:k}),_.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[j(n.entries),n.truncated&&_.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:W1e()})]})]}),E?_.jsx(q7r,{projectId:e.id,entry:E,onDelete:y,artifactEntries:n.entries},E.path):_.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[_.jsx(Thr,{size:22,strokeWidth:1.5}),_.jsx("span",{children:s1e()})]}),d&&_.jsx(qq,{target:d,onOpen:()=>t(d.path),onRename:r(d.path)?()=>m(d.path):void 0,onDuplicate:()=>void x(d.path,{action:"duplicate"}),onCopyPath:()=>b(d.path),onDelete:()=>{window.confirm(kS({path:Ae(d.path)}))&&y(d.path)},onClose:()=>f(null)})]})}const tU=20*1024*1024,nU="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",rU="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",G7r="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",K7r="text-sm font-normal text-text",V7r="mt-1 mb-0 text-sm leading-relaxed text-text";function sU(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const o=s.indexOf(",");n(o>=0?s.slice(o+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function W7r(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function oU({accept:e,busy:n,prompt:t,onFile:r}){const[s,o]=T.useState(!1),a=T.useRef(null);return _.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:i=>{i.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:i=>{var u;if(i.preventDefault(),o(!1),n)return;const c=(u=i.dataTransfer.files)==null?void 0:u[0];c&&r(c)},onClick:()=>{var i;n||(i=a.current)==null||i.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:i=>{var c;(i.key==="Enter"||i.key===" ")&&!n&&(i.preventDefault(),(c=a.current)==null||c.click())},children:[_.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:i=>{var u;const c=(u=i.target.files)==null?void 0:u[0];c&&r(c),i.target.value=""}}),n?_.jsxs(_.Fragment,{children:[_.jsx(Ct,{}),_.jsx("span",{children:NHn()})]}):_.jsxs(_.Fragment,{children:[_.jsx(cpr,{size:20,strokeWidth:1.5}),_.jsx("span",{children:t})]})]})}function aU({bytes:e,updatedAt:n}){return _.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Dl(e),n>0&&_.jsxs("span",{className:"text-muted",children:[" · ",Dc(n)]})]})}function Q7r({skill:e,onError:n}){const t=pn({mutationFn:Flr}),r=t.isPending;return _.jsxs("div",{className:"flex items-center gap-2 py-1 border-t border-t-border first:border-t-0",children:[_.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[_.jsx("span",{className:K7r,children:e.name}),e.origin&&_.jsx(Zt,{size:"small",children:e.origin})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(Rt,{size:"small","data-tip":e.origin?tPn():uFn(),"data-tip-align":"end","aria-label":e.origin?bPn({name:Ae(e.name)}):zIn({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?uPn({name:Ae(e.name)}):yIn({name:Ae(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:_.jsx(Yf,{size:13})})]})}function X7r({template:e,onError:n}){const t=pn({mutationFn:Ilr}),r=t.isPending,s=e.supportFiles.length;return _.jsxs("div",{className:G7r,children:[_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsx("span",{className:"text-base font-medium text-text",children:e.name}),_.jsxs("p",{className:V7r,children:[e.entry,s>0&&(s===1?$Bn():NPn({count:_n(s)}))]})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(Rt,{"data-tip":bFn(),"data-tip-align":"end","aria-label":VIn({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(IIn({name:Ae(e.name)}))&&t.mutateAsync(e.name).catch(o=>{n(o instanceof Error?o.message:String(o))})},children:_.jsx(Yf,{size:13})})]})}function Y7r(){var x;const e=pn({mutationFn:Plr}),n=dt(Our()),t=n.data,r=T.useRef(null),[s,o]=T.useState(!1),[a,i]=T.useState(!1),c=T.useCallback(()=>{const b=r.current;o(!!b&&b.scrollTop>1),i(!!b&&b.scrollHeight-b.scrollTop-b.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const b=r.current;if(!b)return;const j=new ResizeObserver(c);return j.observe(b),()=>j.disconnect()},[t,c]);const u=n.isFetching,d=(x=n.error)==null?void 0:x.message,[f,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),y=T.useCallback(async b=>{if(!v.current){if(w(null),!W7r(b.name)){w(KHn());return}if(b.size>tU){w(h$());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:b.name,contentBase64:await sU(b)})}catch(j){w(j instanceof Error?j.message:String(j))}finally{v.current=!1,p(!1)}}},[]);return _.jsxs("section",{className:nU,children:[_.jsxs("div",{className:"flex items-baseline gap-2.5",children:[_.jsx("h3",{children:bHn()}),_.jsxs(Me,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[_.jsx(xi,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Z0()]})]}),_.jsx("p",{className:rU,children:nBn()}),_.jsx(oU,{accept:".md,.markdown,.zip",busy:f,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:_Bn()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:_In()})]}),onFile:b=>void y(b)}),m&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),d&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[$Pn()," ",d]}),t===void 0?d?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(Ct,{})," ",$Fn()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:tHn()}):_.jsxs("div",{className:"relative mt-1",children:[_.jsx("div",{ref:r,onScroll:c,className:"flex flex-col max-h-120 overflow-y-auto overscroll-contain",children:t.map(b=>_.jsx(Q7r,{skill:b,onError:w},b.name))}),s&&_.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-10 bg-gradient-to-b from-background to-transparent"}),a&&_.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-10 bg-gradient-to-t from-background to-transparent"})]})]})}function Z7r(){var d;const e=pn({mutationFn:$lr}),n=dt(Mur()),t=n.data,r=(d=n.error)==null?void 0:d.message,[s,o]=T.useState(!1),[a,i]=T.useState(null),c=T.useRef(!1),u=T.useCallback(async f=>{if(c.current)return;i(null);const p=f.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){i(tqn());return}if(f.size>tU){i(h$());return}c.current=!0,o(!0);try{await e.mutateAsync({filename:f.name,contentBase64:await sU(f)})}catch(m){i(m instanceof Error?m.message:String(m))}finally{c.current=!1,o(!1)}},[]);return _.jsxs("section",{className:nU,children:[_.jsx("h3",{children:NFn()}),_.jsx("p",{className:rU,children:$Hn()}),_.jsx(oU,{accept:".tex,.zip",busy:s,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:yBn()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:iQn()})]}),onFile:f=>void u(f)}),a&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[KPn()," ",r]}),t===void 0?r?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(Ct,{})," ",KFn()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:uHn()}):_.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>_.jsx(X7r,{template:f,onError:i},f.name))})]})}function J7r(){return _.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[_.jsx("h1",{children:tFn()}),_.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:KBn()}),_.jsx(Y7r,{}),_.jsx(Z7r,{})]})}const e8r="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function gc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:o,onPromote:a,onClose:i}){return _.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?e8r:""}`,onClick:o,onDoubleClick:a,title:s?ZWn({label:n}):n,"aria-label":s?qWn({label:n}):n,children:[t,_.jsx("span",{className:"tab-label","data-label":n,children:_.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),_.jsx("span",{role:"button",className:"tab-close",title:MPe(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),i()},children:_.jsx(_r,{size:12})})]})}const dM=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function t8r({owner:e,repo:n,branch:t}){return!e||!n?_.jsx("span",{className:dM,children:_.jsx("code",{children:t})}):_.jsxs("a",{className:dM,href:ly(e,n,t),target:"_blank",rel:"noopener noreferrer",title:M4({name:Ae(t)}),children:[_.jsx("code",{children:t}),_.jsx(J6,{size:12})]})}const Uk=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),hM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function pM(e){return new Date(e).toLocaleString(C(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function mM(e,n){return e0((e.endedAt??n)-e.createdAt)}function n8r({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:o}){const a=r[0]??null,i=S$(r),c=r.some(f=>f.status==="running"||f.status==="starting"),[u,d]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;d(Date.now());const f=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(f)},[c]),_.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:_.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[_.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[_.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[_.jsx("h1",{children:e.title||e.slug}),_.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),_.jsx(Pl,{status:a?Ta(a):"idle"})]}),_.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&_.jsxs(Me,{...ns(f=>s(a.id,f)),children:[_.jsx(Vi,{size:15}),vZe()]}),_.jsxs(Me,{...ns(o),children:[_.jsx(dy,{size:15}),lYe()]})]}),e.description&&_.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[_.jsx("h2",{children:LYe()}),_.jsx(Ic,{text:e.description})]}),_.jsxs("section",{className:Uk,children:[_.jsx("h2",{children:a?eYe():eJe()}),a&&_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[_.jsx(Pl,{status:Ta(a)}),_.jsx(ej,{backend:a.backend}),_.jsxs("span",{title:GZe(),children:[_.jsx(_dr,{size:13}),pM(a.createdAt)]}),_.jsxs("span",{title:GYe(),children:[_.jsx(Sdr,{size:13}),mM(a,u)]}),a.commitSha&&_.jsxs("span",{title:vYe(),children:[_.jsx(thr,{size:14}),_.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&_.jsxs("span",{children:[eZe()," ",a.exitCode]})]}),a.command&&_.jsxs("code",{className:hM,children:["$ ",a.command]}),i&&_.jsx("p",{className:"experiment-overview-monitoring mt-4 text-accent-amber text-sm wrap-anywhere",children:i}),a.resultMarkdown&&_.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:_.jsx(Ic,{text:a.resultMarkdown})})]})]}),_.jsxs("section",{className:Uk,children:[_.jsx("h2",{children:"Git"}),_.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[_.jsx(t8r,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&_.jsxs("span",{children:[lZe()," ",_.jsx("code",{children:n.slug})]}),_.jsxs("span",{title:pM(e.createdAt),children:[EYe()," ",Dc(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&_.jsxs("code",{className:hM,children:["$ ",e.runCommand]})]}),r.length>0&&_.jsxs("section",{className:Uk,children:[_.jsx("h2",{children:LZe()}),_.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((f,p)=>_.jsxs("button",{...ns(m=>s(f.id,m)),children:[_.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[EZe()," ",r.length-p]}),_.jsx(Pl,{status:Ta(f)}),_.jsx("span",{children:Dc(f.createdAt)}),_.jsx("span",{children:mM(f,u)}),_.jsx(Vi,{size:13})]},f.id))})]})]})})}function gM(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=my(t,!0);let o=!1,a=0,i=!1,c=!1;async function u(){if(i){c=!0;return}i=!0;try{for(;;){const f=await acr(e,a);if(o)return;if(f.dataBase64&&r.write(gM(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{i=!1,c&&!o&&(c=!1,u())}}const d=Lur(e,f=>{if(o)return;const p=gM(f.dataBase64);!i&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{o=!0,d(),s()}},[e]),_.jsx("div",{ref:n,className:"h-full w-full"})}function s8r({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:o,parentExperiment:a,onOpenView:i,onOpenCode:c}){const u=r.filter(d=>d.experimentId===e.id).sort((d,f)=>f.createdAt-d.createdAt);return t==="overview"?_.jsx(n8r,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(d,f)=>i("terminal",d,f),onOpenCode:d=>c("files",d)}):_.jsx(o8r,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:o})}function o8r({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,o]=T.useState(null),[a,i]=T.useState(null),[c,u]=T.useState(!1),d=T.useRef(null),f=t?n.find(v=>v.id===t)??null:n[0]??null,p=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",m=!!(f&&p&&(f.cancelRequested||a===f.id)),w=v=>{const y=n.findIndex(x=>x.id===v);return y===-1?n.length:n.length-y};T.useEffect(()=>{if(!c)return;const v=y=>{var x;(x=d.current)!=null&&x.contains(y.target)||u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function k(){if(f){o(null),i(f.id);try{await N$(f.id)}catch(v){i(null),o(v instanceof Error?v.message:String(v))}}}return _.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[_.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[_.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),_.jsx("span",{className:"flex-1"}),s&&_.jsx("span",{className:"error",role:"alert",children:s}),p&&_.jsxs(Me,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[_.jsx(CI,{size:13}),m?QFe():hL()]}),n.length>0&&f&&_.jsxs("div",{className:"run-history relative shrink-0",ref:d,children:[_.jsxs(Me,{title:EQe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[_.jsxs("span",{children:[sN()," ",w(f.id)]}),_.jsx(Pl,{status:m?"cancelling":Ta(f)}),_.jsx(qc,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&_.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(v=>_.jsxs(un,{className:"justify-start",active:v.id===(f==null?void 0:f.id),onClick:()=>{r(v.id),u(!1)},children:[_.jsxs("span",{className:"font-medium",children:[sN()," ",w(v.id)]}),_.jsx(Pl,{status:Ta(v)}),_.jsx("span",{className:"ms-auto text-xs text-muted",children:Dc(v.createdAt)})]},v.id))})]})]}),_.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?_.jsx(r8r,{runId:f.id},f.id):_.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?hi():uQe()})})]})}let D5=!1;function vM(e){D5=!0;try{return window.confirm(e)}finally{D5=!1}}const L5=e=>e.replace(/\r\n/g,` `),bM=(e,n,t)=>{const r=L5(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r `),conflict:null}},jl=e=>e.draft!==e.baseline,a8r=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),i8r=e=>e.crlf?e.draft.replace(/\n/g,`\r diff --git a/ui/dist/index.html b/ui/dist/index.html index c0f662f96..6b29acf02 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,7 +49,7 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - + diff --git a/ui/src/components/Onboarding.tsx b/ui/src/components/Onboarding.tsx index edf444f64..5ba7f6554 100644 --- a/ui/src/components/Onboarding.tsx +++ b/ui/src/components/Onboarding.tsx @@ -442,7 +442,7 @@ export function Onboarding({

)} {(gitVersion === null || gitError) && ( -
+
{gitError ? (

{m.onboarding_retry_connection()}